Re: Kernel 3.16.0 USB crash
Hi to all, I've installed new 3.16.2 kernel, and now: - if I use an USB 3.0 cable I've same crash as said using 3.16.1 version; - if I use an USB 2.0 cable works, I've made a complete backup without any problem. As told, tell me if I can help your works to determine how to resolve this bug. Ciao Claudio 2014-08-23 12:07 GMT+02:00 Claudio Bizzarri claudio.bizza...@gmail.com: I must make a correction to what I said earlier: on kernel 3.16.1 if I use a normal micro USB cable (not USB 3.0 one) ... -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Kernel 3.16.0 USB crash
Ok, thank you Hans. When I connect my external USB disk I've 30 seconds before my laptop freezes: with top command I cannot view nothing: no abnormal cpu usage, no any strange memory usage. If I remove disk before 30 seconds my HP EliteBook 850G1 keeps working as usual. Can I use these 30 seconds to extract some informations that help to determine what's the problem? How? /var/log/syslog and dmesg haven't any messages. System lock is complete: also key CAPS LOCK does not work anymore. I've tried without X: when computer locks 3 lines appear on console that are not registered on syslog, I've copied them on paper. [ 1200.352042] IP: [8179393f] _raw_spin_lock_irqsave+ 0x01f/0x060 [ 1200.352045] PGD 0 [ 1200.352048] Oops: 0002 [#1] SMP Ciao, Claudio 2014-08-22 20:26 GMT+02:00 Hans de Goede hdego...@redhat.com: ... There is no need to try my patch, since the descriptors already limit qdepth to 32. No idea what is going on here then. -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Kernel 3.16.0 USB crash
Hi, On 08/15/2014 09:44 AM, Claudio Bizzarri wrote: On Thu, Aug 14, 2014 at 11:46:33AM +0200, Hans de Goede wrote: Hi, ... Can you collect lsusb -v output for the drive in question when connected through an usb-3 port (the uas module does not need to be loaded). Here lsusb output, full text as attachment Thanks. Bus 003 Device 003: ID 152d:0567 JMicron Technology Corp. / JMicron USA Technology Corp. Device Descriptor: bLength18 bDescriptorType 1 bcdUSB 3.00 bDeviceClass0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 9 idVendor 0x152d JMicron Technology Corp. / JMicron USA Technology Corp. idProduct 0x0567 bcdDevice0.00 iManufacturer 10 JMicron iProduct 11 USB to ATA/ATAPI Bridge iSerial 5 152D00539000 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 121 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xc0 Self Powered MaxPower2mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 8 Mass Storage bInterfaceSubClass 6 SCSI bInterfaceProtocol 80 Bulk-Only iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes2 Transfer TypeBulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 15 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes2 Transfer TypeBulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 15 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber0 bAlternateSetting 1 bNumEndpoints 4 bInterfaceClass 8 Mass Storage bInterfaceSubClass 6 SCSI bInterfaceProtocol 98 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x01 EP 1 OUT bmAttributes2 Transfer TypeBulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 0 Command pipe (0x01) Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes2 Transfer TypeBulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 0 MaxStreams 32 32, ok that is the amount which we know jmicron chips can handle over usb-2, so one would expect that having 32 outstanding commands will work when connected over usb-3 too. Status pipe (0x02) Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes2 Transfer TypeBulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 15 MaxStreams 32 Data-in pipe (0x03) Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x04 EP 4 OUT bmAttributes2 Transfer TypeBulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 15 MaxStreams 32 Data-out pipe (0x04) Binary Object Store Descriptor: bLength 5 bDescriptorType15 wTotalLength
Re: Kernel 3.16.0 USB crash
On Thu, Aug 14, 2014 at 11:46:33AM +0200, Hans de Goede wrote: Hi, ... Can you collect lsusb -v output for the drive in question when connected through an usb-3 port (the uas module does not need to be loaded). Here lsusb output, full text as attachment Bus 003 Device 003: ID 152d:0567 JMicron Technology Corp. / JMicron USA Technology Corp. Device Descriptor: bLength18 bDescriptorType 1 bcdUSB 3.00 bDeviceClass0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 9 idVendor 0x152d JMicron Technology Corp. / JMicron USA Technology Corp. idProduct 0x0567 bcdDevice0.00 iManufacturer 10 JMicron iProduct 11 USB to ATA/ATAPI Bridge iSerial 5 152D00539000 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 121 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xc0 Self Powered MaxPower2mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 8 Mass Storage bInterfaceSubClass 6 SCSI bInterfaceProtocol 80 Bulk-Only iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes2 Transfer TypeBulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 15 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes2 Transfer TypeBulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 15 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber0 bAlternateSetting 1 bNumEndpoints 4 bInterfaceClass 8 Mass Storage bInterfaceSubClass 6 SCSI bInterfaceProtocol 98 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x01 EP 1 OUT bmAttributes2 Transfer TypeBulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 0 Command pipe (0x01) Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes2 Transfer TypeBulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 0 MaxStreams 32 Status pipe (0x02) Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes2 Transfer TypeBulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 15 MaxStreams 32 Data-in pipe (0x03) Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x04 EP 4 OUT bmAttributes2 Transfer TypeBulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 15 MaxStreams 32 Data-out pipe (0x04) Binary Object Store Descriptor: bLength 5 bDescriptorType15 wTotalLength 22 bNumDeviceCaps 2 USB 2.0 Extension Device Capability: bLength 7 bDescriptorType16 bDevCapabilityType 2 bmAttributes 0x0002 Link Power Management (LPM) Supported SuperSpeed USB Device Capability: bLength10 bDescriptorType16 bDevCapabilityType 3
Re: Kernel 3.16.0 USB crash
Hi, On 08/14/2014 10:39 AM, Claudio Bizzarri wrote: Ciao, thank you very much for replay, you are right: it's UAS module. Now I'm using Ubuntu 14.04 with kernel 3.16.1 from http://kernel.ubuntu.com/~kernel-ppa/mainline/, there is no /proc/config.gz, but but there is a config file in /boot: b0@hp850ssd:~⟫ grep USB_UAS /boot/config-3.16.1-031601-generic CONFIG_USB_UAS=m When I attach my external USB disk I've 30 seconds before my laptop freeze, here is my dmesg output, disk is not mounted: Hmm, this sounds like a similar problem we've been having with JMicron UAS bridges over USB-2. Can you collect lsusb -v output for the drive in question when connected through an usb-3 port (the uas module does not need to be loaded). Also can you try the following patch, and see if that makes uas work ? : diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 511b229..6cdc1b9 100644 --- a/drivers/usb/storage/uas.c +++ b/drivers/usb/storage/uas.c @@ -1033,6 +1033,7 @@ static int uas_configure_endpoints(struct uas_dev_info *devinfo) 3, 256, GFP_NOIO); if (devinfo-qdepth 0) return devinfo-qdepth; + devinfo-qdepth = 32; devinfo-use_streams = 1; } This is in essence the fix we've done for using these devices with uas over usb-2, I would have expected this to not be be necessary at superspeed since there the number of streams the device supports is part of the usb descriptors, but maybe the device claims to support more streams then it can actually handle. Note I'm on vacation next week, so don't expect another reply from me in this thread for at least a week. Regards, Hans -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Kernel 3.16.0 USB crash
Adding Mathias Nyman. He is now the USB 3.0 maintainer. Sarah Sharp On Thu, Aug 14, 2014 at 11:46:33AM +0200, Hans de Goede wrote: Hi, On 08/14/2014 10:39 AM, Claudio Bizzarri wrote: Ciao, thank you very much for replay, you are right: it's UAS module. Now I'm using Ubuntu 14.04 with kernel 3.16.1 from http://kernel.ubuntu.com/~kernel-ppa/mainline/, there is no /proc/config.gz, but but there is a config file in /boot: b0@hp850ssd:~⟫ grep USB_UAS /boot/config-3.16.1-031601-generic CONFIG_USB_UAS=m When I attach my external USB disk I've 30 seconds before my laptop freeze, here is my dmesg output, disk is not mounted: Hmm, this sounds like a similar problem we've been having with JMicron UAS bridges over USB-2. Can you collect lsusb -v output for the drive in question when connected through an usb-3 port (the uas module does not need to be loaded). Also can you try the following patch, and see if that makes uas work ? : diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 511b229..6cdc1b9 100644 --- a/drivers/usb/storage/uas.c +++ b/drivers/usb/storage/uas.c @@ -1033,6 +1033,7 @@ static int uas_configure_endpoints(struct uas_dev_info *devinfo) 3, 256, GFP_NOIO); if (devinfo-qdepth 0) return devinfo-qdepth; + devinfo-qdepth = 32; devinfo-use_streams = 1; } This is in essence the fix we've done for using these devices with uas over usb-2, I would have expected this to not be be necessary at superspeed since there the number of streams the device supports is part of the usb descriptors, but maybe the device claims to support more streams then it can actually handle. Note I'm on vacation next week, so don't expect another reply from me in this thread for at least a week. Regards, Hans -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Kernel 3.16.0 USB crash
On Wed, Aug 13, 2014 at 10:24 PM, Matt jackdac...@gmail.com wrote: Hi Claudio, this issue is clearly caused by UAS. if zcat /proc/config.gz | grep UAS # CONFIG_USB_UAS is not set is de-selected, everything's fine when this is selected (usb is compiled as a module here) the system crashes or hardlocks as soon as an USB 3.0 capable drive is connected. During bootup the system crashes as soon as the kernel module is loaded. This happened for me with 3.15.6 and 3.16.0 kernel (and 3.16-rc6). I've a different chipset but the symptoms are similar: 00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 05) So the only solution to work with newer kernels right now is to de-select that option and re-compile the kernel. It doesn't help fix the problem but at least it mitigates the issues for now (crash). Regards Matt Adding some relevant CCs -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html