From f87146bba523cad0196aa8e80ca9e8243d7a6c0c Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Mon, 29 Mar 2010 09:29:24 +0200 Subject: [PATCH] [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 Signed-off-by: James Bottomley --- drivers/scsi/sd.c | 2 ++ 1 file changed, 2 insertions(+) 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, 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)) -- 2.34.1