diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/scsi_scan.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index 803c7b9690c5..94b86d5b1469 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c | |||
@@ -853,6 +853,19 @@ static int scsi_probe_and_add_lun(struct scsi_target *starget, | |||
853 | goto out_free_result; | 853 | goto out_free_result; |
854 | } | 854 | } |
855 | 855 | ||
856 | /* | ||
857 | * Non-standard SCSI targets may set the PDT to 0x1f (unknown or | ||
858 | * no device type) instead of using the Peripheral Qualifier to | ||
859 | * indicate that no LUN is present. For example, USB UFI does this. | ||
860 | */ | ||
861 | if (starget->pdt_1f_for_no_lun && (result[0] & 0x1f) == 0x1f) { | ||
862 | SCSI_LOG_SCAN_BUS(3, printk(KERN_INFO | ||
863 | "scsi scan: peripheral device type" | ||
864 | " of 31, no device added\n")); | ||
865 | res = SCSI_SCAN_TARGET_PRESENT; | ||
866 | goto out_free_result; | ||
867 | } | ||
868 | |||
856 | res = scsi_add_lun(sdev, result, &bflags); | 869 | res = scsi_add_lun(sdev, result, &bflags); |
857 | if (res == SCSI_SCAN_LUN_PRESENT) { | 870 | if (res == SCSI_SCAN_LUN_PRESENT) { |
858 | if (bflags & BLIST_KEY) { | 871 | if (bflags & BLIST_KEY) { |