linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* NET: dmfe.c : fix access to card's pci config space in D3
@ 2007-11-22 23:29 Maxim Levitsky
  2007-11-22 23:30 ` [PATCH] NET: dmfe: don't access configuration space in D3 state Maxim Levitsky
  0 siblings, 1 reply; 4+ messages in thread
From: Maxim Levitsky @ 2007-11-22 23:29 UTC (permalink / raw)
  To: Linux Netdev List; +Cc: LKML

Hi,

I somehow assumed that pci_save_state should be called while 
device is powered off, but actually the opposite is true.

Thus I am sending this patch to fix it.

Sorry for this mistake,
	Best regards,
		Maxim Levitsky


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

* [PATCH] NET: dmfe: don't access configuration space in D3 state
  2007-11-22 23:29 NET: dmfe.c : fix access to card's pci config space in D3 Maxim Levitsky
@ 2007-11-22 23:30 ` Maxim Levitsky
  2007-11-24  3:10   ` Jeff Garzik
  0 siblings, 1 reply; 4+ messages in thread
From: Maxim Levitsky @ 2007-11-22 23:30 UTC (permalink / raw)
  To: Linux Netdev List; +Cc: LKML

>From 7e24227257f315e52fe0b494dc1253d2a0ce5dff Mon Sep 17 00:00:00 2001
From: Maxim Levitsky <maximlevitsky@gmail.com>
Date: Fri, 23 Nov 2007 01:15:36 +0200
Subject: [PATCH] NET: dmfe: don't access configuration space in D3 state
 Accidently I reversed the order of pci_save_state and
 pci_set_power_state in .suspend()/.resume() callbacks

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
---
 drivers/net/tulip/dmfe.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/tulip/dmfe.c b/drivers/net/tulip/dmfe.c
index 390d02d..9d199b0 100644
--- a/drivers/net/tulip/dmfe.c
+++ b/drivers/net/tulip/dmfe.c
@@ -2118,8 +2118,8 @@ static int dmfe_suspend(struct pci_dev *pci_dev, pm_message_t state)
 	pci_enable_wake(pci_dev, PCI_D3cold, 1);
 
 	/* Power down device*/
-	pci_set_power_state(pci_dev, pci_choose_state (pci_dev,state));
 	pci_save_state(pci_dev);
+	pci_set_power_state(pci_dev, pci_choose_state (pci_dev,state));
 
 	return 0;
 }
@@ -2129,8 +2129,8 @@ static int dmfe_resume(struct pci_dev *pci_dev)
 	struct net_device *dev = pci_get_drvdata(pci_dev);
 	u32 tmp;
 
-	pci_restore_state(pci_dev);
 	pci_set_power_state(pci_dev, PCI_D0);
+	pci_restore_state(pci_dev);
 
 	/* Re-initilize DM910X board */
 	dmfe_init_dm910x(dev);
-- 
1.5.3.4


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

* Re: [PATCH] NET: dmfe: don't access configuration space in D3 state
  2007-11-22 23:30 ` [PATCH] NET: dmfe: don't access configuration space in D3 state Maxim Levitsky
@ 2007-11-24  3:10   ` Jeff Garzik
  2007-11-24  3:48     ` Maxim Levitsky
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff Garzik @ 2007-11-24  3:10 UTC (permalink / raw)
  To: Maxim Levitsky; +Cc: Linux Netdev List, LKML

Maxim Levitsky wrote:
>>From 7e24227257f315e52fe0b494dc1253d2a0ce5dff Mon Sep 17 00:00:00 2001
> From: Maxim Levitsky <maximlevitsky@gmail.com>
> Date: Fri, 23 Nov 2007 01:15:36 +0200
> Subject: [PATCH] NET: dmfe: don't access configuration space in D3 state
>  Accidently I reversed the order of pci_save_state and
>  pci_set_power_state in .suspend()/.resume() callbacks
> 
> Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
> ---
>  drivers/net/tulip/dmfe.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 

applied #upstream-fixes, after hand-editing patch changelog taking by 
git-am from email body



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

* Re: [PATCH] NET: dmfe: don't access configuration space in D3 state
  2007-11-24  3:10   ` Jeff Garzik
@ 2007-11-24  3:48     ` Maxim Levitsky
  0 siblings, 0 replies; 4+ messages in thread
From: Maxim Levitsky @ 2007-11-24  3:48 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Linux Netdev List, LKML

On Saturday 24 November 2007 05:10:37 Jeff Garzik wrote:
> Maxim Levitsky wrote:
> >>From 7e24227257f315e52fe0b494dc1253d2a0ce5dff Mon Sep 17 00:00:00 2001
> > From: Maxim Levitsky <maximlevitsky@gmail.com>
> > Date: Fri, 23 Nov 2007 01:15:36 +0200
> > Subject: [PATCH] NET: dmfe: don't access configuration space in D3 state
> >  Accidently I reversed the order of pci_save_state and
> >  pci_set_power_state in .suspend()/.resume() callbacks
> > 
> > Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
> > ---
> >  drivers/net/tulip/dmfe.c |    4 ++--
> >  1 files changed, 2 insertions(+), 2 deletions(-)
> > 
> 
> applied #upstream-fixes, after hand-editing patch changelog taking by 
> git-am from email body
> 
> 
> 

Hi,

Thanks,
Next time I will be more careful with changelogs.

Best regards,
	Maxim Levitsky

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

end of thread, other threads:[~2007-11-24  3:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-22 23:29 NET: dmfe.c : fix access to card's pci config space in D3 Maxim Levitsky
2007-11-22 23:30 ` [PATCH] NET: dmfe: don't access configuration space in D3 state Maxim Levitsky
2007-11-24  3:10   ` Jeff Garzik
2007-11-24  3:48     ` Maxim Levitsky

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).