[linux-pm] A reference implementation of PCI suspend/resume?

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

 



Hi,

On Monday, 16 of May 2005 22:16, Adam Belay wrote:
> On Fri, May 13, 2005 at 10:06:42PM -0700, Fabrice Gautier wrote:
> > Hi,
> > 
> > > From: Shaohua Li [mailto:shaohua.li@xxxxxxxxx] 
> > > Sent: Wednesday, May 11, 2005 6:25 PM
> > > To: linux-pm
> > > Subject: [linux-pm] A reference implementation of PCI suspend/resume?
> > > 
> > > Hi,
> > > There are still many PCI drivers don't implement their 
> > > .suspend/.resume
> > > methods correctly. I felt it would be quite helpful there is 
> > > a reference
> > > implementation. Here is my thought:
> > > 
> > > [...snip...]
> > > 
> > > Currently many drivers don't call
> > > free_irq/request_irq/pci_disable_device, which makes unexpected
> > > interrupt occur and even break suspend/resume in some systems. 
> > 
> > I don't understand why not calling free_irq would cause unexpected
> > interrupts.
> 
> I don't think it would.

Please have a look at http://bugzilla.kernel.org/show_bug.cgi?id=4416
Perhaps you can figure out what else is going on there ...

> However, there are three reasons in favor of unregister PCI interrupts:
> 
> a.) the kernel will complain if the irq isn't handled, revealing a possible
> problem with the driver's suspend routine.
> 
> b.) You're assuming every device has its own interrupt.  This may not be the
> case.  Let's say one device was sharing interrupts with a few other devices.
> We don't want it's interrupt handler to mess up things when it tries to read
> hardware registers from a physically "off" device, as it may possibly generate
> errors.  Almost every interrupt handler assumes the device is "on", as it
> should.  Each interrupt handler has to ask its hardware if it generated the
> interrupt.
> 
> c.) Selective device suspending: obviously we don't want to leave stale
> interrupt handlers around.

I agree.

Greets,
Rafael
 

-- 
- Would you tell me, please, which way I ought to go from here?
- That depends a good deal on where you want to get to.
		-- Lewis Carroll "Alice's Adventures in Wonderland"

[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux