Re: [linux-pm] [PATCH] PCI PM: Restore standard config registers of all devices early (was: Re: EeePC resume failure - timers)

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

 



On Friday 16 January 2009, Alan Stern wrote:
> On Fri, 16 Jan 2009, Rafael J. Wysocki wrote:
> 
> > There is a problem in our handling of suspend-resume of PCI devices
> > that many of them have their standard config registers restored with
> > interrupts enabled and they are put into the full power state with
> > interrupts enabled as well.  This may lead to the following scenario:
> > * an interrupt vector is shared between two or more devices
> > * one device is resumed earlier and generates an interrupt
> > * the interrupt handler of another device tries to handle it and
> >   attempts to access the device the config space of which hasn't
> >   been restored yet and/or which still is in a low power state
> > * the system crashes as a result
> > 
> > To prevent this from happening we should restore the standard
> > configuration registers of all devices with interrupts disabled and
> > we should put them into the D0 power state right after that.
> > Unfortunately, this cannot be done using the existing
> > pci_set_power_state(), because it can sleep.  Also, to do it we have
> > to make sure that the config spaces of all devices were actually
> > saved during suspend.
> 
> Alternatively, PCI drivers should be smart enough to realize that a
> shared interrupt arriving while their device is suspended could not
> possibly be generated by that device.  In such a case the driver can
> return IRQ_NONE directly, without ever touching the device.
> 
> USB does this.  However I admit that fixing every PCI driver would be a 
> big chore...

Well, that's the point. :-)

Thanks,
Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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