Andrey Savochkin wrote:
>
> On Tue, Oct 30, 2001 at 12:39:27PM +0100, Johan wrote:
> >
> > Hello,
> > Does anyone except me still having problems with the eepro100 drivers ?
> >
> > The network connection stalls and I'll get this message:
> >
> > eepro100: wait_for_cmd_done timeout!
>
> Try to add `udelay(1);' inside the loop in wait_for_cmd_done().
> It helped to some people with same problems.
In 2.4 that's already there:
> static inline void wait_for_cmd_done(long cmd_ioaddr)
> {
> int wait = 1000;
> do udelay(1) ;
> while(inb(cmd_ioaddr) && --wait >= 0);
> #ifndef final_version
> if (wait < 0)
> printk(KERN_ALERT "eepro100: wait_for_cmd_done timeout!\n");
> #endif
> }
In contrast, here is what Becker's current version looks like. It looks
like Becker just added a hack to continue waiting.
Things to try:
(a) add a rmb() after the udelay
(b) the Becker version
> /* How to wait for the command unit to accept a command.
> Typically this takes 0 ticks. */
>
> static inline void wait_for_cmd_done(long cmd_ioaddr)
> {
> int wait = 0;
> do
> if (inb(cmd_ioaddr) == 0) return;
> while(++wait <= 100);
> do
> if (inb(cmd_ioaddr) == 0) break;
> while(++wait <= 10000);
> printk(KERN_ERR "Command %4.4x was not immediately accepted, %d ticks!\n
> ",
> inb(cmd_ioaddr), wait);
> }
-- Jeff Garzik | Only so many songs can be sung Building 1024 | with two lips, two lungs, and one tongue. MandrakeSoft | - nomeansno - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Wed Nov 07 2001 - 21:00:14 EST