aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2010-03-29 03:29:24 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-04-11 14:25:06 -0400
commitf87146bba523cad0196aa8e80ca9e8243d7a6c0c (patch)
tree87cc2f1a1dd4cc1771baab020d68bcb0a32de688 /drivers/scsi
parent457549da730ec43bdc594ec7b475464b9d52a15f (diff)
[SCSI] sd: quiet spurious error messages in READ_CAPACITY(16)
sd always tries to submit a READ_CAPACITY(16) CDB, regardless whether the host actually supports it. queuecommand() will then return DID_ABORT, which is not qualified enough to detect the true cause here. So better check in sd_try_rc16 first if the cdblen is supported. Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/sd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 58c62ff42ab3..7955bc226125 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -1573,6 +1573,8 @@ static int read_capacity_10(struct scsi_disk *sdkp, struct scsi_device *sdp,
1573 1573
1574static int sd_try_rc16_first(struct scsi_device *sdp) 1574static int sd_try_rc16_first(struct scsi_device *sdp)
1575{ 1575{
1576 if (sdp->host->max_cmd_len < 16)
1577 return 0;
1576 if (sdp->scsi_level > SCSI_SPC_2) 1578 if (sdp->scsi_level > SCSI_SPC_2)
1577 return 1; 1579 return 1;
1578 if (scsi_device_protection(sdp)) 1580 if (scsi_device_protection(sdp))