Re: [RFC PATCH v2] scsi: scan: map PQ=1, PDT=other values to SCSI_SCAN_TARGET_PRESENT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2019-04-15 at 13:20 +-0800, Li Zhong wrote:
+AD4 diff --git a/drivers/scsi/scsi+AF8-scan.c b/drivers/scsi/scsi+AF8-scan.c
+AD4 index 53380e07b40e..058079f915f1 100644
+AD4 --- a/drivers/scsi/scsi+AF8-scan.c
+AD4 +-+-+- b/drivers/scsi/scsi+AF8-scan.c
+AD4 +AEAAQA -1129,7 +-1129,8 +AEAAQA static int scsi+AF8-probe+AF8-and+AF8-add+AF8-lun(struct scsi+AF8-target +ACo-starget,
+AD4          +ACo that no LUN is present, so don't add sdev in these cases.
+AD4          +ACo Two specific examples are:
+AD4          +ACo 1) NetApp targets: return PQ+AD0-1, PDT+AD0-0x1f
+AD4 -        +ACo 2) USB UFI: returns PDT+AD0-0x1f, with the PQ bits being +ACI-reserved+ACI
+AD4 +-        +ACo 2) IBM/2145 targets: return PQ+AD0-1, PDT+AD0-0
+AD4 +-        +ACo 3) USB UFI: returns PDT+AD0-0x1f, with the PQ bits being +ACI-reserved+ACI
+AD4          +ACo    in the UFI 1.0 spec (we cannot rely on reserved bits).
+AD4          +ACo
+AD4          +ACo References:
+AD4 +AEAAQA -1143,8 +-1144,8 +AEAAQA static int scsi+AF8-probe+AF8-and+AF8-add+AF8-lun(struct scsi+AF8-target +ACo-starget,
+AD4          +ACo PDT+AD0-00h Direct-access device (floppy)
+AD4          +ACo PDT+AD0-1Fh none (no FDD connected to the requested logical unit)
+AD4          +ACo-/
+AD4 -       if (((result+AFs-0+AF0 +AD4APg 5) +AD0APQ 1 +AHwAfA starget-+AD4-pdt+AF8-1f+AF8-for+AF8-no+AF8-lun) +ACYAJg
+AD4 -           (result+AFs-0+AF0 +ACY 0x1f) +AD0APQ 0x1f +ACYAJg
+AD4 +-       if (((result+AFs-0+AF0 +AD4APg 5) +AD0APQ 1 +AHwAfA
+AD4 +-           (starget-+AD4-pdt+AF8-1f+AF8-for+AF8-no+AF8-lun +ACYAJg (result+AFs-0+AF0 +ACY 0x1f) +AD0APQ 0x1f)) +ACYAJg
+AD4             +ACE-scsi+AF8-is+AF8-wlun(lun)) +AHs
+AD4                 SCSI+AF8-LOG+AF8-SCAN+AF8-BUS(3, sdev+AF8-printk(KERN+AF8-INFO, sdev,
+AD4                                         +ACI-scsi scan: peripheral device type+ACI

Neither the old nor the new code ignores the PQ bits for USB. But if that
wasn't an issue with the old code the new code should also be fine. Hence:

Reviewed-by: Bart Van Assche +ADw-bvanassche+AEA-acm.org+AD4





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux