aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tulip
diff options
context:
space:
mode:
authorOndrej Zary <linux@rainbow-software.org>2010-09-24 19:57:02 -0400
committerDavid S. Miller <davem@davemloft.net>2010-09-26 18:49:38 -0400
commitb0255a02351b00ca55f4eb2588d05a5db9dd1a58 (patch)
treea0e12e378089350e8d75d77ca70809e7603525e8 /drivers/net/tulip
parente0f9c4f332c99b213d4a0b7cd21dc0781ceb3d86 (diff)
de2104x: fix power management
At least my 21041 cards come out of suspend with bus mastering disabled so they did not work after resume(no data transferred). After adding pci_set_master(), the driver oopsed immediately on resume - because de_clean_rings() is called on suspend but de_init_rings() call was missing in resume. Also disable link (reset SIA) before sleep (de4x5 does this too). Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Acked-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tulip')
-rw-r--r--drivers/net/tulip/de2104x.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c
index 9d6b7e9c7a6b..a0be7c28c587 100644
--- a/drivers/net/tulip/de2104x.c
+++ b/drivers/net/tulip/de2104x.c
@@ -1231,6 +1231,7 @@ static void de_adapter_sleep (struct de_private *de)
1231 if (de->de21040) 1231 if (de->de21040)
1232 return; 1232 return;
1233 1233
1234 dw32(CSR13, 0); /* Reset phy */
1234 pci_read_config_dword(de->pdev, PCIPM, &pmctl); 1235 pci_read_config_dword(de->pdev, PCIPM, &pmctl);
1235 pmctl |= PM_Sleep; 1236 pmctl |= PM_Sleep;
1236 pci_write_config_dword(de->pdev, PCIPM, pmctl); 1237 pci_write_config_dword(de->pdev, PCIPM, pmctl);
@@ -2166,6 +2167,8 @@ static int de_resume (struct pci_dev *pdev)
2166 dev_err(&dev->dev, "pci_enable_device failed in resume\n"); 2167 dev_err(&dev->dev, "pci_enable_device failed in resume\n");
2167 goto out; 2168 goto out;
2168 } 2169 }
2170 pci_set_master(pdev);
2171 de_init_rings(de);
2169 de_init_hw(de); 2172 de_init_hw(de);
2170out_attach: 2173out_attach:
2171 netif_device_attach(dev); 2174 netif_device_attach(dev);