From 8a5f89b96d9afd57d1e47251a291040690e5b7cb Mon Sep 17 00:00:00 2001 From: Matt Jacob Date: Sat, 17 Aug 2002 17:23:15 +0000 Subject: [PATCH] We only do isp_reinit from isp_async if ISP_FW_CRASH_DUMP is defined- otherwise the core code does this. --- sys/dev/isp/isp_freebsd.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/dev/isp/isp_freebsd.c b/sys/dev/isp/isp_freebsd.c index 25d5976661f..b6580dce4f6 100644 --- a/sys/dev/isp/isp_freebsd.c +++ b/sys/dev/isp/isp_freebsd.c @@ -3040,7 +3040,19 @@ isp_async(struct ispsoftc *isp, ispasync_t cmd, void *arg) isp_prt(isp, ISP_LOGERR, "Internal Firmware Error on bus %d @ RISC Address 0x%x", mbox6, mbox1); +#ifdef ISP_FW_CRASH_DUMP + /* + * XXX: really need a thread to do this right. + */ + if (IS_FC(isp)) { + FCPARAM(isp)->isp_fwstate = FW_CONFIG_WAIT; + FCPARAM(isp)->isp_loopstate = LOOP_NIL; + isp_freeze_loopdown(isp, "f/w crash"); + isp_fw_dump(isp); + } isp_reinit(isp); + isp_async(isp, ISPASYNC_FW_RESTARTED, NULL); +#endif break; } case ISPASYNC_UNHANDLED_RESPONSE: -- 2.45.2