From d4de81b2e48ecabd12516b0629e4d9b671ebeaa3 Mon Sep 17 00:00:00 2001 From: sephe Date: Mon, 16 Oct 2006 14:12:34 +0000 Subject: [PATCH] sk(4) only supports Rev.2 of Linksys EG1032 GigE Obtained-from: FreeBSD (jhb@freebsd.org) --- sys/dev/netif/sk/if_sk.c | 7 ++++++- sys/dev/netif/sk/if_skreg.h | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/sys/dev/netif/sk/if_sk.c b/sys/dev/netif/sk/if_sk.c index 1e5148d647..ae48cbd93e 100644 --- a/sys/dev/netif/sk/if_sk.c +++ b/sys/dev/netif/sk/if_sk.c @@ -31,7 +31,7 @@ * * $OpenBSD: if_sk.c,v 1.33 2003/08/12 05:23:06 nate Exp $ * $FreeBSD: src/sys/pci/if_sk.c,v 1.19.2.9 2003/03/05 18:42:34 njl Exp $ - * $DragonFly: src/sys/dev/netif/sk/if_sk.c,v 1.45 2006/09/05 00:55:41 dillon Exp $ + * $DragonFly: src/sys/dev/netif/sk/if_sk.c,v 1.46 2006/10/16 14:12:34 sephe Exp $ */ /* @@ -1081,6 +1081,11 @@ skc_probe(device_t dev) vendor = pci_get_vendor(dev); product = pci_get_device(dev); + if (vendor == VENDORID_LINKSYS && + product == DEVICEID_LINKSYS_EG1032 && + pci_get_subdevice(dev) != SUBDEVICEID_LINKSYS_EG1032_REV2) + return (ENXIO); + for (t = sk_devs; t->sk_name != NULL; t++) { if (vendor == t->sk_vid && product == t->sk_did) { device_set_desc(dev, t->sk_name); diff --git a/sys/dev/netif/sk/if_skreg.h b/sys/dev/netif/sk/if_skreg.h index 40eab5581b..a6ddb7fd15 100644 --- a/sys/dev/netif/sk/if_skreg.h +++ b/sys/dev/netif/sk/if_skreg.h @@ -32,7 +32,7 @@ * THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/pci/if_skreg.h,v 1.8.2.1 2000/04/27 14:48:07 wpaul Exp $ - * $DragonFly: src/sys/dev/netif/sk/if_skreg.h,v 1.10 2005/11/29 19:56:55 dillon Exp $ + * $DragonFly: src/sys/dev/netif/sk/if_skreg.h,v 1.11 2006/10/16 14:12:34 sephe Exp $ */ /* @@ -92,6 +92,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 -- 2.11.4.GIT