kernel-packages team mailing list archive
-
kernel-packages team
-
Mailing list archive
-
Message #119172
[Bug 1455376] Re: REGRESSION after upgrade from 14.10 to 15.04: USB3 boot device lost during system boot: "xhci_hcd 0000:04:00.0: Error while assigning device slot ID" / "device not accepting address 2, error -22"
I took a different route and tried to find out what is going wrong with
the current code. I loaded the linux-source package and built kernel
3.19.3 versions with added debug messages in drivers/usb/core/hub.c to
see that is happening. I found the following chain of calls:
1. hub_port_reset()
2. > hub_port_wait_reset()
3. > > hub_port_status() returns port status 0x02C0 (USB_SS_PORT_LS_SS_INACTIVE)
4. > > hub_port_warm_reset_required() returns TRUE due to link_state == USB_SS_PORT_LS_SS_INACTIVE
5. > hub_port_wait_reset() returns -ENOTCONN due to the TRUE result from hub_port_warm_reset_required()
6. > hub_port_finish_reset(... *status = -ENOTCONN)
7. > > usb_set_device_state(udev, USB_STATE_NOTATTACHED)
And that's the problem: USB device state NOTATTACHED is a dead end as
usb_set_device_state() does not seem to allow ever leaving that state:
if (udev->state == USB_STATE_NOTATTACHED) {
; /* do nothing */
}
That seems bogus to me. A "warm reset" sounds like it is supposed to be
recoverable, but a port which ever runs into this state cannot recover
since the NOTATTACHED software state is a deathtrap.
I tried altering the end of hub_port_finish_reset() to:
if (udev)
usb_set_device_state(udev, *status
? USB_STATE_ATTACHED // FIX: was USB_STATE_NOTATTACHED
: USB_STATE_DEFAULT);
and that fixes the problem. The port is warm reset, the USB device is
set to a working state and the boot continues without problems.
However:
1. I'm not sure if this is the right place to fix the problem. Maybe
there are scenarios in which the "dead end" is needed. Then it would be
a better solution to change the status in a place where it is known that
a warm reset will be tried...
2. I cannot find any substantial difference in drivers/usb/core/hub.c
between kernel sources 3.17.8 and 3.18-rc1 which would explain why this
problem occurs so frequently with the latter, but not with the former.
So this may not be the root cause of my problem, but at least it's a way
to fix it, and from what I can tell, this is erroneous behavior which
requires fixing anyway.
Now, how to get this issue up with the experts on this code to discuss
if my findings are right and how to best fix it...?
** Changed in: linux (Ubuntu)
Status: Incomplete => Confirmed
--
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1455376
Title:
REGRESSION after upgrade from 14.10 to 15.04: USB3 boot device lost
during system boot: "xhci_hcd 0000:04:00.0: Error while assigning
device slot ID" / "device not accepting address 2, error -22"
Status in linux package in Ubuntu:
Confirmed
Bug description:
Booting Ubuntu 15.04 amd64 kernel "Linux version 3.19.0-16-generic
(buildd@komainu) (gcc version 4.9.2 (Ubuntu 4.9.2-10ubuntu13) )
#16-Ubuntu SMP Thu Apr 30 16:09:58 UTC 2015" on a Samsung RF711-S08
laptop (Sandy Bridge) from a USB3 stick connected to the USB3 port on
the righthand side, the boot stalls at the Ubuntu splash screen (with
the dots), with the USB3 stick LED showing no activity, eventually
dropping to the initramfs console. If I unplug and replug the USB3
stick during the stall period, the LED shows activity and the boot
proceeds.
The same USB3 stick boots on another laptop without any problems.
Excerpts from dmesg:
Recognition of the USB3 port:
[ 1.643737] xhci_hcd 0000:04:00.0: xHCI Host Controller
[ 1.643741] xhci_hcd 0000:04:00.0: new USB bus registered, assigned bus number 2
[ 1.646775] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[ 1.646777] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1.646778] usb usb2: Product: xHCI Host Controller
[ 1.646780] usb usb2: Manufacturer: Linux 3.19.0-16-generic xhci-hcd
[ 1.646781] usb usb2: SerialNumber: 0000:04:00.0
[ 1.646886] hub 2-0:1.0: USB hub found
[ 1.646895] hub 2-0:1.0: 2 ports detected
Failure to initialize the USB3 device:
[ 1.847589] xhci_hcd 0000:04:00.0: Error while assigning device slot ID
[ 1.847597] xhci_hcd 0000:04:00.0: Max number of devices this xHCI host supports is 32.
[ 1.847600] usb usb2-port1: couldn't allocate usb_device
Replugged the USB3 device during the boot stall:
[ 13.861689] usb 2-1: new SuperSpeed USB device number 2 using xhci_hcd
[ 13.881832] usb 2-1: New USB device found, idVendor=0951, idProduct=162b
[ 13.881844] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 13.881850] usb 2-1: Product: DT HyperX 3.0
[ 13.881855] usb 2-1: Manufacturer: Kingston
[ 13.881860] usb 2-1: SerialNumber: *********************
[ 13.885561] usb-storage 2-1:1.0: USB Mass Storage device detected
[ 13.885829] scsi host6: usb-storage 2-1:1.0
[ 13.885901] usbcore: registered new interface driver usb-storage
[ 13.887130] usbcore: registered new interface driver uas
I assume the bug is at 1.847589.
---
ApportVersion: 2.17.2-0ubuntu1
Architecture: amd64
AudioDevicesInUse:
USER PID ACCESS COMMAND
/dev/snd/controlC0: robert 1480 F.... pulseaudio
CurrentDesktop: Unity
DistroRelease: Ubuntu 15.04
InstallationDate: Installed on 2012-12-07 (889 days ago)
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427)
MachineType: SAMSUNG ELECTRONICS CO., LTD. RF511/RF411/RF711
Package: linux (not installed)
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.19.0-16-generic root=UUID=51713370-20d5-4b75-ae59-7f6bda369278 ro quiet splash
ProcVersionSignature: Ubuntu 3.19.0-16.16-generic 3.19.3
RelatedPackageVersions:
linux-restricted-modules-3.19.0-16-generic N/A
linux-backports-modules-3.19.0-16-generic N/A
linux-firmware 1.143
Tags: vivid
Uname: Linux 3.19.0-16-generic x86_64
UpgradeStatus: Upgraded to vivid on 2015-04-23 (22 days ago)
UserGroups: adm admin cdrom dialout lpadmin mythtv plugdev sambashare
_MarkForUpload: True
dmi.bios.date: 11/27/2012
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 17HX.M045.20121127.SSH
dmi.board.asset.tag: To be filled by O.E.M.
dmi.board.name: RF511/RF411/RF711
dmi.board.vendor: SAMSUNG ELECTRONICS CO., LTD.
dmi.board.version: 17HX
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 9
dmi.chassis.vendor: SAMSUNG ELECTRONICS CO., LTD.
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr17HX.M045.20121127.SSH:bd11/27/2012:svnSAMSUNGELECTRONICSCO.,LTD.:pnRF511/RF411/RF711:pvr17HX:rvnSAMSUNGELECTRONICSCO.,LTD.:rnRF511/RF411/RF711:rvr17HX:cvnSAMSUNGELECTRONICSCO.,LTD.:ct9:cvrN/A:
dmi.product.name: RF511/RF411/RF711
dmi.product.version: 17HX
dmi.sys.vendor: SAMSUNG ELECTRONICS CO., LTD.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1455376/+subscriptions