From 4601bd1df800786dcce1a8183b75dc487cf653f0 Mon Sep 17 00:00:00 2001 From: Yojiro Uo Date: Tue, 2 Jun 2009 06:33:05 +0000 Subject: 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@ --- sys/scsi/scsi_base.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'sys/scsi') 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); } -- cgit v1.2.3