Date: Sun, 29 Dec 2002 11:42:59 +1300 From: Jay <johannes@paradise.net.nz> To: FreeBSD-gnats-submit@FreeBSD.org Subject: kern/46603: [PATCH] NIC support for 3c555 in xl(4) driver Message-ID: <200212291142.59881.johannes@paradise.net.nz>
next in thread | raw e-mail | index | archive | help
>Number: 46603
>Category: kern
>Synopsis: [PATCH] NIC support for 3c555 in xl(4) driver
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sat Dec 28 14:50:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: johannes
>Release: FreeBSD 4.7-RELEASE i386
>Organization:
=20
>Environment:
System: FreeBSD 4.7-RELEASE #3: Sun Dec 22 16:55:59 NZDT 2002=20
root@/usr/src/sys/compile/SOLO i386
>Description:
This patch provides support for 3Com NIC 3c555 as can be found in Gateway=
Solo=20
3150. The patch has been extensively, and successfully tested for=20
BSD4.4/4.7-RELEASE under a variety of mixed hot/cold boot conditions for=20
different operating systems (BSD, Linux).
Note: All required changes for BSD4.4-RELEASE are the same except the lin=
e=20
positions in 'if_xl.c' are different. 'if_xlreg.h' are identical between=20
BSD4.4/4.7-RELEASE hence this patch can be applied for both.
>How-To-Repeat:
Standard install of BSD4.7-RELEASE does not provide 3c555 support whereas=
=20
applied patch, and subsequent kernel compilation does.
>Fix:
Apply below patches to BSD4.7-RELEASE.
(Preferably add/introduce changes to (HEAD)/BSD5 as well)
--- if_xlreg.h.orig Sat Dec 21 13:19:54 2002
+++ if_xlreg.h Mon Dec 23 07:07:20 2002
@@ -652,6 +652,7 @@
#define TC_DEVICEID_TORNADO_10_100BT_SERV 0x9805
#define TC_DEVICEID_HURRICANE_SOHO100TX 0x7646
#define TC_DEVICEID_TORNADO_HOMECONNECT 0x4500
+#define TC_DEVICEID_HURRICANE_555 0x5055
#define TC_DEVICEID_HURRICANE_556 0x6055
#define TC_DEVICEID_HURRICANE_556B 0x6056
=20
--- if_xl.c.orig Sun Dec 22 13:12:22 2002
+++ if_xl.c Sun Dec 22 13:17:24 2002
@@ -55,6 +55,7 @@
* 3Com 3c980C-TX 10/100Mbps server adapter (Tornado ASIC)
* 3Com 3cSOHO100-TX 10/100Mbps/RJ-45 (Hurricane ASIC)
* 3Com 3c450-TX 10/100Mbps/RJ-45 (Tornado ASIC)
+ * 3Com 3c555 10/100Mbps/RJ-45 (MiniPCI, Laptop Hurricane)
* 3Com 3c556 10/100Mbps/RJ-45 (MiniPCI, Hurricane ASIC)
* 3Com 3c556B 10/100Mbps/RJ-45 (MiniPCI, Hurricane ASIC)
* Dell Optiplex GX1 on-board 3c918 10/100Mbps/RJ-45
@@ -188,6 +189,8 @@
"3Com 3cSOHO100-TX OfficeConnect" },
{ TC_VENDORID, TC_DEVICEID_TORNADO_HOMECONNECT,
"3Com 3c450-TX HomeConnect" },
+ { TC_VENDORID, TC_DEVICEID_HURRICANE_555,
+ "3Com 3c555 Fast Etherlink XL" },
{ TC_VENDORID, TC_DEVICEID_HURRICANE_556,
"3Com 3c556 Fast Etherlink XL" },
{ TC_VENDORID, TC_DEVICEID_HURRICANE_556B,
@@ -1159,6 +1162,7 @@
printf("xl%d: guessing 10baseFL\n", sc->xl_unit);
break;
case TC_DEVICEID_BOOMERANG_10_100BT: /* 3c905-TX */
+ case TC_DEVICEID_HURRICANE_555: /* 3c555 */
case TC_DEVICEID_HURRICANE_556: /* 3c556 */
case TC_DEVICEID_HURRICANE_556B: /* 3c556B */
sc->xl_media =3D XL_MEDIAOPT_MII;
@@ -1222,11 +1226,14 @@
unit =3D device_get_unit(dev);
=20
sc->xl_flags =3D 0;
+ if (pci_get_device(dev) =3D=3D TC_DEVICEID_HURRICANE_555)
+ sc->xl_flags |=3D XL_FLAG_EEPROM_OFFSET_30 | XL_FLAG_PHYO=
K;
if (pci_get_device(dev) =3D=3D TC_DEVICEID_HURRICANE_556 ||
pci_get_device(dev) =3D=3D TC_DEVICEID_HURRICANE_556B)
sc->xl_flags |=3D XL_FLAG_FUNCREG | XL_FLAG_PHYOK |
XL_FLAG_EEPROM_OFFSET_30 | XL_FLAG_WEIRDRESET;
- if (pci_get_device(dev) =3D=3D TC_DEVICEID_HURRICANE_556)
+ if (pci_get_device(dev) =3D=3D TC_DEVICEID_HURRICANE_555 ||
+ pci_get_device(dev) =3D=3D TC_DEVICEID_HURRICANE_556)
sc->xl_flags |=3D XL_FLAG_8BITROM;
=20
/*
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200212291142.59881.johannes>
