Netdev List
 help / color / mirror / Atom feed
* [PATCH] s2io: fixing a ethtool test that is broken
@ 2009-11-10 19:44 leitao
  2009-11-12 18:59 ` Sivakumar Subramani
  2009-11-14  3:57 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: leitao @ 2009-11-10 19:44 UTC (permalink / raw)
  To: netdev; +Cc: sreenivasa.honnur, Breno Leitao

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>
---
 drivers/net/s2io.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index ddccf5f..0dd7839 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;
-- 
1.6.0.2


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

end of thread, other threads:[~2009-11-14  3:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-10 19:44 [PATCH] s2io: fixing a ethtool test that is broken leitao
2009-11-12 18:59 ` Sivakumar Subramani
2009-11-14  3:36   ` David Miller
2009-11-14  3:57 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox