Re: 3.2.11: PCI Express card cannot be re-detected withing cca 60sectimeframe

From: Sarah Sharp
Date: Sat Apr 21 2012 - 09:25:58 EST


On Fri, Apr 20, 2012 at 05:09:48PM -0700, Yinghai Lu wrote:
> On Fri, Apr 20, 2012 at 4:17 PM, Sarah Sharp
> <sarah.a.sharp@xxxxxxxxxxxxxxx> wrote:
> > On Fri, Apr 20, 2012 at 11:47:14AM -0700, Yinghai Lu wrote:
> >> On Fri, Apr 20, 2012 at 10:28 AM, Martin Mokrejs
> >> <mmokrejs@xxxxxxxxxxxxxxxxxx> wrote:
> >> > [30720.175637] pciehp 0000:00:1c.7:pcie04: pcie_isr: intr_loc 108
> >> > [30720.175639] pciehp 0000:00:1c.7:pcie04: LinkState change
> >> > [30720.175643] pciehp 0000:00:1c.7:pcie04: lnk_status = 5011
> >> > [30720.175644] pciehp 0000:00:1c.7:pcie04: Presence/Notify input change
> >> > [30720.175648] pciehp 0000:00:1c.7:pcie04: Card not present on Slot(7)
> >> > [30720.175687] pciehp 0000:00:1c.7:pcie04: Surprise Removal
> >> > [30720.175718] pciehp 0000:00:1c.7:pcie04: Disabling domain:bus:device=0000:11:00
> >> > [30720.175721] pciehp 0000:00:1c.7:pcie04: pciehp_unconfigure_device: domain:bus:dev = 0000:11:00
> >> >
> >>
> >> So the USB host control driver xhci put that 11:00.0 in strange power state.
> >
> > What do you mean "strange power state"?  The only PCI power states the
> > xHCI driver will use is D0 or D3hot.  D3hot is entered automatically by
> > the USB core runtime PM system when all USB devices are disconnected or
> > suspended.  So what strange power state are we talking about?
>
> that's helpful. Can that feature to be disabled?

Yes. There are several ways to disable automatic entry into D3hot.
The easiest way is to turn off CONFIG_USB_SUSPEND, which will disable
USB autosuspend (and subsequent runtime PM entry into D3hot) for all USB
hosts and devices.

If you want a dynamic test, you can go into the USB host sysfs files in
/sys/bus/usb/devices/usbN/power/ (where N is the bus number) and echo
"on" to the control file. Echo "auto" to turn runtime PM back on. The
xHCI driver will register two USB buses, so it's better to turn all the
usbN hosts on for this test.

Alternately, you can also use powertop, go to the Tunables tab, and
change line like this:

>> Good Autosuspend for USB device EHCI Host Controller [usb7]

>From "Good" to "Bad" for the xHCI host.

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