diff options
author | ambrisko <ambrisko@FreeBSD.org> | 2006-09-20 18:49:35 +0000 |
---|---|---|
committer | ambrisko <ambrisko@FreeBSD.org> | 2006-09-20 18:49:35 +0000 |
commit | af202f9ad60105fc83e7ae3e8c014b8a5be15957 (patch) | |
tree | f170e4c3fd3412925d524335fad821ab3e4999eb /sys/dev/mfi/mfi.c | |
parent | 9f4eed62b7cd16a91ea1af4ab377449d33e2e474 (diff) | |
download | FreeBSD-src-af202f9ad60105fc83e7ae3e8c014b8a5be15957.zip FreeBSD-src-af202f9ad60105fc83e7ae3e8c014b8a5be15957.tar.gz |
Allow hw.mfi.event_locale/hw.mfi.event_class to be set via loader.
If an event doesn't match the criteria then don't print it. Some
events are not saved in the log (<0 class events).
Diffstat (limited to 'sys/dev/mfi/mfi.c')
-rw-r--r-- | sys/dev/mfi/mfi.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/mfi/mfi.c b/sys/dev/mfi/mfi.c index 78fd8ab..8c97ea3 100644 --- a/sys/dev/mfi/mfi.c +++ b/sys/dev/mfi/mfi.c @@ -85,9 +85,12 @@ static int mfi_linux_ioctl_int(struct cdev *, u_long, caddr_t, int, d_thread_t * SYSCTL_NODE(_hw, OID_AUTO, mfi, CTLFLAG_RD, 0, "MFI driver parameters"); static int mfi_event_locale = MFI_EVT_LOCALE_ALL; +TUNABLE_INT("hw.mfi.event_locale", &mfi_event_locale); SYSCTL_INT(_hw_mfi, OID_AUTO, event_locale, CTLFLAG_RW, &mfi_event_locale, 0, "event message locale"); + static int mfi_event_class = MFI_EVT_CLASS_DEBUG; +TUNABLE_INT("hw.mfi.event_class", &mfi_event_class); SYSCTL_INT(_hw_mfi, OID_AUTO, event_class, CTLFLAG_RW, &mfi_event_class, 0, "event message class"); @@ -1315,8 +1318,11 @@ mfi_get_entry(struct mfi_softc *sc, int seq) BUS_DMASYNC_POSTREAD); bus_dmamap_unload(sc->mfi_buffer_dmat, cm->cm_dmamap); - for (i = 0; i < el->count; i++) { - mfi_decode_evt(sc, &el->event[0]); + if (dcmd->header.cmd_status != MFI_STAT_NOT_FOUND) { + for (i = 0; i < el->count; i++) { + if (seq + i == el->event[i].seq) + mfi_decode_evt(sc, &el->event[i]); + } } mtx_lock(&sc->mfi_io_lock); |