summaryrefslogtreecommitdiff
path: root/extras/scsi_id/scsi_serial.c
diff options
context:
space:
mode:
authorGreg KH <greg@press.(none)>2005-07-14 14:13:34 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2005-07-14 14:13:34 -0700
commit39e54555a961fa6c4c8e7d260a0e208439dc0cfa (patch)
tree4e38039e46fd5505c6079f39d056c301b9be7074 /extras/scsi_id/scsi_serial.c
parentafd6b4acc8ce76f1187bf852b1404a82047d8f97 (diff)
parent7fe082a8a42baa45ef45d82edde4f893410ebeea (diff)
Merge gregkh@ehlo.org:/home/kay/public_html/pub/scm/linux/hotplug/udev-kay
Diffstat (limited to 'extras/scsi_id/scsi_serial.c')
-rw-r--r--extras/scsi_id/scsi_serial.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/extras/scsi_id/scsi_serial.c b/extras/scsi_id/scsi_serial.c
index 20a7928553..7bfa9d1812 100644
--- a/extras/scsi_id/scsi_serial.c
+++ b/extras/scsi_id/scsi_serial.c
@@ -89,6 +89,7 @@ static const char hex_str[]="0123456789abcdef";
#define SG_ERR_CAT_RESET 2 /* interpreted from sense buffer */
#define SG_ERR_CAT_TIMEOUT 3
#define SG_ERR_CAT_RECOVERED 4 /* Successful command after recovered err */
+#define SG_ERR_CAT_NOTSUPPORTED 5 /* Illegal / unsupported command */
#define SG_ERR_CAT_SENSE 98 /* Something else in the sense buffer */
#define SG_ERR_CAT_OTHER 99 /* Some other error/warning */
@@ -130,6 +131,8 @@ static int sg_err_category_new(int scsi_status, int msg_status, int
return SG_ERR_CAT_MEDIA_CHANGED;
if (0x29 == asc)
return SG_ERR_CAT_RESET;
+ } else if (sense_key == ILLEGAL_REQUEST) {
+ return SG_ERR_CAT_NOTSUPPORTED;
}
}
return SG_ERR_CAT_SENSE;
@@ -331,6 +334,9 @@ resend:
retval = sg_err_category3(&io_hdr);
switch (retval) {
+ case SG_ERR_CAT_NOTSUPPORTED:
+ buf[1] = 0;
+ /* Fallthrough */
case SG_ERR_CAT_CLEAN:
case SG_ERR_CAT_RECOVERED:
retval = 0;