# HP Scanjet 7400c seems not to like XHCI - what can I do?

## soulsource

I've got a nasty issue with my scanner, an HP 7400c, and my new PC. After several hours of wild guesses and experiments, I finally managed to find out that it has to do with the USB controller the scanner is being plugged into, or more precisely, if it's an OHCI or XHCI controller, and I'm wondering if there is a way to mimick OHCI behaviour with an XHCI controller, or another alternative to get the scanner working...

But let me start at the beginning: My old PC has had two USB controllers, an OHCI/EHCI and an XHCI one (It had an Asus M5A88-V EVO board). As my scanner is USB 1.1 (I think), I naturally had it plugged to the OHCI/EHCI controller, to keep the precious USB 3 ports available for hardware that can actually benefit from them. The scanner was working without issues (mostly - I had to mask sane-backends-1.0.25), and I did not expect it to be any different on my new PC (which has an MSI B350M Mortar mainboard). Reality of course turned out to be different. On the new PC the connection to the scanner is not stable enough to get it to work. Right after plugging in the USB cable, "scanimage -L" finds the scanner without any issues. After having it found once, the connection breaks down, and the output of "scanimage -L" changes between a working detection, an I/O error, and no scanners found. Scanning itself does not work at all. I've tried all USB ports on the new computer, but without any luck. When comparing the dmesg output of my old and new PC when plugging the scanner, I figured, that, even though the new PC has two "USB 2.0" ports, those also are wired to an XHCI controller, while on the old computer the USB 2.0 ports are OHCI/EHCI. What made me realize that the difference is probably caused by XHCI vs. OHCI was, that the scanner also fails to work, when being plugged to the USB 3.0 ports of the old computer (which are using an XHCI controller)...

While of course I can connect the scanner to the old computer and use that one for scanning, I'd really like to have it work with my new PC. 

So, long story short: Does anyone have this (or a similar) scanner working with an XHCI USB controller? If yes, how?

Are there any software options to tweak the behavior of an XHCI controller? Timings, maybe? Are there any hardware options?

Thanks in advance for any suggestions!

----------

## Ant P.

XHCI seems to cause no end of problems for everyone (no surprise - Intel wrote that driver), it's probably not your scanner that's the problem.

Sometimes disabling the XHCI module is enough to get the EHCI driver to run on the same hardware, but if you're unlucky all you can do is avoid those ports entirely.

----------

## NeddySeagoon

soulsource,

Please show us your hardware.  

```
lspci -nn
```

Put your kernel .config onto a pastebin too please.

----------

## soulsource

lspci:

https://pastebin.com/knFJWmNW

Kernel config:

https://pastebin.com/B6G74wh6

When I got the time I'll play around with disabling XHCI completely, maybe it'll help, although I'd prefer to still have USB 3 data transfer rates available on other ports...

Maybe also this helps:

```

# dmesg | grep ohci

[    4.267409] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver

[    4.267953] ohci-pci: OHCI PCI platform driver

# dmesg | grep uhci

[    4.268501] uhci_hcd: USB Universal Host Controller Interface driver

# dmesg | grep ehci

[    4.266339] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver

[    4.266866] ehci-pci: EHCI PCI platform driver

# dmesg | grep xhci

[    4.269139] xhci_hcd 0000:03:00.0: xHCI Host Controller

[    4.269734] xhci_hcd 0000:03:00.0: new USB bus registered, assigned bus number 1

[    4.325678] xhci_hcd 0000:03:00.0: hcc params 0x0200ef81 hci version 0x110 quirks 0x00000410

[    4.328096] usb usb1: Manufacturer: Linux 4.10.8-gentoo xhci-hcd

[    4.330836] xhci_hcd 0000:03:00.0: xHCI Host Controller

[    4.331470] xhci_hcd 0000:03:00.0: new USB bus registered, assigned bus number 2

[    4.334673] usb usb2: Manufacturer: Linux 4.10.8-gentoo xhci-hcd

[    4.337300] xhci_hcd 0000:21:00.3: xHCI Host Controller

[    4.337850] xhci_hcd 0000:21:00.3: new USB bus registered, assigned bus number 3

[    4.338522] xhci_hcd 0000:21:00.3: hcc params 0x0270f665 hci version 0x100 quirks 0x00000410

[    4.340852] usb usb3: Manufacturer: Linux 4.10.8-gentoo xhci-hcd

[    4.343262] xhci_hcd 0000:21:00.3: xHCI Host Controller

[    4.343860] xhci_hcd 0000:21:00.3: new USB bus registered, assigned bus number 4

[    4.347057] usb usb4: Manufacturer: Linux 4.10.8-gentoo xhci-hcd

[    4.653263] usb 3-1: new high-speed USB device number 2 using xhci_hcd

[    4.697267] usb 1-10: new full-speed USB device number 2 using xhci_hcd

[    4.931279] usb 3-2: new high-speed USB device number 3 using xhci_hcd

[    5.287302] usb 1-10.1: new full-speed USB device number 3 using xhci_hcd

[    5.389870] usb 3-2.1: new full-speed USB device number 4 using xhci_hcd

[    5.562227] usb 3-2.2: new high-speed USB device number 5 using xhci_hcd

[    5.717933] usb 3-2.3: new full-speed USB device number 6 using xhci_hcd

[    5.914243] usb 3-2.4: new full-speed USB device number 7 using xhci_hcd

```

[Moderator edit: changed [quote] tags to [code] tags to preserve output layout. -Hu]

----------

