Date: Wed, 30 Apr 2025 17:21:57 GMT From: Warner Losh <imp@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 07070742fa71 - stable/14 - mpi3mr: Process LOG Data Events in Interrupt Top Half for Early Notification Message-ID: <202504301721.53UHLvs5095462@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=07070742fa7159368621baae6d547656e4b4752f commit 07070742fa7159368621baae6d547656e4b4752f Author: Chandrakanth patil <chandrakanth.patil@broadcom.com> AuthorDate: 2025-04-27 23:40:14 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2025-04-30 17:05:53 +0000 mpi3mr: Process LOG Data Events in Interrupt Top Half for Early Notification The driver now processes LOG Data events in the interrupt top half instead of the bottom half. This allows LOG events to be handled immediately upon receipt, reducing latency and enabling early notification to the Library or applications. This change ensures LOG event handling occurs closer to the firmware's generation point, improving alignment with event-driven diagnostic and monitoring mechanisms. Reviewed by: ssaxena, imp Differential Revision: https://reviews.freebsd.org/D49751 (cherry picked from commit df8a74fca036a0ba8026f3ae3da830dffb922faa) --- sys/dev/mpi3mr/mpi3mr.c | 7 ++++++- sys/dev/mpi3mr/mpi3mr_cam.c | 13 ------------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/sys/dev/mpi3mr/mpi3mr.c b/sys/dev/mpi3mr/mpi3mr.c index 5c4df9cef0b6..e18fc0a9df74 100644 --- a/sys/dev/mpi3mr/mpi3mr.c +++ b/sys/dev/mpi3mr/mpi3mr.c @@ -4385,11 +4385,16 @@ static void mpi3mr_process_events(struct mpi3mr_softc *sc, break; } case MPI3_EVENT_DEVICE_INFO_CHANGED: - case MPI3_EVENT_LOG_DATA: { process_evt_bh = 1; break; } + case MPI3_EVENT_LOG_DATA: + { + mpi3mr_app_save_logdata(sc, (char*)event_reply->EventData, + le16toh(event_reply->EventDataLength) * 4); + break; + } case MPI3_EVENT_ENERGY_PACK_CHANGE: { mpi3mr_energypackchg_evt_th(sc, event_reply); diff --git a/sys/dev/mpi3mr/mpi3mr_cam.c b/sys/dev/mpi3mr/mpi3mr_cam.c index 80dadb9f4283..6a1a08d7b081 100644 --- a/sys/dev/mpi3mr/mpi3mr_cam.c +++ b/sys/dev/mpi3mr/mpi3mr_cam.c @@ -1676,14 +1676,6 @@ mpi3mr_process_sastopochg_evt(struct mpi3mr_softc *sc, struct mpi3mr_fw_event_wo return; } -static inline void -mpi3mr_logdata_evt_bh(struct mpi3mr_softc *sc, - struct mpi3mr_fw_event_work *fwevt) -{ - mpi3mr_app_save_logdata(sc, fwevt->event_data, - fwevt->event_data_size); -} - static void mpi3mr_pcietopochg_evt_debug(struct mpi3mr_softc *sc, Mpi3EventDataPcieTopologyChangeList_t *event_data) @@ -2036,11 +2028,6 @@ mpi3mr_fw_work(struct mpi3mr_softc *sc, struct mpi3mr_fw_event_work *fw_event) mpi3mr_process_pcietopochg_evt(sc, fw_event); break; } - case MPI3_EVENT_LOG_DATA: - { - mpi3mr_logdata_evt_bh(sc, fw_event); - break; - } default: mpi3mr_dprint(sc, MPI3MR_TRACE,"Unhandled event 0x%0X\n", fw_event->event);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202504301721.53UHLvs5095462>