2010-11-29 00:08:38

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build failure after merge of the net tree

Hi all,

After merging the net tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

drivers/net/stmmac/stmmac_main.c: In function 'stmmac_resume':
drivers/net/stmmac/stmmac_main.c:1849: error: 'struct stmmac_priv' has no member named 'shutdown'

Caused by commit 874bd42d24c2a74f5dbd65e81e175982240fecd8 ("stmmac:
convert to dev_pm_ops").

I have used the net tree from next-20101126 for today.
--
Cheers,
Stephen Rothwell [email protected]
http://www.canb.auug.org.au/~sfr/


Attachments:
(No filename) (517.00 B)
(No filename) (490.00 B)
Download all attachments

2010-11-29 02:11:09

by David Miller

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the net tree

From: Stephen Rothwell <[email protected]>
Date: Mon, 29 Nov 2010 11:08:24 +1100

> Hi all,
>
> After merging the net tree, today's linux-next build (x86_64 allmodconfig)
> failed like this:
>
> drivers/net/stmmac/stmmac_main.c: In function 'stmmac_resume':
> drivers/net/stmmac/stmmac_main.c:1849: error: 'struct stmmac_priv' has no member named 'shutdown'
>
> Caused by commit 874bd42d24c2a74f5dbd65e81e175982240fecd8 ("stmmac:
> convert to dev_pm_ops").
>
> I have used the net tree from next-20101126 for today.

I have pushed the following fix which should cure this:

--------------------
stmmac: fix stmmac_resume removing not yet used shutdown flag

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 <[email protected]>
Signed-off-by: Giuseppe Cavallaro <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
---
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.7.3.2

2010-11-29 07:25:30

by Peppe CAVALLARO

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the net tree

On 11/29/2010 3:11 AM, David Miller wrote:
>
> From: Stephen Rothwell <[email protected]>
> Date: Mon, 29 Nov 2010 11:08:24 +1100
>
> > Hi all,
> >
> > After merging the net tree, today's linux-next build (x86_64
> allmodconfig)
> > failed like this:
> >
> > drivers/net/stmmac/stmmac_main.c: In function 'stmmac_resume':
> > drivers/net/stmmac/stmmac_main.c:1849: error: 'struct stmmac_priv'
> has no member named 'shutdown'
> >
> > Caused by commit 874bd42d24c2a74f5dbd65e81e175982240fecd8 ("stmmac:
> > convert to dev_pm_ops").
> >
>

Yes, this was my fault.

> > I have used the net tree from next-20101126 for today.
>
> I have pushed the following fix which should cure this:
>
> --------------------
> stmmac: fix stmmac_resume removing not yet used shutdown flag
>

The patch, David already applied, fixes this problem.

Peppe

> 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 <[email protected]>
> Signed-off-by: Giuseppe Cavallaro <[email protected]>
> Signed-off-by: David S. Miller <[email protected]>
> ---
> 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.7.3.2
>