[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-usb
Subject:    Re: bisected regression, v3.5 -> next-20120724: PCI PM causes USB hotplug failure
From:       Alan Stern <stern () rowland ! harvard ! edu>
Date:       2012-07-31 17:07:56
Message-ID: Pine.LNX.4.44L0.1207311305120.1532-100000 () iolanthe ! rowland ! org
[Download RAW message or body]

On Tue, 31 Jul 2012, Huang Ying wrote:

> > What happens when you run lspci and the device is in D3cold?  Then even 
> > if the parent bridge is active, lspci will still fail.
> > 
> > It seems that in this case you need to resume the device itself, not 
> > just its parent.
> 
> How about the following patch?
> 
> Subject: [BUGFIX] PCI/PM: Keep parent bridge active when read/write config reg
> 
> This patch fixes the following bug:
> 
> http://marc.info/?l=linux-pci&m=134338059022620&w=2
> 
> Where lspci does not work properly if a device and the corresponding
> parent bridge (such as PCIe port) is suspended.  This is because the
> device configuration space registers will be not accessible if the
> corresponding parent bridge is suspended or the device is put into
> D3cold state.
> 
> To solve the issue, the bridge/PCIe port connected to the device is
> put into active state before read/write configuration space registers.
> If the device is in D3cold state, it will be put into active state
> too.
> 
> To avoid resume/suspend PCIe port for each configuration register
> read/write, a small delay is added before the PCIe port to go
> suspended.

The patch looks reasonable to me, but I haven't tested it.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic