Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755388AbZAaAfp (ORCPT ); Fri, 30 Jan 2009 19:35:45 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752391AbZAaAfd (ORCPT ); Fri, 30 Jan 2009 19:35:33 -0500 Received: from ogre.sisk.pl ([217.79.144.158]:51020 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751347AbZAaAfc (ORCPT ); Fri, 30 Jan 2009 19:35:32 -0500 From: "Rafael J. Wysocki" To: Linus Torvalds Subject: Re: 2.6.29-rc3: tg3 dead after resume Date: Sat, 31 Jan 2009 01:34:46 +0100 User-Agent: KMail/1.10.3 (Linux/2.6.29-rc2-tst; KDE/4.1.3; x86_64; ; ) Cc: Parag Warudkar , Matt Carlson , "netdev@vger.kernel.org" , Linux Kernel Mailing List , "David S. Miller" , Andrew Morton References: <200901310031.37660.rjw@sisk.pl> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901310134.47657.rjw@sisk.pl> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1799 Lines: 58 On Saturday 31 January 2009, Linus Torvalds wrote: > > On Sat, 31 Jan 2009, Rafael J. Wysocki wrote: > > > > I wonder if this change makes any difference: > > > > --- linux-2.6.orig/drivers/pci/pci-driver.c > > +++ linux-2.6/drivers/pci/pci-driver.c > > @@ -501,6 +501,9 @@ static int pci_pm_suspend(struct device > > if (pci_has_legacy_pm_support(pci_dev)) > > return pci_legacy_suspend(dev, PMSG_SUSPEND); > > > > + if (!drv || !drv->pm) > > + return 0; > > + > > if (drv && drv->pm && drv->pm->suspend) { > > error = drv->pm->suspend(dev); > > suspend_report_result(drv->pm->suspend, error); > > I don't think that's right. Now you don't end up calling > pci_pm_default_suspend_generic() at all, and this no pci_save_state(). > > But I think it could easily be the call to pci_disable_enabled_device(). > It does that > > if (atomic_read(&dev->enable_cnt)) > do_pci_disable_device(dev); > > and that ends up disabling PCI_COMMAND_MASTER and then calling > pcibios_disable_device(). pci_disable_enabled_device() is not called for the PCIe port driver, because it has the legacy PM support. What happens is pci_pm_suspend(port) -> pci_legacy_suspend(port) -> pcie_portdrv_suspend(port) [this doesn't save the state] pci_save_state(port) and then, with interrupts off pci_pm_suspend_noirq(port) -> pci_legacy_suspend_late(port) -> pcie_portdrv_suspend_late(port) -> pci_save_state(port) and I suspect this last pci_save_state() breaks things. I'm not sure why, though. Thanks, Rafael -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/