netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] stmmac: fix stmmac_resume removing not yet used shutdown flag
@ 2010-11-26 14:11 Peppe CAVALLARO
  2010-11-26 14:16 ` Peppe CAVALLARO
  2010-11-29  2:11 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Peppe CAVALLARO @ 2010-11-26 14:11 UTC (permalink / raw)
  To: netdev@vger.kernel.org; +Cc: vlad.lungu@windriver.com, Peppe CAVALLARO

The commit to convert to use the dev_pm_ops struct
introduces a bug. The shutdown flag is not yet used
because the hibernation on memory is done by using
the freeze callback.
Thanks to Vlad for having reported it.

Reported-by: Vlad Lungu <vlad.lungu@windriver.com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
---
 drivers/net/stmmac/stmmac_main.c |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/drivers/net/stmmac/stmmac_main.c b/drivers/net/stmmac/stmmac_main.c
index f1dbc18..730a6fd 100644
--- a/drivers/net/stmmac/stmmac_main.c
+++ b/drivers/net/stmmac/stmmac_main.c
@@ -1846,13 +1846,6 @@ static int stmmac_resume(struct device *dev)
 	if (!netif_running(ndev))
 		return 0;
 
-	if (priv->shutdown) {
-		/* Re-open the interface and re-init the MAC/DMA
-		   and the rings (i.e. on hibernation stage) */
-		stmmac_open(dev);
-		return 0;
-	}
-
 	spin_lock(&priv->lock);
 
 	/* Power Down bit, into the PM register, is cleared
-- 
1.5.5.6

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

* Re: [PATCH] stmmac: fix stmmac_resume removing not yet used shutdown flag
  2010-11-26 14:11 [PATCH] stmmac: fix stmmac_resume removing not yet used shutdown flag Peppe CAVALLARO
@ 2010-11-26 14:16 ` Peppe CAVALLARO
  2010-11-29 10:32   ` Vlad Lungu
  2010-11-29  2:11 ` David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Peppe CAVALLARO @ 2010-11-26 14:16 UTC (permalink / raw)
  To: vlad.lungu@windriver.com; +Cc: netdev@vger.kernel.org, David S. Miller

On 11/26/2010 3:11 PM, Peppe CAVALLARO wrote:
> The commit to convert to use the dev_pm_ops struct
> introduces a bug. The shutdown flag is not yet used
> because the hibernation on memory is done by using
> the freeze callback.
> Thanks to Vlad for having reported it.
Hi Vlad,
as we discussed via email, I'll also look at how to manage the
patch that reworked the private structure and that's generating
problems on your HW (I'll also try to have it for testing!).

Many thanks for the feedback and for having spotted this issue (sorry!).

Regards,
Peppe
> Reported-by: Vlad Lungu <vlad.lungu@windriver.com>
> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
> ---
>  drivers/net/stmmac/stmmac_main.c |    7 -------
>  1 files changed, 0 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/stmmac/stmmac_main.c b/drivers/net/stmmac/stmmac_main.c
> index f1dbc18..730a6fd 100644
> --- a/drivers/net/stmmac/stmmac_main.c
> +++ b/drivers/net/stmmac/stmmac_main.c
> @@ -1846,13 +1846,6 @@ static int stmmac_resume(struct device *dev)
>  	if (!netif_running(ndev))
>  		return 0;
>  
> -	if (priv->shutdown) {
> -		/* Re-open the interface and re-init the MAC/DMA
> -		   and the rings (i.e. on hibernation stage) */
> -		stmmac_open(dev);
> -		return 0;
> -	}
> -
>  	spin_lock(&priv->lock);
>  
>  	/* Power Down bit, into the PM register, is cleared

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

* Re: [PATCH] stmmac: fix stmmac_resume removing not yet used shutdown flag
  2010-11-26 14:11 [PATCH] stmmac: fix stmmac_resume removing not yet used shutdown flag Peppe CAVALLARO
  2010-11-26 14:16 ` Peppe CAVALLARO
@ 2010-11-29  2:11 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2010-11-29  2:11 UTC (permalink / raw)
  To: peppe.cavallaro; +Cc: netdev, vlad.lungu

From: Peppe CAVALLARO <peppe.cavallaro@st.com>
Date: Fri, 26 Nov 2010 15:11:45 +0100

> The commit to convert to use the dev_pm_ops struct
> introduces a bug. The shutdown flag is not yet used
> because the hibernation on memory is done by using
> the freeze callback.
> Thanks to Vlad for having reported it.
> 
> Reported-by: Vlad Lungu <vlad.lungu@windriver.com>
> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>

Applied.

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

* Re: [PATCH] stmmac: fix stmmac_resume removing not yet used shutdown flag
  2010-11-26 14:16 ` Peppe CAVALLARO
@ 2010-11-29 10:32   ` Vlad Lungu
  0 siblings, 0 replies; 4+ messages in thread
From: Vlad Lungu @ 2010-11-29 10:32 UTC (permalink / raw)
  To: Peppe CAVALLARO; +Cc: netdev@vger.kernel.org, David S. Miller

Peppe CAVALLARO wrote:
> On 11/26/2010 3:11 PM, Peppe CAVALLARO wrote:
>> The commit to convert to use the dev_pm_ops struct
>> introduces a bug. The shutdown flag is not yet used
>> because the hibernation on memory is done by using
>> the freeze callback.
>> Thanks to Vlad for having reported it.
> Hi Vlad,
> as we discussed via email, I'll also look at how to manage the
> patch that reworked the private structure and that's generating
> problems on your HW (I'll also try to have it for testing!).
> 

Actually, this is is not a blocking problem. I can kmalloc a platform
info structure and fill it with the relevant data on probe. It just feels ... wrong.

The way I see it, the platform info is similar to the PNP on an ISA bus or
the PCI header of a device. Having platform info for a PCI device is kind of
a hack. You didn't know that there's a PCI device out there and that someone
wants to submit a patch for it, so it probably made sense at the time to rework
the structure that particular way.

Regards,
Vlad




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

end of thread, other threads:[~2010-11-29 10:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-26 14:11 [PATCH] stmmac: fix stmmac_resume removing not yet used shutdown flag Peppe CAVALLARO
2010-11-26 14:16 ` Peppe CAVALLARO
2010-11-29 10:32   ` Vlad Lungu
2010-11-29  2:11 ` David Miller

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