diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2005-05-28 04:08:40 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2005-05-28 04:08:40 +0000 |
commit | 19da88173cebc36d57d15b0842f8cc4c6696533a (patch) | |
tree | 1836807aaa08719f1899248bae25a54880a0a3f1 /sys/scsi | |
parent | d4bf69dc3311dc30b3e4564da4999af70b60eb21 (diff) |
Handle XS_SHORTSENSE error codes in ioctl situations. From NetBSD.
Fixes spurious error messages from cdparanoia when using ATAPI CDROM
in USB enclosure.
ok pascoe@.
Diffstat (limited to 'sys/scsi')
-rw-r--r-- | sys/scsi/scsi_ioctl.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/scsi/scsi_ioctl.c b/sys/scsi/scsi_ioctl.c index 686b84b6d37..d968e686b75 100644 --- a/sys/scsi/scsi_ioctl.c +++ b/sys/scsi/scsi_ioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi_ioctl.c,v 1.19 2004/12/26 21:22:14 miod Exp $ */ +/* $OpenBSD: scsi_ioctl.c,v 1.20 2005/05/28 04:08:39 krw Exp $ */ /* $NetBSD: scsi_ioctl.c,v 1.23 1996/10/12 23:23:17 christos Exp $ */ /* @@ -196,6 +196,12 @@ scsi_user_done(struct scsi_xfer *xs) bcopy(&xs->sense, screq->sense, screq->senselen); screq->retsts = SCCMD_SENSE; break; + case XS_SHORTSENSE: + SC_DEBUG(sc_link, SDEV_DB3, ("have short sense\n")); + screq->senselen_used = min(sizeof(xs->sense), SENSEBUFLEN); + bcopy(&xs->sense, screq->sense, screq->senselen); + screq->retsts = SCCMD_UNKNOWN; + break; case XS_DRIVER_STUFFUP: sc_print_addr(sc_link); printf("host adapter code inconsistency\n"); |