mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [BUG] in drivers/net/dl2k.h
@ 2003-01-28 15:31 Jörn Engel
  0 siblings, 0 replies; only message in thread
From: Jörn Engel @ 2003-01-28 15:31 UTC (permalink / raw)
  To: Edward Peng.; +Cc: linux-kernel

Hi!

The patch below should be enough to verify the bug and create a proper
fix, I hope.

Jörn

-- 
If you're willing to restrict the flexibility of your approach,
you can almost always do something better.
-- John Carmack

diff -Naur linux-2.4.21-pre3-ac4/drivers/net/dl2k.c scratch/drivers/net/dl2k.c
--- linux-2.4.21-pre3-ac4/drivers/net/dl2k.c	Fri Jan 24 15:25:37 2003
+++ scratch/drivers/net/dl2k.c	Tue Jan 28 15:45:02 2003
@@ -1743,6 +1743,8 @@
 		anar.image = mii_read (dev, phy_addr, MII_ANAR);
 		anar.bits.half_duplex = 
 			esr.bits.media_1000BT_HD | esr.bits.media_1000BX_HD;
+		/* BUG: esr.bits.media_1000BT_FD is uninitialized.
+		 * 	see sl2k.h */
 		anar.bits.full_duplex = 
 			esr.bits.media_1000BT_FD | esr.bits.media_1000BX_FD;
 		anar.bits.pause = 1;
diff -Naur linux-2.4.21-pre3-ac4/drivers/net/dl2k.h scratch/drivers/net/dl2k.h
--- linux-2.4.21-pre3-ac4/drivers/net/dl2k.h	Fri Jan 24 15:25:37 2003
+++ scratch/drivers/net/dl2k.h	Tue Jan 28 15:46:33 2003
@@ -513,6 +513,8 @@
 	u16 image;
 	struct {
 		u16 _bit_11_0:12;	// bit 11:0
+		/* BUG: ":2" should be ":1", if this is really only bit 12.
+		 * 	This should cause the bug in dl2k.c */
 		u16 media_1000BT_HD:2;	// bit 12
 		u16 media_1000BT_FD:1;	// bit 13
 		u16 media_1000BX_HD:1;	// bit 14

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-01-28 15:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-28 15:31 [BUG] in drivers/net/dl2k.h Jörn Engel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®