diff options
author | Ed Maste <emaste@FreeBSD.org> | 2021-09-29 21:24:39 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2021-09-30 15:50:00 +0000 |
commit | 1ad2d87778970582854082bcedd2df0394fd4933 (patch) | |
tree | ce1fcd3d6d1b436ff28ca47e9a9e308bbe6250d0 | |
parent | ffc19cf52da5546973965f78cf32aa0f2c9657f8 (diff) | |
download | src-1ad2d87778970582854082bcedd2df0394fd4933.tar.gz src-1ad2d87778970582854082bcedd2df0394fd4933.zip |
mgb: Fix nop admin interrupt handling
Previously mgb_admin_intr printed a diagnostic message if no interrupt
status bits were set, but it's not valid to call device_printf() from a
filter. Just drop the message as it has no user-facing value.
Also return FILTER_STRAY in this case - there is nothing further for
the driver to do.
Reviewed by: kbowling
MFC after: 1 week
Fixes: 8890ab7758b8 ("Introduce if_mgb driver...")
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D32231
-rw-r--r-- | sys/dev/mgb/if_mgb.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/sys/dev/mgb/if_mgb.c b/sys/dev/mgb/if_mgb.c index bc944c92625c..6d94f96c09db 100644 --- a/sys/dev/mgb/if_mgb.c +++ b/sys/dev/mgb/if_mgb.c @@ -779,16 +779,9 @@ mgb_admin_intr(void *xsc) intr_en = CSR_READ_REG(sc, MGB_INTR_ENBL_SET); intr_sts &= intr_en; - /* - * NOTE: Debugging printfs here - * will likely cause interrupt test failure. - */ - /* TODO: shouldn't continue if suspended */ - if ((intr_sts & MGB_INTR_STS_ANY) == 0) { - device_printf(sc->dev, "non-mgb interrupt triggered.\n"); - return (FILTER_SCHEDULE_THREAD); - } + if ((intr_sts & MGB_INTR_STS_ANY) == 0) + return (FILTER_STRAY); if ((intr_sts & MGB_INTR_STS_TEST) != 0) { sc->isr_test_flag = true; CSR_WRITE_REG(sc, MGB_INTR_STS, MGB_INTR_STS_TEST); |