On Mon, November 23, 2015 1:24 pm, Alan Stern wrote: > On Mon, 23 Nov 2015, Patrick Shirkey wrote: > >> >> Is there a method to determine if the system has multiple or single >> >> controllers available? >> > >> > lspci will tell you. >> > >> >> Do you or anyone else here have a link to the sysfs command to unbind >> >> the >> >> controller? >> > >> > If you provide the output from "lspci", I will tell you what command >> to >> > use. >> > >> >> Here's the USB info from lspci. >> >> # lspci >> >> 00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset >> Family USB xHCI (rev 05) >> 00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series >> Chipset Family MEI Controller #1 (rev 04) >> 00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset >> Family USB EHCI #2 (rev 05) >> 00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset >> Family USB EHCI #1 (rev 05) > > The first one is the xHCI controller and the last two are EHCI > controllers. The command to unbind the xhci-hcd driver from the > controller is this (as root): > > echo 0000:00:14.0 >/sys/bus/pci/drivers/xhci_hcd/unbind > > To rebind the driver back to the controller, you do: > > echo 0000:00:14.0 >/sys/bus/pci/drivers/xhci_hcd/bind > > Thanks Alan, FYI, running these commands exhibits some interesting behavior on my machine. Unbinding disables all external ports. [7946053.417529] xhci_hcd 0000:00:14.0: remove, state 4 [7946053.417537] usb usb4: USB disconnect, device number 1 [7946053.418082] xhci_hcd 0000:00:14.0: USB bus 4 deregistered [7946053.418091] xhci_hcd 0000:00:14.0: remove, state 1 [7946053.418110] usb usb3: USB disconnect, device number 1 [7946053.418112] usb 3-1: USB disconnect, device number 2 [7946053.469171] usb 3-2: USB disconnect, device number 3 [7946053.469643] sd 196:0:0:0: [sdf] Synchronizing SCSI cache [7946053.469692] sd 196:0:0:0: [sdf] Synchronize Cache(10) failed: Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK [7946053.503557] usb 3-3: USB disconnect, device number 4 [7946053.531384] usb 3-4: USB disconnect, device number 5 [7946053.531389] usb 3-4.1: USB disconnect, device number 7 [7946053.531392] usb 3-4.1.1: USB disconnect, device number 10 [7946053.531394] usb 3-4.1.1.5: USB disconnect, device number 14 [7946053.532460] usb 3-4.2: USB disconnect, device number 9 [7946053.532465] usb 3-4.2.1: USB disconnect, device number 12 [7946053.532468] usb 3-4.2.1.5: USB disconnect, device number 17 [7946053.533093] usb 3-4.2.2: USB disconnect, device number 15 [7946053.533402] usb 3-4.2.5: USB disconnect, device number 19 [7946053.535962] usb 3-4.3: USB disconnect, device number 11 [7946053.535967] usb 3-4.3.1: USB disconnect, device number 16 [7946053.535970] usb 3-4.3.1.1: USB disconnect, device number 21 [7946053.536309] usb 3-4.3.1.3: USB disconnect, device number 24 [7946053.536559] usb 3-4.3.1.4: USB disconnect, device number 27 [7946053.536659] usb 3-4.3.1.5: USB disconnect, device number 30 [7946053.537003] usb 3-4.3.7: USB disconnect, device number 20 [7946053.539933] usb 3-4.4: USB disconnect, device number 13 [7946053.539938] usb 3-4.4.1: USB disconnect, device number 18 [7946053.539941] usb 3-4.4.1.1: USB disconnect, device number 23 [7946053.539944] usb 3-4.4.1.1.5: USB disconnect, device number 28 [7946053.542235] usb 3-4.4.1.5: USB disconnect, device number 25 [7946053.542711] usb 3-4.4.1.7: USB disconnect, device number 29 [7946053.543885] usb 3-4.4.2: USB disconnect, device number 22 [7946053.543890] usb 3-4.4.2.1: USB disconnect, device number 26 [7946053.546309] usb 3-5: USB disconnect, device number 6 [7946053.546968] usb 3-7: USB disconnect, device number 8 [7946053.613004] xhci_hcd 0000:00:14.0: USB bus 3 deregistered I see the following with lsusb after unbinding: # lsusb Bus 002 Device 002: ID 8087:8000 Intel Corp. Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 8087:8008 Intel Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub - Un/plugging devices appears to have no effect: - Binding enables all external ports again without un/plugging. Does this behavior suggest that even if I disable xHCI at BIOS level I may not be able to use the eHCI controllers stand alone on this machine or is there something else I can tweak at the system level? >> >> In regards to the last item can you provide some more details on why >> the >> >> software switch is only set if the kernel module is enable/disabled? >> >> >> >> I assume it has something to do with compiler flags and run time >> >> efficiency? >> > >> > No, it's simpler than that. If the kernel is built without support >> for >> > xHCI, it would be foolish to connect devices to the xHCI controller -- >> > then the system wouldn't be able to communicate with them! >> > >> > Conversely, if the kernel does have support for xHCI, we assume that >> > the user will prefer xHCI over EHCI if the motherboard has xHCI. >> > Therefore the switch does get set to connect devices to the xHCI >> > controller. >> > >> >> Obviously the solution above should suffice for my purposes but out of >> interest is it viable to make the switch accessible to run time >> configuration? > > I don't know. Mathias (the Linux xHCI maintainer) is the right person > to ask. > > Alan Stern > > -- Patrick Shirkey Boost Hardware Ltd -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html