Re: Multiple drives on JMS56x-based sata-usb docking station.

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

 



On Mon, 27 Jul 2015, Giulio Bernardi wrote:

> Sorry for the late reply, but it took me a little bit to recompile the kernel 
> (my laptop is slow) and I was not able to obtain any meaningful results (please 
> note I know nothing about kernel internals).
> 
> However, i filled scsi_sequential_lun_scan() with printk's but none of them 
> appeared (yes, I did echo 7 > /proc/sys/kernel/printk).
> So I enabled logging for SCSI scan bus (echo 448 > 
> /proc/sys/dev/scsi/logging_level) and I did not see message "scsi scan: 
> Sequential scan\n" appearing. So I thought scsi_sequential_lun_scan() was not 
> being called.

That's strange.  If you look at __scsi_scan_target(), you'll see that 
the code calls scsi_probe_and_add_lun() for LUN 0, then it calls 
scsi_report_lun_scan() (which should return 1), and then it calls 
scsi_sequential_lun_scan().

You should check that scsi_report_lun_scan() really does return 1.  If
it returns 0 instead (because BLIST_NOLUN is set in bflags or for any
other reason), that would cause the behavior you see.

> So I recompiled usb_storage with CONFIG_USB_STORAGE_DEBUG=y, and I got this (it 
> looks like it is obtaining the max lun from some other routine?).

Yes, that comes from usb_stor_Bulk_max_lun() in 
drivers/usb/storage/transport.c.

> ----8<---------------------------------------------------------------
> usb 2-2: new high-speed USB device number 4 using ehci-pci
> usb 2-2: New USB device found, idVendor=152d, idProduct=1567
> usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=5
> usb 2-2: Product: JMS56x Series
> usb 2-2: Manufacturer: JMicron
> usb 2-2: SerialNumber: DB9876543211166
> usb 2-2: UAS is blacklisted for this device, using usb-storage instead
> usb-storage 2-2:1.0: USB Mass Storage device detected
> Vendor: 0x152d, Product: 0x1567, Revision: 0x0101
> Interface Subclass: 0x06, Protocol: 0x50
> usb-storage 2-2:1.0: Quirks match for vid 152d pid 1567: 800000
> Transport: Bulk
> Protocol: Transparent SCSI
> scsi host7: usb-storage 2-2:1.0
> usb-storage 2-2:1.0: waiting for device to settle before scanning
> *** thread sleeping
> usb-storage 2-2:1.0: starting scan
> rq=fe rqtype=a1 value=0000 index=00 len=1
> GetMaxLUN command result is 1, data is 0
> usb-storage 2-2:1.0: scan complete
> scsi host7: scsi_scan_host_selected: <4294967295:4294967295:18446744073709551615>
> scsi 7:0:0:0: scsi scan: INQUIRY pass 1 length 36
> ----8<---------------------------------------------------------------
> 
> Does this make any sense for you? I am a bit lost.

Only the last two lines in this log are relevant, and they don't 
contain any new information.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux