Re: [PATCH] eepro100.c, kernel 2.4.1

From: Ion Badulescu (ionut@moisil.cs.columbia.edu)
Date: Thu Feb 08 2001 - 02:23:01 EST


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"
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Feb 15 2001 - 21:00:10 EST