Skip to content

Commit

Permalink
[SCSI] sd: quiet spurious error messages in READ_CAPACITY(16)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hannes Reinecke authored and James Bottomley committed Apr 11, 2010
1 parent 457549d commit f87146b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/scsi/sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1573,6 +1573,8 @@ static int read_capacity_10(struct scsi_disk *sdkp, struct scsi_device *sdp,

static int sd_try_rc16_first(struct scsi_device *sdp)
{
if (sdp->host->max_cmd_len < 16)
return 0;
if (sdp->scsi_level > SCSI_SPC_2)
return 1;
if (scsi_device_protection(sdp))
Expand Down

0 comments on commit f87146b

Please sign in to comment.