Date: Tue, 8 Jun 2004 07:58:23 GMT From: Scott Long <scottl@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 54407 for review Message-ID: <200406080758.i587wNEH084247@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=54407 Change 54407 by scottl@scottl-esp-sparc64 on 2004/06/08 07:58:23 Fix a mistake with XPT_BUS_RESET and XPT_DEVICE_RESET being switched. Hook ncr53c9x_scsi_reset() up to XPT_BUS_RESET. It might need a mandatory delay of some sort. Sanity check the incoming target number as CAM seems to like to send an id of '-1' on bootup. Affected files ... .. //depot/projects/scottl-esp/src/sys/dev/esp/ncr53c9x.c#16 edit Differences ... ==== //depot/projects/scottl-esp/src/sys/dev/esp/ncr53c9x.c#16 (text+ko) ==== @@ -823,8 +823,9 @@ mtx_lock(&sc->sc_lock); switch (ccb->ccb_h.func_code) { - case XPT_RESET_DEV: - ccb->ccb_h.status = CAM_FUNC_NOTAVAIL; + case XPT_RESET_BUS: + ncr53c9x_scsi_reset(sc); + ccb->ccb_h.status = CAM_REQ_CMP; mtx_unlock(&sc->sc_lock); xpt_done(ccb); return; @@ -889,10 +890,17 @@ xpt_done(ccb); return; case XPT_SCSI_IO: - case XPT_RESET_BUS: + case XPT_RESET_DEV: { struct ccb_scsiio *csio; + if (ccb->ccb_h.target_id < 0 || + ccb->ccb_h.target_id >= sc->sc_ntarg) { + ccb->ccb_h.status = CAM_PATH_INVALID; + mtx_unlock(&sc->sc_lock); + xpt_done(ccb); + return; + } /* Get an ECB to use. */ ecb = ncr53c9x_get_ecb(sc); /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200406080758.i587wNEH084247>