summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2004-01-02 05:46:09 +0000
committerkrw <krw@openbsd.org>2004-01-02 05:46:09 +0000
commit3a0b4328cb27080a75e6d055a3ab2d97fec84918 (patch)
tree4170fd7488608e57d0d8a8b05097ebbd5324966c
parentAdd in missing ASC/ASCQ descriptions for non-RAMDISK (i.e. (diff)
downloadwireguard-openbsd-3a0b4328cb27080a75e6d055a3ab2d97fec84918.tar.xz
wireguard-openbsd-3a0b4328cb27080a75e6d055a3ab2d97fec84918.zip
Treat all commands returning a sense data ASC of 0x29 as having
suffered a reset condition. Newer devices return a variety of ASCQ values now (0x00 -> 0x07) rather than just 0x00. Such commands will now be retried rather than returning EIO. Started off when Marco Peereboom's SCSI analyzer saw some ASC/ASCQ results of 0x29/0x02. ok miod@.
-rw-r--r--sys/scsi/scsi_base.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c
index dc63f43afbc..7dc66939cf5 100644
--- a/sys/scsi/scsi_base.c
+++ b/sys/scsi/scsi_base.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsi_base.c,v 1.46 2004/01/02 05:30:32 krw Exp $ */
+/* $OpenBSD: scsi_base.c,v 1.47 2004/01/02 05:46:09 krw Exp $ */
/* $NetBSD: scsi_base.c,v 1.43 1997/04/02 02:29:36 mycroft Exp $ */
/*
@@ -723,8 +723,7 @@ scsi_interpret_sense(xs)
error = EINVAL;
break;
case SKEY_UNIT_ATTENTION:
- if (sense->add_sense_code == 0x29 &&
- sense->add_sense_code_qual == 0x00)
+ if (sense->add_sense_code == 0x29)
return (ERESTART); /* device or bus reset */
if ((sc_link->flags & SDEV_REMOVABLE) != 0)
sc_link->flags &= ~SDEV_MEDIA_LOADED;