summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBreno Leitao <leitao@linux.vnet.ibm.com>2009-11-10 09:44:23 +0000
committerDavid S. Miller <davem@davemloft.net>2009-11-13 19:56:53 -0800
commitb8a623bf836ccfab09a5a6daf62116f455082e6e (patch)
treecb95515355b1614ce1aa8c428e3c4ebb2a6dedc2
parenta78102e74e782914039cd8a6939532649825a2e3 (diff)
s2io: fixing a ethtool test that is broken
Due commit 4b77b0a2ba27d64f58f16d8d4d48d8319dda36ff, it is not more possible to pci_restore_state() more than once without calling pci_save_state() in the middle. Actually running a ethtool test on s2io makes the card inactive, and it needs to unload/reload the module to fix. This patch just save the state just after it restore in order to keep the old behaviour Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/s2io.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index ddccf5fa56b6..0dd7839322bc 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -3494,6 +3494,7 @@ static void s2io_reset(struct s2io_nic *sp)
/* Restore the PCI state saved during initialization. */
pci_restore_state(sp->pdev);
+ pci_save_state(sp->pdev);
pci_read_config_word(sp->pdev, 0x2, &val16);
if (check_pci_device_id(val16) != (u16)PCI_ANY_ID)
break;