scsi: report 'INQUIRY result too short' once per host
[firefly-linux-kernel-4.4.55.git] / drivers / scsi / scsi_scan.c
index d01e423ef44b8588d34feb6453432cd938fed40e..403a63310fb1c36c921af7ad26f0ab87c9d80d4d 100644 (file)
@@ -702,9 +702,12 @@ static int scsi_probe_lun(struct scsi_device *sdev, unsigned char *inq_result,
         * strings.
         */
        if (sdev->inquiry_len < 36) {
-               sdev_printk(KERN_INFO, sdev,
-                           "scsi scan: INQUIRY result too short (%d),"
-                           " using 36\n", sdev->inquiry_len);
+               if (!sdev->host->short_inquiry) {
+                       shost_printk(KERN_INFO, sdev->host,
+                                   "scsi scan: INQUIRY result too short (%d),"
+                                   " using 36\n", sdev->inquiry_len);
+                       sdev->host->short_inquiry = 1;
+               }
                sdev->inquiry_len = 36;
        }