public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Claudio Lanconelli <lanconelli.claudio@eptar•com>
To: David Brownell <david-b@pacbell•net>
Cc: netdev@vger•kernel.org
Subject: Re: [patch 2.6.24-git] net/enc28j60: oops fix, low power mode
Date: Mon, 11 Feb 2008 13:07:54 +0100	[thread overview]
Message-ID: <47B03A9A.2060605@eptar.com> (raw)
In-Reply-To: <200802100954.18225.david-b@pacbell.net>

David Brownell wrote:

>> > and in  the enc28j60_net_close() after enc28j60_hw_disable().
>> > Probably we don't need to set_lowpower(false) in enc28j60_net_open() since
>> > it performs a soft reset with enc28j60_hw_init() (not sure).
>>     
>
> The current patch sets the device in low power mode in hw_disable(),
> and takes it out of that mode in hw_enable().  I can move them; and
> the only "soft" thing about this chip's reset is when it starts from
> a protocol command not the reset command.
>
>   
I want to mean the reset software command. It's functionally
equivalent to hardware system reset, but it seems to need exit low
power mode to work flawlessly.
I have tried your latest patch. Only after the following change it
works fine (no more rx errors during ifconfig up).
I added enc28j60_lowpower(false) just before enc28j60_hw_init()

@@ -1318,8 +1347,9 @@
         }
         return -EADDRNOTAVAIL;
     }
-    /* Reset the hardware here */
+    /* Reset the hardware here (and take it out of low power mode) */
     enc28j60_hw_disable(priv);
+    enc28j60_lowpower(priv, false);
     if (!enc28j60_hw_init(priv)) {
         if (netif_msg_ifup(priv))
             dev_err(&dev->dev, "hw_reset() failed\n");

With this addition you can add Acked-by line.
Thank you.
>> After a couple of :
>>
>> ifconfig eth0 down
>> (wait just 1 second)
>> ifconfig eth0 up
>>
>> the network is frozen.
>>
>> If I do another
>> ifconfig eth0 down
>> (wait just 1 second)
>> ifconfig eth0 up
>>
>> restarts.
>> It's random, no rule.
>>     
>
> I write a shell loop to do that, and added a "ping -c2" too.
> If that was done before the "sleep 1" no packets flowed.
> Afterwards, no problem -- ever. 
>
> (And outside the loop, "ethool -s eth1 duplex full".)
>
>
>   
I forgot to tell that during my test I have a web server running on the 
board and
a client continuously requesting a page.


  reply	other threads:[~2008-02-11 12:06 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-05 19:01 [patch 2.6.24-git] net/enc28j60: oops fix, low power mode David Brownell
2008-02-06 17:11 ` Claudio Lanconelli
2008-02-06 17:33   ` [patch 2.6.24-git] net/enc28j60: oops fix David Brownell
2008-02-07 10:24     ` Claudio Lanconelli
2008-02-19 20:52       ` [RESEND/patch 2.6.25-rc2-git] " David Brownell
2008-03-05  1:17       ` [RE(*2)SEND/patch " David Brownell
2008-03-06  2:52         ` David Miller
2008-03-06  3:05           ` David Brownell
2008-02-06 18:19   ` [patch 2.6.24-git] net/enc28j60: low power mode David Brownell
2008-02-07 10:49     ` Claudio Lanconelli
2008-02-07  5:56   ` [patch 2.6.24-git] net/enc28j60: oops fix, " David Brownell
2008-02-07 10:53     ` Claudio Lanconelli
2008-02-10 17:54       ` David Brownell
2008-02-11 12:07         ` Claudio Lanconelli [this message]
2008-02-11 20:23           ` David Brownell
2008-02-14 10:28             ` Claudio Lanconelli
2008-02-07  6:08   ` [patch 2.6.24-git] net/enc28j60: " David Brownell
2008-02-07 11:21     ` Claudio Lanconelli
2008-02-10 17:45       ` David Brownell
2008-02-10 17:46       ` David Brownell
2008-02-07  6:08   ` [patch 2.6.24-git] net/enc28j60: section fix David Brownell
2008-02-07 11:13     ` Claudio Lanconelli
2008-02-19 20:54       ` [RESEND/patch 2.6.25-rc2-git] net/enc28j60: low power mode David Brownell
2008-02-19 20:56       ` [RESEND/patch 2.6.25-rc2-git] net/enc28j60: section fix David Brownell
2008-04-19  2:08       ` [RESEND/patch 2.6.25] " David Brownell
2008-04-19  2:08       ` [RESEND/patch 2.6.25] net/enc28j60: low power mode David Brownell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47B03A9A.2060605@eptar.com \
    --to=lanconelli.claudio@eptar$(echo .)com \
    --cc=david-b@pacbell$(echo .)net \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox