diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2006-05-23 00:41:51 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2006-05-23 00:41:51 +0000 |
commit | 732c1e2ae60e5ba408b96a3e9a541cbe5c5b3610 (patch) | |
tree | dd6544b1179c2300a8c51db829e011bd137691da /sys | |
parent | 196832ded10fbdbcaa4c8e0bfd5b97dcd43b7cc9 (diff) |
according to the Linux 8139cp driver the TTTech MC322 adapter uses
the 8139C+ chipset, so attach with re(4) instead of rl(4).
ok dlg@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/if_re_pci.c | 13 | ||||
-rw-r--r-- | sys/dev/pci/if_rl_pci.c | 5 |
2 files changed, 12 insertions, 6 deletions
diff --git a/sys/dev/pci/if_re_pci.c b/sys/dev/pci/if_re_pci.c index a6b1f77f47f..abe7eb22107 100644 --- a/sys/dev/pci/if_re_pci.c +++ b/sys/dev/pci/if_re_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_re_pci.c,v 1.7 2006/05/16 02:32:39 brad Exp $ */ +/* $OpenBSD: if_re_pci.c,v 1.8 2006/05/23 00:41:50 brad Exp $ */ /* * Copyright (c) 2005 Peter Valchev <pvalchev@openbsd.org> @@ -67,7 +67,8 @@ const struct pci_matchid re_pci_devices[] = { { PCI_VENDOR_REALTEK, PCI_PRODUCT_REALTEK_RT8169 }, { PCI_VENDOR_COREGA, PCI_PRODUCT_COREGA_CGLAPCIGT }, { PCI_VENDOR_DLINK, PCI_PRODUCT_DLINK_DGE528T }, - { PCI_VENDOR_USR2, PCI_PRODUCT_USR2_USR997902 } + { PCI_VENDOR_USR2, PCI_PRODUCT_USR2_USR997902 }, + { PCI_VENDOR_TTTECH, PCI_PRODUCT_TTTECH_MC322 } }; #define RE_LINKSYS_EG1032_SUBID 0x00241737 @@ -196,7 +197,13 @@ re_pci_attach(struct device *parent, struct device *self, void *aux) sc->sc_dmat = pa->pa_dmat; sc->sc_flags |= RL_ENABLED; - if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_REALTEK_RT8139) + if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_REALTEK) { + if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_REALTEK_RT8139) + sc->rl_type = RL_8139; + else + sc->rl_type = RL_8169; + } else if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_TTTECH && + PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_TTTECH_MC322) sc->rl_type = RL_8139; else sc->rl_type = RL_8169; diff --git a/sys/dev/pci/if_rl_pci.c b/sys/dev/pci/if_rl_pci.c index 32c82485fb5..0393031b729 100644 --- a/sys/dev/pci/if_rl_pci.c +++ b/sys/dev/pci/if_rl_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_rl_pci.c,v 1.13 2006/05/16 02:32:39 brad Exp $ */ +/* $OpenBSD: if_rl_pci.c,v 1.14 2006/05/23 00:41:50 brad Exp $ */ /* * Copyright (c) 1997, 1998 @@ -95,8 +95,7 @@ const struct pci_matchid rl_pci_devices[] = { { PCI_VENDOR_DELTA, PCI_PRODUCT_DELTA_8139 }, { PCI_VENDOR_DLINK, PCI_PRODUCT_DLINK_530TXPLUS }, { PCI_VENDOR_NORTEL, PCI_PRODUCT_NORTEL_BS21 }, - { PCI_VENDOR_REALTEK, PCI_PRODUCT_REALTEK_RT8129 }, - { PCI_VENDOR_TTTECH, PCI_PRODUCT_TTTECH_MC322 } + { PCI_VENDOR_REALTEK, PCI_PRODUCT_REALTEK_RT8129 } }; int |