Home Home > GIT Browse > SLE15-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-09-08 09:15:21 +0200
committerTakashi Iwai <tiwai@suse.de>2019-09-08 09:15:21 +0200
commit3ed72dea1a4fe4895e59d421f9fa25c5f564ab30 (patch)
treeba31a17d26d6a5b27c71d04730f3498a318f208b
parent6326afcc67f453674ee6b88511c1634309be5181 (diff)
scsi: sd: Quiesce warning if device does not report optimal
I/O size (git-fixes). suse-commit: 4d227c6b38b81b1262ef87d4c6393092e469b4e4
-rw-r--r--drivers/scsi/sd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 88f8ea86b5a2..bf34425ae850 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -3120,6 +3120,9 @@ static bool sd_validate_opt_xfer_size(struct scsi_disk *sdkp,
unsigned int opt_xfer_bytes =
logical_to_bytes(sdp, sdkp->opt_xfer_blocks);
+ if (sdkp->opt_xfer_blocks == 0)
+ return false;
+
if (sdkp->opt_xfer_blocks > dev_max) {
sd_first_printk(KERN_WARNING, sdkp,
"Optimal transfer size %u logical blocks " \