lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 15 Apr 2014 15:02:07 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Stefani Seibold <stefani@...bold.net>
cc:	linux-usb <linux-usb@...r.kernel.org>,
	Kernel development list <linux-kernel@...r.kernel.org>,
	Greg KH <greg@...ah.com>,
	Sarah Sharp <sarah.a.sharp@...ux.intel.com>,
	<andreas.brief@...de-schwarz.com>
Subject: Re: Missing USB XHCI and EHCI reset for kexec

On Tue, 15 Apr 2014, Stefani Seibold wrote:

> I did a unbind and bind of the ehci-pci and ohci-pci, after this i got
> the following dmesg log:
> 
> ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
> ehci-pci: EHCI PCI platform driver
> ehci-pci 0000:00:17.2: EHCI Host Controller
> ehci-pci 0000:00:17.2: new USB bus registered, assigned bus number 1
> ehci-pci 0000:00:17.2: irq 22, io mem 0xc0006800
> ehci-pci 0000:00:17.2: USB 2.0 started, EHCI 1.00
> hub 1-0:1.0: USB hub found
> hub 1-0:1.0: 5 ports detected
> ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
> ohci_hcd 0000:00:17.0: OHCI Host Controller
> ohci_hcd 0000:00:17.0: new USB bus registered, assigned bus number 2
> ohci_hcd 0000:00:17.0: irq 20, io mem 0xc0004000
> hub 2-0:1.0: USB hub found
> hub 2-0:1.0: 3 ports detected
> ohci_hcd 0000:00:17.1: OHCI Host Controller
> ohci_hcd 0000:00:17.1: new USB bus registered, assigned bus number 3
> ohci_hcd 0000:00:17.1: irq 21, io mem 0xc0005000
> hub 3-0:1.0: USB hub found
> hub 3-0:1.0: 2 ports detected
...
> usbcore: registered new interface driver USB-SATA-storage
> USB SATA Mass Storage support registered.
> usb 1-4: new high-speed USB device number 4 using ehci-pci
> xxxx: ports detected

What driver is this?  I've never heard of USB-SATA-storage.

> ohci_hcd 0000:00:17.0: remove, state 1
> usb usb2: USB disconnect, device number 1
> usb 2-2: USB disconnect, device number 2
> usb 2-2.1: USB disconnect, device number 3
> usb 2-2.2: USB disconnect, device number 4
> ohci_hcd 0000:00:17.0: USB bus 2 deregistered
> ohci_hcd 0000:00:17.1: remove, state 1
> usb usb3: USB disconnect, device number 1
> ohci_hcd 0000:00:17.1: USB bus 3 deregistered
> ehci-pci 0000:00:17.2: remove, state 1
> usb usb1: USB disconnect, device number 1
> usb 1-2: USB disconnect, device number 2
> usb 1-4: USB disconnect, device number 4
> ehci-pci 0000:00:17.2: USB bus 1 deregistered
> ohci_hcd 0000:00:17.0: OHCI Host Controller
> ohci_hcd 0000:00:17.0: new USB bus registered, assigned bus number 1
> ohci_hcd 0000:00:17.0: irq 20, io mem 0xc0004000
> hub 1-0:1.0: USB hub found
> hub 1-0:1.0: 3 ports detected
> ohci_hcd 0000:00:17.1: OHCI Host Controller
> ohci_hcd 0000:00:17.1: new USB bus registered, assigned bus number 2
> ohci_hcd 0000:00:17.1: irq 21, io mem 0xc0005000
> hub 2-0:1.0: USB hub found
> hub 2-0:1.0: 2 ports detected
> ehci-pci 0000:00:17.2: EHCI Host Controller
> ehci-pci 0000:00:17.2: new USB bus registered, assigned bus number 3
> ehci-pci 0000:00:17.2: irq 22, io mem 0xc0006800
> ehci-pci 0000:00:17.2: USB 2.0 started, EHCI 1.00
> hub 3-0:1.0: USB hub found
> hub 3-0:1.0: 5 ports detected
> hub 1-0:1.0: USB hub found
> hub 1-0:1.0: 3 ports detected
> hub 2-0:1.0: USB hub found
> hub 2-0:1.0: 2 ports detected
> usb 3-2: new high-speed USB device number 2 using ehci-pci
> hub 3-2:1.0: USB hub found
> hub 3-2:1.0: 4 ports detected
> usb 3-4: new high-speed USB device number 4 using ehci-pci
> usb 3-4: device descriptor read/64, error -110
> usb 3-4: device descriptor read/64, error -110
> usb 3-4: new high-speed USB device number 5 using ehci-pci
> usb 3-4: device descriptor read/64, error -110
> usb 3-4: device descriptor read/64, error -110
> usb 3-4: new high-speed USB device number 6 using ehci-pci
> usb 3-4: device descriptor read/8, error -110
> usb 3-4: device descriptor read/8, error -110
> usb 3-4: new high-speed USB device number 7 using ehci-pci
> usb 3-4: device descriptor read/8, error -110
> usb 3-4: device descriptor read/8, error -110
> hub 3-0:1.0: unable to enumerate USB device on port 4
> usb 1-2: new full-speed USB device number 2 using ohci_hcd
> hub 1-2:1.0: USB hub found
> hub 1-2:1.0: 2 ports detected
> usb 2-2: new full-speed USB device number 2 using ohci_hcd
> usb 2-2: device descriptor read/64, error -110
> usb 2-2: device descriptor read/64, error -110
> usb 2-2: new full-speed USB device number 3 using ohci_hcd
> usb 2-2: device descriptor read/64, error -110
> usb 2-2: device descriptor read/64, error -110
> usb 2-2: new full-speed USB device number 4 using ohci_hcd
> usb 2-2: device descriptor read/8, error -110
> usb 2-2: device descriptor read/8, error -110
> usb 2-2: new full-speed USB device number 5 using ohci_hcd
> usb 2-2: device descriptor read/8, error -110
> usb 2-2: device descriptor read/8, error -110
> hub 2-0:1.0: unable to enumerate USB device on port 2
> usb 1-2.1: new full-speed USB device number 3 using ohci_hcd
> usb 1-2.2: new low-speed USB device number 4 using ohci_hcd
> input: Rohde&Schwarz FrontPanel USB Keyboard as /devices/pci0000:00/0000:00:17.0/usb1/1-2/1-2.2/1-2.2:1.0/input/input2
> input: Rohde&Schwarz FrontPanel USB Keyboard as /devices/pci0000:00/0000:00:17.0/usb1/1-2/1-2.2/1-2.2:1.1/input/input3

