Bug 96531 - USB3 external HDD not recognized [regression]
Summary: USB3 external HDD not recognized [regression]
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: USB (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Greg Kroah-Hartman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-12 17:10 UTC by Ralf
Modified: 2017-03-07 10:17 UTC (History)
1 user (show)

See Also:
Kernel Version: 3.16
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Ralf 2015-04-12 17:10:09 UTC
One of my external hard disks does not work anymore with current kernels, when I plug it into my USB3 port.

Steps to reproduce:
* Boot the system without the disk being connected
* Plug the disk into my Laptop's USB3 port
* Watch dmesg and my DE's removable media notification

Behaviour with kernel v3.16:
The following repeats in dmesg:

>>>>> bad (new kernel) dmesg start <<<<<<
[   62.057690] usb usb2: root hub lost power or was reset
[   62.057699] usb usb3: root hub lost power or was reset
[   62.062338] xhci_hcd 0000:04:00.0: irq 42 for MSI/MSI-X
[   62.062357] xhci_hcd 0000:04:00.0: irq 43 for MSI/MSI-X
[   62.062373] xhci_hcd 0000:04:00.0: irq 44 for MSI/MSI-X
[   62.062390] xhci_hcd 0000:04:00.0: irq 45 for MSI/MSI-X
[   62.062405] xhci_hcd 0000:04:00.0: irq 46 for MSI/MSI-X
>>>>> bad (new kernel) dmesg end <<<<<<

The disk is not recognized. It spins up though, so it seems to notice that there is "something" at the other end
of the cable. When I call "lsusb" with the disk connected (while the kernel prints all these errors), no additional device shows up.

Behaviour with v3.15 and older kernels (I tried v3.14):
The disk is recognized correctly, and I can access my data at USB3 speed.
Here's the dmesg that is printed in that case:

>>>>> successfull (old kernel) dmesg start <<<<<<
[   37.930632] usb usb1: root hub lost power or was reset
[   37.930641] usb usb3: root hub lost power or was reset
[   37.935270] xhci_hcd 0000:04:00.0: irq 43 for MSI/MSI-X
[   37.935290] xhci_hcd 0000:04:00.0: irq 44 for MSI/MSI-X
[   37.935308] xhci_hcd 0000:04:00.0: irq 45 for MSI/MSI-X
[   37.935324] xhci_hcd 0000:04:00.0: irq 46 for MSI/MSI-X
[   37.935338] xhci_hcd 0000:04:00.0: irq 47 for MSI/MSI-X
[   38.258763] usb 3-1: new SuperSpeed USB device number 2 using xhci_hcd
[   38.275187] usb 3-1: Parent hub missing LPM exit latency info.  Power management will be impacted.
[   38.276132] usb 3-1: New USB device found, idVendor=0bc2, idProduct=3312
[   38.276140] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   38.276144] usb 3-1: Product: Expansion Desk
[   38.276148] usb 3-1: Manufacturer: Seagate 
[   38.276152] usb 3-1: SerialNumber: NA4NANTR
[   38.301581] usb-storage 3-1:1.0: USB Mass Storage device detected
[   38.301753] scsi7 : usb-storage 3-1:1.0
[   38.301905] usbcore: registered new interface driver usb-storage
[   39.300862] scsi 7:0:0:0: Direct-Access     Seagate  Expansion Desk   0739 PQ: 0 ANSI: 6
[   39.301577] sd 7:0:0:0: Attached scsi generic sg3 type 0
[   39.303473] sd 7:0:0:0: [sdd] Spinning up disk...
[   44.758288] .........ready
[   52.799760] sd 7:0:0:0: [sdd] 1220942645 4096-byte logical blocks: (5.00 TB/4.54 TiB)
[   52.800311] sd 7:0:0:0: [sdd] Write Protect is off
[   52.800314] sd 7:0:0:0: [sdd] Mode Sense: 2b 00 10 08
[   52.800857] sd 7:0:0:0: [sdd] Write cache: enabled, read cache: enabled, supports DPO and FUA
[   52.801638] sd 7:0:0:0: [sdd] 1220942645 4096-byte logical blocks: (5.00 TB/4.54 TiB) 
[   53.080785]  sdd: sdd1                                                                
[   53.081595] sd 7:0:0:0: [sdd] 1220942645 4096-byte logical blocks: (5.00 TB/4.54 TiB) 
[   53.082717] sd 7:0:0:0: [sdd] Attached SCSI disk
>>>>> successfull (old kernel) dmesg end <<<<<<

Further information:
I reported this bug in Debian first, at <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=782442>. That page contains a lot of automatically gathered information about my Laptop model, loaded drivers, etc.
Interestingly, the bug already appears in version 3.14 of the Debian kernels. My assumption here is that it was introduced by some patch that ebian already applied with 3.14, but only landed upstream with 3.16.

With all kernels I tried, if I connect the same disk to a USB2 port, it works all right. But of course, disk access is much slower then.

The USB3 port also sometimes makes problems with other devices, but that's way less reproducible - hence I am concentrating on this particular disk. In particular, after unsuccessfully connecting the disk to the USB3 port, with high likelyhood, no USB device whatsoever will work on that port until a reboot.

I can do a git bisect when I am back from travel (in ~2 weeks), but I would appreciate some guess of which folder I should restrict the bisect to - otherwise, this would take way too long.
Comment 1 Greg Kroah-Hartman 2015-04-13 06:55:13 UTC
On Sun, Apr 12, 2015 at 05:10:09PM +0000, bugzilla-daemon@bugzilla.kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=96531
> 
>             Bug ID: 96531
>            Summary: USB3 external HDD not recognized [regression]

Please send to the linux-usb@vger.kernel.org mailing list
Comment 2 Ralf 2015-05-29 12:35:16 UTC
Just for the record: Through a I bisect, I identified the following:

d6236f6d1d885aa19d1cd7317346fe795227a3cc is the first bad commit
commit d6236f6d1d885aa19d1cd7317346fe795227a3cc
Author: Wang, Yu <yu.y.wang@intel.com>
Date:   Tue Jun 24 17:14:44 2014 +0300

    xhci: Fix runtime suspended xhci from blocking system suspend.

I confirmed that the bug is still present in 4.1-rc2, and that reverting above commit on top of 4.1-rc2 fixes the issue.

Furthermore, doing

  echo 'on' | tee /sys/bus/pci/devices/*/power/control 

before plugging in the disk is a work-around. I should note that I have udev set up to set power/control to "auto" for all PCI devices.
Comment 3 Szőgyényi Gábor 2017-03-06 20:28:09 UTC
Please try to reproduce this bug with latest kernel image.
Comment 4 Ralf 2017-03-07 10:17:51 UTC
Sorry, I don't own the laptop any more, so I cannot test this.

Note You need to log in before you can comment on or make changes to this bug.