>>>>> "Alan" == Alan Stern <st...@rowland.harvard.edu> writes:

Alan> On Mon, 29 Jul 2013, Stuart Foster wrote:
>> Hi Alan,
>> 
>> The patch is good for me.
>> 
>> thanks

Alan> There also have been positive reports from Marc Meledandri and
Alan> Philipp Dreimann.

Alan> Martin, please submit your patch for inclusion in the stable
Alan> kernels as soon as possible.

James?

[PATCH] SCSI: Don't attempt to send extended INQUIRY command if skip_vpd_pages 
is set

If a device has the skip_vpd_pages flag set we should simply fail the
scsi_get_vpd_page() call.

Signed-off-by: Martin K. Petersen <martin.peter...@oracle.com>
Acked-by: Alan Stern <st...@rowland.harvard.edu>
Tested-by: Stuart Foster <smf.li...@ntlworld.com>
Cc: sta...@vger.kernel.org

diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 3b1ea34..eaa808e 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -1031,6 +1031,9 @@ int scsi_get_vpd_page(struct scsi_device *sdev, u8 page, 
unsigned char *buf,
 {
        int i, result;
 
+       if (sdev->skip_vpd_pages)
+               goto fail;
+
        /* Ask for all the pages supported by this device */
        result = scsi_vpd_inquiry(sdev, buf, 0, buf_len);
        if (result)
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to