Re: [PATCH] eepro100.c, kernel 2.4.1

Ion Badulescu
2001-02-08T07:24:49Z

On Thu, 8 Feb 2001 14:53:55 +0900, Augustin Vidovic <vido@ldh.org> wrote:

> --- linux-2.4.1/drivers/net/eepro100.c Sun Jan 28 03:40:14 2001
> +++ linux-2.4.1-vido1/drivers/net/eepro100.c Thu Feb 8 14:08:49 2001
> @@ -815,7 +815,7 @@
>
> sp->phy[0] = eeprom[6];
> sp->phy[1] = eeprom[7];
> - sp->rx_bug = (eeprom[3] & 0x03) == 3 ? 0 : 1;
> + sp->rx_bug = eeprom[3] & 0x03;
>
> if (sp->rx_bug)
> printk(KERN_INFO " Receiver lock-up workaround activated.\n");

This patch is wrong, please DON'T apply it.

It's the printk that gets it wrong, although that's harmless.
Intel's documentation states that the bug does NOT exist if the
bits 0 and 1 in eeprom[3] are 1. Thus, the workaround is correct,
the printk is wrong.

The correct patch for 2.4.1 is attached. 2.2.18 needs something
similar, the same patch can be applied with some fuzz.

Thanks,
Ion

--
It is better to keep your mouth shut and be thought a fool,
than to open it and remove all doubt.
--------------------------------
--- /usr/src/local/linux-2.4.vanilla/drivers/net/eepro100.c Wed Feb 7 15:45:16 2001
+++ linux-2.4/drivers/net/eepro100.c Wed Feb 7 23:07:29 2001
@@ -725,7 +725,7 @@
/* The self-test results must be paragraph aligned. */
volatile s32 *self_test_results;
int boguscnt = 16000; /* Timeout for set-test. */
- if (eeprom[3] & 0x03)
+ if ((eeprom[3] & 0x03) != 0x03)
printk(KERN_INFO " Receiver lock-up bug exists -- enabling"
" work-around.\n");
printk(KERN_INFO " Board assembly %4.4x%2.2x-%3.3d, Physical"