diff options
author | scottl <scottl@FreeBSD.org> | 2004-06-12 05:19:17 +0000 |
---|---|---|
committer | scottl <scottl@FreeBSD.org> | 2004-06-12 05:19:17 +0000 |
commit | 0d95bb33d28ee13c0594d7ee8a95638e63d76895 (patch) | |
tree | 211e672b70afa51164ff59d7aa42eee03169df85 | |
parent | 699d33669cb28a3c652d00cf10c4f1224d08ace6 (diff) | |
download | FreeBSD-src-0d95bb33d28ee13c0594d7ee8a95638e63d76895.zip FreeBSD-src-0d95bb33d28ee13c0594d7ee8a95638e63d76895.tar.gz |
When autosense is retrieved, tell CAM about it instead of juust pretending
that the command succeeded. Sheesh! This makes CDROMs no longer cause an
instant panic at boot. Thanks to Jake Burkholder for providing a remote
test setup.
Also make device resets work, thanks to another typo.
-rw-r--r-- | sys/dev/esp/ncr53c9x.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/esp/ncr53c9x.c b/sys/dev/esp/ncr53c9x.c index 01d81a4..7f42c7c 100644 --- a/sys/dev/esp/ncr53c9x.c +++ b/sys/dev/esp/ncr53c9x.c @@ -944,7 +944,7 @@ ncr53c9x_action(struct cam_sim *sim, union ccb *ccb) ecb->ccb = ccb; ecb->timeout = ccb->ccb_h.timeout; - if (ccb->ccb_h.func_code == XPT_RESET_BUS) { + if (ccb->ccb_h.func_code == XPT_RESET_DEV) { ecb->flags |= ECB_RESET; ecb->clen = 0; ecb->dleft = 0; @@ -1219,6 +1219,7 @@ ncr53c9x_done(struct ncr53c9x_softc *sc, struct ncr53c9x_ecb *ecb) if ((ecb->flags & ECB_ABORT) != 0) { ccb->ccb_h.status = CAM_CMD_TIMEOUT; } else if ((ecb->flags & ECB_SENSE) != 0) { + ccb->ccb_h.status = CAM_AUTOSNS_VALID; } else if (ecb->stat == SCSI_STATUS_CHECK_COND) { if ((ecb->flags & ECB_SENSE) != 0) ccb->ccb_h.status = CAM_AUTOSENSE_FAIL; |