netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] sky2: resume clocks
@ 2010-02-07 16:23 Stephen Hemminger
  2010-02-07 16:24 ` [PATCH 2/3]: sky2: disable ASF on Yukon Supreme Stephen Hemminger
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Stephen Hemminger @ 2010-02-07 16:23 UTC (permalink / raw)
  To: David Miller, netdev

Change the resume path to use pci write config for a couple of reasons:
1. pci_write_config_dword() allows for more error
   checking of PCI health after resume.

2. better to toggle this register on all chip types, since that
   is what vendor driver does.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

--- a/drivers/net/sky2.c	2010-02-03 09:17:01.602741445 -0800
+++ b/drivers/net/sky2.c	2010-02-03 09:24:17.943679463 -0800
@@ -4859,10 +4859,11 @@ static int sky2_resume(struct pci_dev *p
 	pci_enable_wake(pdev, PCI_D0, 0);
 
 	/* Re-enable all clocks */
-	if (hw->chip_id == CHIP_ID_YUKON_EX ||
-	    hw->chip_id == CHIP_ID_YUKON_EC_U ||
-	    hw->chip_id == CHIP_ID_YUKON_FE_P)
-		sky2_pci_write32(hw, PCI_DEV_REG3, 0);
+	err = pci_write_config_dword(pdev, PCI_DEV_REG3, 0);
+	if (err) {
+		dev_err(&pdev->dev, "PCI write config failed\n");
+		goto out;
+	}
 
 	sky2_reset(hw);
 	sky2_write32(hw, B0_IMSK, Y2_IS_BASE);

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-02-11  1:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-07 16:23 [PATCH 1/3] sky2: resume clocks Stephen Hemminger
2010-02-07 16:24 ` [PATCH 2/3]: sky2: disable ASF on Yukon Supreme Stephen Hemminger
2010-02-11  1:57   ` David Miller
2010-02-07 16:28 ` [PATCH 3/3] sky2: receive checksum refactoring Stephen Hemminger
2010-02-11  1:57   ` David Miller
2010-02-11  1:57 ` [PATCH 1/3] sky2: resume clocks David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).