MFC: 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.
This commit is contained in:
jhb 2005-11-06 16:00:54 +00:00
parent aa03f39e89
commit 67ef65a00c
4 changed files with 46 additions and 2 deletions

View File

@ -177,6 +177,8 @@ static struct rl_type re_devs[] = {
"RealTek 8110S Single-chip Gigabit Ethernet" },
{ COREGA_VENDORID, COREGA_DEVICEID_CGLAPCIGT, RL_HWREV_8169S,
"Corega CG-LAPCIGT (RTL8169S) Gigabit Ethernet" },
{ LINKSYS_VENDORID, LINKSYS_DEVICEID_EG1032, RL_HWREV_8169S,
"Linksys EG1032 (RTL8169S) Gigabit Ethernet" },
{ 0, 0, 0, NULL }
};
@ -826,6 +828,17 @@ re_probe(dev)
while (t->rl_name != NULL) {
if ((pci_get_vendor(dev) == t->rl_vid) &&
(pci_get_device(dev) == t->rl_did)) {
/*
* Only attach to rev. 3 of the Linksys EG1032 adapter.
* Rev. 2 i supported by sk(4).
*/
if ((t->rl_vid == LINKSYS_VENDORID) &&
(t->rl_did == LINKSYS_DEVICEID_EG1032) &&
(pci_get_subdevice(dev) !=
LINKSYS_SUBDEVICE_EG1032_REV3)) {
t++;
continue;
}
/*
* Temporarily map the I/O space

View File

@ -812,18 +812,33 @@ 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
*/
#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
*/

View File

@ -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);
}

View File

@ -103,6 +103,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
*/