Re: [patch 2.6.24-git] net/enc28j60: low power mode

2008-02-10 Thread David Brownell
Keep enc28j60 chips in low-power mode when they're not in use. At typically 120 mA, these chips run hot even when idle; this low power mode cuts that power usage by a factor of around 100. This version provides a generic routine to poll a register until its masked value equals some value ... e.g.

Re: [patch 2.6.24-git] net/enc28j60: low power mode

2008-02-10 Thread David Brownell
On Thursday 07 February 2008, Claudio Lanconelli wrote: > Sorry, > let me repeat what I said in previous mail. > I propose you to add set_lowpower(true) in the enc28j60_probe() As the current patch does... > and in the enc28j60_net_close() after enc28j60_hw_disable(). > Probably we don't need

Re: [patch 2.6.24-git] net/enc28j60: low power mode

2008-02-07 Thread Claudio Lanconelli
Sorry, let me repeat what I said in previous mail. I propose you to add set_lowpower(true) in the enc28j60_probe() 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_ini

Re: [patch 2.6.24-git] net/enc28j60: low power mode

2008-02-07 Thread Claudio Lanconelli
David Brownell wrote: The driver seemed to already have some goofage there: # ifconfig eth1 up net eth1: link down net eth1: link down net eth1: normal mode net eth1: multicast mode net eth1: multicast mode # Without low power patch I have: # ifconfig eth0 up net eth0: link d

Re: [patch 2.6.24-git] net/enc28j60: low power mode

2008-02-06 Thread David Brownell
On Wednesday 06 February 2008, Claudio Lanconelli wrote: > > + for (;;) { > > + tmp = nolock_regb_read(priv, ESTAT); > > + if (!(tmp & ESTAT_RXBUSY)) > > + break; > > + } > > > Avoid infinite waiting loops, please.

Re: [patch 2.6.24-git] net/enc28j60: low power mode

2008-02-06 Thread David Brownell
> > Keep enc28j60 chips in low-power mode when they're not in use. > > At typically 120 mA, these chips run hot even when idle. Low > > power mode cuts that power usage by a factor of around 100. > > Good idea, but with your patch applied, after some ifconfig down - > ifconfig up cycle, the > enc