diff options
author | jhb <jhb@FreeBSD.org> | 2005-10-14 18:51:30 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2005-10-14 18:51:30 +0000 |
commit | f63b585ffb04635ade225be42c5ca855a3eb7c12 (patch) | |
tree | 84fbefd69ba2e386c760aa0c23598b002628fdd8 /sys/pci | |
parent | ebae8f6ee41b833c83a2aa9705df852e74c55ed2 (diff) | |
download | FreeBSD-src-f63b585ffb04635ade225be42c5ca855a3eb7c12.zip FreeBSD-src-f63b585ffb04635ade225be42c5ca855a3eb7c12.tar.gz |
Only allow the sk(4) driver to attach to revision 2 of the LinkSys EG1032
cards and teach the re(4) driver to attach to revision 3 cards.
Submitted by: Fredrik Lindberg fli+freebsd-current at shapeshifter dot se
MFC after: 2 weeks
Reviewed by: imp, mdodd
Diffstat (limited to 'sys/pci')
-rw-r--r-- | sys/pci/if_rlreg.h | 19 | ||||
-rw-r--r-- | sys/pci/if_sk.c | 11 | ||||
-rw-r--r-- | sys/pci/if_skreg.h | 5 |
3 files changed, 33 insertions, 2 deletions
diff --git a/sys/pci/if_rlreg.h b/sys/pci/if_rlreg.h index c8b3c0b..6c87659 100644 --- a/sys/pci/if_rlreg.h +++ b/sys/pci/if_rlreg.h @@ -812,12 +812,12 @@ struct rl_softc { /* * Corega FEther CB-TXD device ID */ -#define COREGA_DEVICEID_FETHERCBTXD 0xa117 +#define COREGA_DEVICEID_FETHERCBTXD 0xa117 /* * Corega FEtherII CB-TXD device ID */ -#define COREGA_DEVICEID_FETHERIICBTXD 0xa11e +#define COREGA_DEVICEID_FETHERIICBTXD 0xa11e /* * Corega CG-LAPCIGT device ID @@ -825,6 +825,21 @@ struct rl_softc { #define COREGA_DEVICEID_CGLAPCIGT 0xc107 /* + * Linksys vendor ID + */ +#define LINKSYS_VENDORID 0x1737 + +/* + * Linksys EG1032 device ID + */ +#define LINKSYS_DEVICEID_EG1032 0x1032 + +/* + * Linksys EG1032 rev 3 sub-device ID + */ +#define LINKSYS_SUBDEVICE_EG1032_REV3 0x0024 + +/* * Peppercon vendor ID */ #define PEPPERCON_VENDORID 0x1743 diff --git a/sys/pci/if_sk.c b/sys/pci/if_sk.c index d83630e..3b89e50 100644 --- a/sys/pci/if_sk.c +++ b/sys/pci/if_sk.c @@ -1312,6 +1312,17 @@ skc_probe(dev) while(t->sk_name != NULL) { if ((pci_get_vendor(dev) == t->sk_vid) && (pci_get_device(dev) == t->sk_did)) { + /* + * Only attach to rev. 2 of the Linksys EG1032 adapter. + * Rev. 3 is supported by re(4). + */ + if ((t->sk_vid == VENDORID_LINKSYS) && + (t->sk_did == DEVICEID_LINKSYS_EG1032) && + (pci_get_subdevice(dev) != + SUBDEVICEID_LINKSYS_EG1032_REV2)) { + t++; + continue; + } device_set_desc(dev, t->sk_name); return (BUS_PROBE_DEFAULT); } diff --git a/sys/pci/if_skreg.h b/sys/pci/if_skreg.h index e8b6b8a..1c7158e 100644 --- a/sys/pci/if_skreg.h +++ b/sys/pci/if_skreg.h @@ -104,6 +104,11 @@ #define DEVICEID_LINKSYS_EG1032 0x1032 /* + * Linksys gigabit ethernet rev 2 sub-device ID + */ +#define SUBDEVICEID_LINKSYS_EG1032_REV2 0x0015 + +/* * D-Link PCI vendor ID */ #define VENDORID_DLINK 0x1186 |