So two devices failed to initialize after the drivers were rebound: 3-4 
and 2-2.  We know that 3-4 was the mass-storage device, but I can't 
tell from this log what 2-2 was.  

> As you can see there is a difference between the USB port detected
> during the boot phase and after the unbind/bind:
> 
> hub 1-0:1.0: 5 ports detected
> hub 2-0:1.0: 3 ports detected
> hub 3-0:1.0: 2 ports detected
> hub 1-2:1.0: 4 ports detected
> hub 2-2:1.0: 2 ports detected
> 
> echo 0000:00:17.0 >/sys/bus/pci/drivers/ohci-pci/unbind
> echo 0000:00:17.1 >/sys/bus/pci/drivers/ohci-pci/unbind
> echo 0000:00:17.2 >/sys/bus/pci/drivers/ehci-pci/unbind
> 
> echo 0000:00:17.0 >/sys/bus/pci/drivers/ohci-pci/bind
> echo 0000:00:17.1 >/sys/bus/pci/drivers/ohci-pci/bind
> echo 0000:00:17.2 >/sys/bus/pci/drivers/ehci-pci/bind
> 
> hub 1-0:1.0: 3 ports detected
> hub 2-0:1.0: 2 ports detected
> hub 3-0:1.0: 5 ports detected
> hub 1-0:1.0: 3 ports detected
> hub 2-0:1.0: 2 ports detected
> hub 3-2:1.0: 4 ports detected
> hub 1-2:1.0: 2 ports detected
> 
> This was kernel 3.10, but i get similar results for 3.14

Of course.  This is because you rebound the drivers in a different 
order from the binding during boot.  During boot, the EHCI controller 
(17.2) was assigned to bus 1, and the two OHCI controllers (17.0 and 
17.2) were assigned to buses 2 and 3.

But when you rebound the drivers, you did 17.0 and 17.1 first, so they 
were assigned to buses 1 and 2.  Then 17.2 was assigned to bus 3.  If 
you had bound 17.2 and then 17.0 and 17.1, you would have gotten the 
same results as during boot.

I can't tell why the two devices failed to initialize.  Can you plug
either of them into an x86-based computer and see if it shows the same
behavior there?

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