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

2015-07-22 Thread Giulio Bernardi
Hi everybody, I just bought an Inateck FD2003 docking station which is based on a JMicron "JMS56x Series" controller (152d:1567). This docking station can host two sata drives. It works perfectly when one drive is inserted (in whathever slot), but if I try to use two drives together, only th

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

2015-07-22 Thread Giulio Bernardi
Here is the output of usbmon - collected with "usbmon" program. The output seems the same of cat /sys/kernel/debug/usb/usbmon/0u with slightly more readable timestamps and shortened addresses so I used that. Giulio 8<--- 343a9e40

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

2015-07-24 Thread Giulio Bernardi
6.992972] usb 2-2: UAS is blacklisted for this device, using usb-storage instead [ 3666.992980] usb-storage 2-2:1.0: USB Mass Storage device detected [ 3666.993967] usb-storage 2-2:1.0: Quirks match for vid 152d pid 1567: 80 [ 3666.994293] scsi host6: usb-storage 2-2:1.0 [ 3666.994471] usb

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

2015-07-27 Thread Giulio Bernardi
scan: INQUIRY pass 1 length 36 8<--- Does this make any sense for you? I am a bit lost. Thank you Giulio On 24/07/2015 15:36, Alan Stern wrote: On Fri, 24 Jul 2015, Giulio Bernardi wrote: This is the trace I got after I used this o

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

2015-07-30 Thread Giulio Bernardi
On 27/07/2015 16:28, Alan Stern wrote: 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

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

2015-07-30 Thread Giulio Bernardi
On 30/07/2015 23:42, Giulio Bernardi wrote: On 27/07/2015 16:28, Alan Stern wrote: 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

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

2015-07-30 Thread Giulio Bernardi
On 31/07/2015 00:12, Giulio Bernardi wrote: On 30/07/2015 23:42, Giulio Bernardi wrote: On 27/07/2015 16:28, Alan Stern wrote: 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

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

2015-07-31 Thread Giulio Bernardi
On 31/07/2015 18:05, Alan Stern wrote: On Thu, 30 Jul 2015, Giulio Bernardi wrote: 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. I found the

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

2015-07-31 Thread Giulio Bernardi
On 31/07/2015 20:05, Giulio Bernardi wrote: On 31/07/2015 18:05, Alan Stern wrote: On Thu, 30 Jul 2015, Giulio Bernardi wrote: 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

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

2015-07-31 Thread Giulio Bernardi
On 31/07/2015 20:36, Alan Stern wrote: These things are not wildcards. Go look more carefully at my patch and figure out what is really happening. Alan Stern Ok, it turns out your patch is ok and I can confirm everything works as expected: this docking station is sometimes a bit loose so

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

2015-07-31 Thread Giulio Bernardi
On 31/07/2015 22:10, Giulio Bernardi wrote: On 31/07/2015 20:36, Alan Stern wrote: These things are not wildcards. Go look more carefully at my patch and figure out what is really happening. Alan Stern Ok, it turns out your patch is ok and I can confirm everything works as expected: this

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

2015-07-31 Thread Giulio Bernardi
On 31/07/2015 23:02, Alan Stern wrote: On Fri, 31 Jul 2015, Giulio Bernardi wrote: P.S: it looks like scsi_dev_info_list_del_keyed() shares the same code, so maybe it should be modified too? You're right. I'll split this into two patches: one to remove the duplicate code, and one