ExpressCard/54 USB 3.0 adapter - PCI reset causes sluggish system

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I am seeking feedback on an issue with an ExpressCard/54 USB 3.0
adapter that uses the Renesas uPD72020x chipset on a Lenovo X220i
laptop.  After a recent discussion on the linux-usb mailing list, we
came to the conclusion that this seems to be a PCI issue.
(https://marc.info/?t=150565318600001&r=1&w=2)

For kernels versions >=4.12.8 the xhci driver performs a PCI reset for
Renesas cards using `pci_reset_function_locked` at boot time which
causes the card to stop responding: 

<snip>
Sep 22 04:54:13 trinity kernel: [    3.386192] xhci_hcd 0000:05:00.0:
  xHCI host controller not responding, assume dead
Sep 22 04:54:13 trinity kernel: [    3.386281] xhci_hcd 0000:05:00.0:
  remove, state 1
Sep 22 04:54:13 trinity kernel: [    3.386289] usb usb4: USB
  disconnect, device number 1
Sep 22 04:54:13 trinity kernel: [    3.386536] xhci_hcd 0000:05:00.0:
  USB bus 4 deregistered 
Sep 22 04:54:13 trinity kernel: [    3.387320] xhci_hcd 0000:05:00.0:
  remove, state 1
Sep 22 04:54:13 trinity kernel: [    3.387327] usb usb3: USB
  disconnect, device number 1
Sep 22 04:54:13 trinity kernel: [    3.390523] clocksource: Switched to
  clocksource tsc
Sep 22 04:54:13 trinity kernel: [    3.396867] xhci_hcd 0000:05:00.0:
  Host halt failed, -19
Sep 22 04:54:13 trinity kernel: [    3.396921] xhci_hcd 0000:05:00.0:
  Host not accessible, reset failed.
Sep 22 04:54:13 trinity kernel: [    3.397289] xhci_hcd 0000:05:00.0:
  USB bus 3 deregistered
</snip>

The system becomes very sluggish with considerable mouse pointer delays
that are followed by display driver errors such as
- pipe A vblank wait timed out
- pipe B vblank wait timed out
after some minutes.

In addition `/sys/bus/pci/slots/1/power` reports that the card is in
standby mode rather than active and it also does not show up in the
list of pci devices retrieved with `lspci`. Removing the card
immediately resolves these issues.

Please refer to
  https://weichselbraun.net/tmp/dmesg-4.13.3
  https://weichselbraun.net/tmp/dmesg-pipe-a-vblank-timeout.log
  https://weichselbraun.net/tmp/dmesg-pipe-b-vblank-timeout.log
for the full log messages.

The same problem can also be reproduced with pre 4.12.8 kernels by hot
plugging the card. Hot plugging does not yield any kernel messages but
only a sluggish system. Again `/sys/bus/pci/slots/1/power` reports the
card to be in standby mode.

There are some indications that this problem might be related to the
Lenovo laptop's power management:

 a) the card works out of the box with an HP Elitebook 8460p.
 
 b) disabling the PCI express power management in the Lenovo X220i's
    BIOS resolves the reported issue (the card work with all tested
    kernels (with/without PCI reset); even hot plugging works).

 c) with none-reset kernels (pre 4.12.8) it is possible to force a
	dysfunctional card (i.e., a card that has been removed and
    inserted again) to active mode by executing 
       echo 1 > /sys/bus/pci/slots/1/power 
    multiple times. Afterwards the card is fully operational.

    This is not possible with later kernel versions, since a PCI reset
    always leads to a dysfunctional card.

    Depending on whether this forced power-on works the kernel will log
    the following messages:
    - https://weichselbraun.net/tmp/force-power-failed.log
    - https://weichselbraun.net/tmp/force-power-succeeded.log

Any help would be highly appreciated. I am willing to retrieve more
information as well as to patch, compile and test possible fixes.

Cheers,
  Albert :)

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux