diff mbox

2.6.29-rc3: tg3 dead after resume

Message ID 200902032315.27113.rjw@sisk.pl
State RFC, archived
Delegated to: David Miller
Headers show

Commit Message

Rafael J. Wysocki Feb. 3, 2009, 10:15 p.m. UTC
On Tuesday 03 February 2009, Parag Warudkar wrote:
> 
> On Tue, 3 Feb 2009, Rafael J. Wysocki wrote:
> 
> > Did you have a chance to check if the patch from Linus (reproduced
> > below) on top of current -git fixed the problem for you too?
> > 
> Hi Rafael,
> 
> Yes, the patch below (atop today's git) does work for me.

Good.

Can you also test this one instead and tell me if it still works?

Rafael

---
 drivers/pci/pcie/portdrv_pci.c |   16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)


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

Comments

Parag Warudkar Feb. 4, 2009, 12:38 a.m. UTC | #1
On Tue, 3 Feb 2009, Rafael J. Wysocki wrote:

> 
> Can you also test this one instead and tell me if it still works?
> 

Removing Linus' patch and applying the below one works as well.

Parag
 
> ---
>  drivers/pci/pcie/portdrv_pci.c |   16 +---------------
>  1 file changed, 1 insertion(+), 15 deletions(-)
> 
> Index: linux-2.6/drivers/pci/pcie/portdrv_pci.c
> ===================================================================
> --- linux-2.6.orig/drivers/pci/pcie/portdrv_pci.c
> +++ linux-2.6/drivers/pci/pcie/portdrv_pci.c
> @@ -55,25 +55,13 @@ static int pcie_portdrv_suspend(struct p
>  
>  }
>  
> -static int pcie_portdrv_suspend_late(struct pci_dev *dev, pm_message_t state)
> -{
> -	return pci_save_state(dev);
> -}
> -
> -static int pcie_portdrv_resume_early(struct pci_dev *dev)
> -{
> -	return pci_restore_state(dev);
> -}
> -
>  static int pcie_portdrv_resume(struct pci_dev *dev)
>  {
> -	pcie_portdrv_restore_config(dev);
> +	pci_set_master(dev);
>  	return pcie_port_device_resume(dev);
>  }
>  #else
>  #define pcie_portdrv_suspend NULL
> -#define pcie_portdrv_suspend_late NULL
> -#define pcie_portdrv_resume_early NULL
>  #define pcie_portdrv_resume NULL
>  #endif
>  
> @@ -292,8 +280,6 @@ static struct pci_driver pcie_portdriver
>  	.remove		= pcie_portdrv_remove,
>  
>  	.suspend	= pcie_portdrv_suspend,
> -	.suspend_late	= pcie_portdrv_suspend_late,
> -	.resume_early	= pcie_portdrv_resume_early,
>  	.resume		= pcie_portdrv_resume,
>  
>  	.err_handler 	= &pcie_portdrv_err_handler,
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rafael J. Wysocki Feb. 4, 2009, 12:41 a.m. UTC | #2
On Wednesday 04 February 2009, Parag Warudkar wrote:
> 
> On Tue, 3 Feb 2009, Rafael J. Wysocki wrote:
> 
> > 
> > Can you also test this one instead and tell me if it still works?
> > 
> 
> Removing Linus' patch and applying the below one works as well.

Great, thanks for testing.

I'm going to push this one to Jesse.

Best,
Rafael


> > ---
> >  drivers/pci/pcie/portdrv_pci.c |   16 +---------------
> >  1 file changed, 1 insertion(+), 15 deletions(-)
> > 
> > Index: linux-2.6/drivers/pci/pcie/portdrv_pci.c
> > ===================================================================
> > --- linux-2.6.orig/drivers/pci/pcie/portdrv_pci.c
> > +++ linux-2.6/drivers/pci/pcie/portdrv_pci.c
> > @@ -55,25 +55,13 @@ static int pcie_portdrv_suspend(struct p
> >  
> >  }
> >  
> > -static int pcie_portdrv_suspend_late(struct pci_dev *dev, pm_message_t state)
> > -{
> > -	return pci_save_state(dev);
> > -}
> > -
> > -static int pcie_portdrv_resume_early(struct pci_dev *dev)
> > -{
> > -	return pci_restore_state(dev);
> > -}
> > -
> >  static int pcie_portdrv_resume(struct pci_dev *dev)
> >  {
> > -	pcie_portdrv_restore_config(dev);
> > +	pci_set_master(dev);
> >  	return pcie_port_device_resume(dev);
> >  }
> >  #else
> >  #define pcie_portdrv_suspend NULL
> > -#define pcie_portdrv_suspend_late NULL
> > -#define pcie_portdrv_resume_early NULL
> >  #define pcie_portdrv_resume NULL
> >  #endif
> >  
> > @@ -292,8 +280,6 @@ static struct pci_driver pcie_portdriver
> >  	.remove		= pcie_portdrv_remove,
> >  
> >  	.suspend	= pcie_portdrv_suspend,
> > -	.suspend_late	= pcie_portdrv_suspend_late,
> > -	.resume_early	= pcie_portdrv_resume_early,
> >  	.resume		= pcie_portdrv_resume,
> >  
> >  	.err_handler 	= &pcie_portdrv_err_handler,
> > 
> > 
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Linus Torvalds Feb. 7, 2009, 3 a.m. UTC | #3
On Wed, 4 Feb 2009, Rafael J. Wysocki wrote:

