Re: [PATCH 5/7] pci: Export the pci_restore_msi_state() function

2007-10-22 Thread Michael Ellerman
On Mon, 2007-10-22 at 13:13 -0500, Linas Vepstas wrote: > On Mon, Oct 22, 2007 at 11:49:24AM +1000, Michael Ellerman wrote: > > > > On pseries there's a chance it will work for PCI error recovery, but if > > so it's just lucky that firmware has left everything configured the same > > way. > > ?

Re: [BUG] powerpc does not save msi state [was Re: [PATCH 5/7] pci: Export the pci_restore_msi_state() function

2007-10-22 Thread Benjamin Herrenschmidt
On Mon, 2007-10-22 at 17:23 -0700, David Miller wrote: > From: [EMAIL PROTECTED] (Linas Vepstas) > Date: Mon, 22 Oct 2007 14:54:52 -0500 > > > As discussed in the other thread, I'll try to set up a patch > > for an arch callback for restoring msi state. >From what it looks like at this stage, pS

Re: [PATCH 5/7] pci: Export the pci_restore_msi_state() function

2007-10-22 Thread Benjamin Herrenschmidt
> > I don't know why you keep talking about powerpc laptops here ... > > Well, there are Apple laptops, right? Aren't those the "powermac" > platform? Now, I don't know if they support MSI, but if they do, > I get the impression that they might not restore msi state correctly, > after being p

Re: [BUG] powerpc does not save msi state [was Re: [PATCH 5/7] pci: Export the pci_restore_msi_state() function

2007-10-22 Thread David Miller
From: [EMAIL PROTECTED] (Linas Vepstas) Date: Mon, 22 Oct 2007 14:54:52 -0500 > As discussed in the other thread, I'll try to set up a patch > for an arch callback for restoring msi state. Thank you. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [

Re: [PATCH 5/7] pci: Export the pci_restore_msi_state() function

2007-10-22 Thread Linas Vepstas
On Tue, Oct 23, 2007 at 07:24:27AM +1000, Benjamin Herrenschmidt wrote: > > On Mon, 2007-10-22 at 13:13 -0500, Linas Vepstas wrote: > > On Mon, Oct 22, 2007 at 11:49:24AM +1000, Michael Ellerman wrote: > > > > > > On pseries there's a chance it will work for PCI error recovery, but if > > > so it

Re: [PATCH 5/7] pci: Export the pci_restore_msi_state() function

2007-10-22 Thread Benjamin Herrenschmidt
On Mon, 2007-10-22 at 13:13 -0500, Linas Vepstas wrote: > On Mon, Oct 22, 2007 at 11:49:24AM +1000, Michael Ellerman wrote: > > > > On pseries there's a chance it will work for PCI error recovery, but if > > so it's just lucky that firmware has left everything configured the same > > way. > > ?

Re: [BUG] powerpc does not save msi state [was Re: [PATCH 5/7] pci: Export the pci_restore_msi_state() function

2007-10-22 Thread Linas Vepstas
On Fri, Oct 19, 2007 at 05:53:08PM -0700, David Miller wrote: > From: [EMAIL PROTECTED] (Linas Vepstas) > Date: Fri, 19 Oct 2007 19:46:10 -0500 > > > FWIW, it looks like not all that many arches do this; the output > > for grep -r address_hi * is pretty thin. Then, looking at > > i386/kernel/io_ap

Re: [PATCH 5/7] pci: Export the pci_restore_msi_state() function

2007-10-22 Thread Linas Vepstas
On Sun, Oct 21, 2007 at 09:45:20PM -0700, David Miller wrote: > > The core issue is that the ARCH level MSI code invokes > write_msi_msg(), not the generic code, exactly because there > are platform level issues wherein the firmware is the only > legal way to write the MSI settings in PCI config s

Re: [PATCH 5/7] pci: Export the pci_restore_msi_state() function

2007-10-22 Thread Linas Vepstas
On Mon, Oct 22, 2007 at 11:49:24AM +1000, Michael Ellerman wrote: > > On pseries there's a chance it will work for PCI error recovery, but if > so it's just lucky that firmware has left everything configured the same > way. ? The papr is quite clear that i is up to the OS to restore the msi stat

Re: [PATCH 5/7] pci: Export the pci_restore_msi_state() function

2007-10-22 Thread Linas Vepstas
On Sun, Oct 21, 2007 at 04:21:31PM -0700, David Miller wrote: > From: "Matt Carlson" <[EMAIL PROTECTED]> > Date: Fri, 19 Oct 2007 14:36:56 -0700 > > > This patch exports the pci_restore_msi_state() function. This function > > is needed to restore the MSI state during PCI error recovery. > > > >

Re: [PATCH 5/7] pci: Export the pci_restore_msi_state() function

2007-10-21 Thread David Miller
From: "Michael Chan" <[EMAIL PROTECTED]> Date: Sun, 21 Oct 2007 21:01:17 -0700 > David Miller wrote: > > > I'm not so sure about this. > > > > Perhaps, instead, you should do a pci_msi_disable() and > > pci_msi_enable() in the error detection and recovery sequence. > > If we just detected PCI e

Re: [PATCH 5/7] pci: Export the pci_restore_msi_state() function

2007-10-21 Thread Michael Chan
David Miller wrote: > I'm not so sure about this. > > Perhaps, instead, you should do a pci_msi_disable() and > pci_msi_enable() in the error detection and recovery sequence. If we just detected PCI errors on this slot, I don't think it's a good idea to continue writing to the config space to di

Re: [PATCH 5/7] pci: Export the pci_restore_msi_state() function

2007-10-21 Thread Michael Ellerman
On Sun, 2007-10-21 at 16:21 -0700, David Miller wrote: > From: "Matt Carlson" <[EMAIL PROTECTED]> > Date: Fri, 19 Oct 2007 14:36:56 -0700 > > > This patch exports the pci_restore_msi_state() function. This function > > is needed to restore the MSI state during PCI error recovery. > > > > Signed-

Re: [PATCH 5/7] pci: Export the pci_restore_msi_state() function

2007-10-21 Thread David Miller
From: "Matt Carlson" <[EMAIL PROTECTED]> Date: Fri, 19 Oct 2007 14:36:56 -0700 > This patch exports the pci_restore_msi_state() function. This function > is needed to restore the MSI state during PCI error recovery. > > Signed-off-by: Linas Vepstas <[EMAIL PROTECTED]> > Signed-off-by: Matt Carls

Re: [BUG] powerpc does not save msi state [was Re: [PATCH 5/7] pci: Export the pci_restore_msi_state() function

2007-10-21 Thread Benjamin Herrenschmidt
> That's a pity, but AFAIK it shouldn't be a problem because we don't > enable CONFIG_PM on those machines anyway. If we ever want to we'll need > to sort out with firmware how that will work WRT restoring MSI state. I think the current generic code for pci_restore_msi_state() or whatever it's ca

Re: [BUG] powerpc does not save msi state [was Re: [PATCH 5/7] pci: Export the pci_restore_msi_state() function

2007-10-19 Thread Michael Ellerman
On Fri, 2007-10-19 at 17:53 -0700, David Miller wrote: > From: [EMAIL PROTECTED] (Linas Vepstas) > Date: Fri, 19 Oct 2007 19:46:10 -0500 > > > FWIW, it looks like not all that many arches do this; the output > > for grep -r address_hi * is pretty thin. Then, looking at > > i386/kernel/io_apic.c a

Re: [BUG] powerpc does not save msi state [was Re: [PATCH 5/7] pci: Export the pci_restore_msi_state() function

2007-10-19 Thread Benjamin Herrenschmidt
> I'm cc'ing the powerpc mailing list to point this out: > it looks like only cell/axon_msi.c and mpic_u3msi.c > bother do do anything. I guess that there aren't any old > macintosh laptops that have msi on them? Because without > this, suspend and resume breaks. The only macs that can do any

Re: [BUG] powerpc does not save msi state [was Re: [PATCH 5/7] pci: Export the pci_restore_msi_state() function

2007-10-19 Thread David Miller
From: [EMAIL PROTECTED] (Linas Vepstas) Date: Fri, 19 Oct 2007 19:46:10 -0500 > FWIW, it looks like not all that many arches do this; the output > for grep -r address_hi * is pretty thin. Then, looking at > i386/kernel/io_apic.c as an example, one can see that the > msi state save happens "by acc

[BUG] powerpc does not save msi state [was Re: [PATCH 5/7] pci: Export the pci_restore_msi_state() function

2007-10-19 Thread Linas Vepstas
Hi, On Fri, Oct 19, 2007 at 05:27:06PM -0700, David Miller wrote: > From: [EMAIL PROTECTED] (Linas Vepstas) > Date: Fri, 19 Oct 2007 19:04:21 -0500 > > > I'm working in linux-2.6.23-rc8-mm1 at the moment, and I don't see > > that happening. viz. read_msi_msg() is not called anywhere, and I need >

Re: [PATCH 5/7] pci: Export the pci_restore_msi_state() function

2007-10-19 Thread David Miller
From: [EMAIL PROTECTED] (Linas Vepstas) Date: Fri, 19 Oct 2007 19:04:21 -0500 > I'm working in linux-2.6.23-rc8-mm1 at the moment, and I don't see > that happening. viz. read_msi_msg() is not called anywhere, and I need > to have valid msg->address_lo and msg->address_hi and msg->data > in order t

Re: [PATCH 5/7] pci: Export the pci_restore_msi_state() function

2007-10-19 Thread Linas Vepstas
On Fri, Oct 19, 2007 at 06:12:03PM -0700, Michael Chan wrote: > On Fri, 2007-10-19 at 19:04 -0500, [EMAIL PROTECTED] wrote: > > I'm working in linux-2.6.23-rc8-mm1 at the moment, and I don't see > > that happening. viz. read_msi_msg() is not called anywhere, and I need > > to have valid msg->addres

Re: [PATCH 5/7] pci: Export the pci_restore_msi_state() function

2007-10-19 Thread Michael Chan
On Fri, 2007-10-19 at 19:04 -0500, [EMAIL PROTECTED] wrote: > I'm working in linux-2.6.23-rc8-mm1 at the moment, and I don't see > that happening. viz. read_msi_msg() is not called anywhere, and I need > to have valid msg->address_lo and msg->address_hi and msg->data > in order to be able to restor

Re: [PATCH 5/7] pci: Export the pci_restore_msi_state() function

2007-10-19 Thread Linas Vepstas
On Fri, Oct 19, 2007 at 05:36:17PM -0700, Michael Chan wrote: > On Fri, 2007-10-19 at 18:29 -0500, [EMAIL PROTECTED] wrote: > > On Fri, Oct 19, 2007 at 02:36:56PM -0700, Matt Carlson wrote: > > > This patch exports the pci_restore_msi_state() function. This function > > > is needed to restore the

Re: [PATCH 5/7] pci: Export the pci_restore_msi_state() function

2007-10-19 Thread Michael Chan
On Fri, 2007-10-19 at 18:29 -0500, [EMAIL PROTECTED] wrote: > On Fri, Oct 19, 2007 at 02:36:56PM -0700, Matt Carlson wrote: > > This patch exports the pci_restore_msi_state() function. This function > > is needed to restore the MSI state during PCI error recovery. > > > > Signed-off-by: Linas Vep

Re: [PATCH 5/7] pci: Export the pci_restore_msi_state() function

2007-10-19 Thread Linas Vepstas
On Fri, Oct 19, 2007 at 02:36:56PM -0700, Matt Carlson wrote: > This patch exports the pci_restore_msi_state() function. This function > is needed to restore the MSI state during PCI error recovery. > > Signed-off-by: Linas Vepstas <[EMAIL PROTECTED]> > Signed-off-by: Matt Carlson <[EMAIL PROTECT

[PATCH 5/7] pci: Export the pci_restore_msi_state() function

2007-10-19 Thread Matt Carlson
This patch exports the pci_restore_msi_state() function. This function is needed to restore the MSI state during PCI error recovery. Signed-off-by: Linas Vepstas <[EMAIL PROTECTED]> Signed-off-by: Matt Carlson <[EMAIL PROTECTED]> Signed-off-by: Michael Chan <[EMAIL PROTECTED]> diff --git a/drive