summaryrefslogtreecommitdiff
path: root/sys/scsi
diff options
context:
space:
mode:
authorYojiro Uo <yuo@cvs.openbsd.org>2009-06-02 06:33:05 +0000
committerYojiro Uo <yuo@cvs.openbsd.org>2009-06-02 06:33:05 +0000
commit4601bd1df800786dcce1a8183b75dc487cf653f0 (patch)
tree8260fc3cdd09b6dd0adf6a5b39b5b23a8c3d4191 /sys/scsi
parentc32ed3d048097125d70a12cfa079c32d45c27d10 (diff)
did not issue scsi_inquire with EVPD flag for USB mass strage class
device, as some devices will be stalled by the request. ok krw@
Diffstat (limited to 'sys/scsi')
-rw-r--r--sys/scsi/scsi_base.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c
index 3bb110c6e1f..0990920194a 100644
--- a/sys/scsi/scsi_base.c
+++ b/sys/scsi/scsi_base.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsi_base.c,v 1.131 2008/07/26 18:55:31 krw Exp $ */
+/* $OpenBSD: scsi_base.c,v 1.132 2009/06/02 06:33:04 yuo Exp $ */
/* $NetBSD: scsi_base.c,v 1.43 1997/04/02 02:29:36 mycroft Exp $ */
/*
@@ -358,9 +358,14 @@ scsi_inquire_vpd(struct scsi_link *sc_link, void *buf, u_int buflen,
bzero(buf, buflen);
- error = scsi_scsi_cmd(sc_link, (struct scsi_generic *)&scsi_cmd,
- sizeof(scsi_cmd), buf, buflen, 2, 10000, NULL,
- SCSI_DATA_IN | SCSI_SILENT | flags);
+ if (sc_link->flags & SDEV_UMASS) {
+ /* do nothing, just return */
+ error = EJUSTRETURN;
+ } else
+ error = scsi_scsi_cmd(sc_link,
+ (struct scsi_generic *)&scsi_cmd,
+ sizeof(scsi_cmd), buf, buflen, 2, 10000, NULL,
+ SCSI_DATA_IN | SCSI_SILENT | flags);
return (error);
}