> On Wednesday 04 February 2009, Parag Warudkar wrote:
> > 
> > On Tue, 3 Feb 2009, Rafael J. Wysocki wrote:
> > 
> > > 
> > > Can you also test this one instead and tell me if it still works?
> > 
> > Removing Linus' patch and applying the below one works as well.
> 
> Great, thanks for testing.
> 
> I'm going to push this one to Jesse.

Jesse, should I take this directly (and presumably the related series by 
Rafael)?

I was going to release -rc4 this weekend (it's already more than a week - 
I'm bad), and I'd hate for pci-e bridges to not resume correctly. So I'd 
either like a pull request from you with the pending suspend fixes, or 
I'll just apply the patch(es) directly.

		Linus
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jesse Barnes Feb. 7, 2009, 6:03 p.m. UTC | #4
On Friday, February 6, 2009 7:00 pm Linus Torvalds wrote:
> On Wed, 4 Feb 2009, Rafael J. Wysocki wrote:
> > On Wednesday 04 February 2009, Parag Warudkar wrote:
> > > On Tue, 3 Feb 2009, Rafael J. Wysocki wrote:
> > > > Can you also test this one instead and tell me if it still works?
> > >
> > > Removing Linus' patch and applying the below one works as well.
> >
> > Great, thanks for testing.
> >
> > I'm going to push this one to Jesse.
>
> Jesse, should I take this directly (and presumably the related series by
> Rafael)?
>
> I was going to release -rc4 this weekend (it's already more than a week -
> I'm bad), and I'd hate for pci-e bridges to not resume correctly. So I'd
> either like a pull request from you with the pending suspend fixes, or
> I'll just apply the patch(es) directly.

Ok, you can just pull from me then.  /me uses request-pull wow that's easy.


The following changes since commit eda58a85ec3fc05855a26654d97a2b53f0e715b9: 
  Linus Torvalds (1):                                                        
        Merge branch 'for-linus' of git://git.kernel.org/.../cooloney/blackfin-2.6                                                                              

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 for-linus

Alex Chiang (1):
      PCI: properly clean up ASPM link state on device remove

Rafael J. Wysocki (7):
      PCI PM: Fix handling of devices without drivers
      PCI PM: Check if the state has been saved before trying to restore it
      PCI PM: Fix saving of device state in pci_legacy_suspend
      PCI: PCIe portdrv: Simplify suspend and resume
      PCI PM: Do not disable and enable bridges during suspend-resume
      PCI PM: Read power state from device after trying to change it on resume
      PCI PM: make the PM core more careful with drivers using the new PM framework

Timothy S. Nelson (1):
      PCI: return error on failure to read PCI ROMs

 Documentation/filesystems/sysfs-pci.txt |   13 +++-
 arch/ia64/sn/kernel/io_acpi_init.c      |    2 +-
 arch/ia64/sn/kernel/io_init.c           |    2 +-
 drivers/pci/pci-driver.c                |  164 ++++++++++++++++++++-----------
 drivers/pci/pci-sysfs.c                 |    4 +-
 drivers/pci/pci.c                       |    4 +-
 drivers/pci/pcie/aspm.c                 |    4 +-
 drivers/pci/pcie/portdrv_pci.c          |   16 +---
 drivers/pci/rom.c                       |    8 +-
 include/linux/pci.h                     |    2 +-
 10 files changed, 132 insertions(+), 87 deletions(-)
diff mbox

Patch

Index: linux-2.6/drivers/pci/pcie/portdrv_pci.c
===================================================================
--- linux-2.6.orig/drivers/pci/pcie/portdrv_pci.c
+++ linux-2.6/drivers/pci/pcie/portdrv_pci.c
@@ -55,25 +55,13 @@  static int pcie_portdrv_suspend(struct p
 
 }
 
-static int pcie_portdrv_suspend_late(struct pci_dev *dev, pm_message_t state)
-{
-	return pci_save_state(dev);
-}
-
-static int pcie_portdrv_resume_early(struct pci_dev *dev)
-{
-	return pci_restore_state(dev);
-}
-
 static int pcie_portdrv_resume(struct pci_dev *dev)
 {
-	pcie_portdrv_restore_config(dev);
+	pci_set_master(dev);
 	return pcie_port_device_resume(dev);
 }
 #else
 #define pcie_portdrv_suspend NULL
-#define pcie_portdrv_suspend_late NULL
-#define pcie_portdrv_resume_early NULL
 #define pcie_portdrv_resume NULL
 #endif
 
@@ -292,8 +280,6 @@  static struct pci_driver pcie_portdriver
 	.remove		= pcie_portdrv_remove,
 
 	.suspend	= pcie_portdrv_suspend,
-	.suspend_late	= pcie_portdrv_suspend_late,
-	.resume_early	= pcie_portdrv_resume_early,
 	.resume		= pcie_portdrv_resume,
 
 	.err_handler 	= &pcie_portdrv_err_handler,