Skip to content

Commit

Permalink
s2io: fixing a ethtool test that is broken
Browse files Browse the repository at this point in the history
Due commit 4b77b0a, 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>
  • Loading branch information
Breno Leitao authored and David S. Miller committed Nov 14, 2009
1 parent a78102e commit b8a623b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/s2io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b8a623b

Please sign in to comment.