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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html