diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2006-05-16 02:32:40 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2006-05-16 02:32:40 +0000 |
commit | 542f7ab7b64733538f37871970357591e9d71e67 (patch) | |
tree | 8652cd2da0442b3909e96e1c1813c4973e5a6bf3 /sys/dev/pci/if_re_pci.c | |
parent | 2a8096874920510930324b7db691abc979203c67 (diff) |
attach 8139's capable of C+ mode to the re(4) driver, instead of the rl(4)
driver.
Diffstat (limited to 'sys/dev/pci/if_re_pci.c')
-rw-r--r-- | sys/dev/pci/if_re_pci.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sys/dev/pci/if_re_pci.c b/sys/dev/pci/if_re_pci.c index 2f59fec308e..a6b1f77f47f 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.6 2006/03/27 17:43:25 brad Exp $ */ +/* $OpenBSD: if_re_pci.c,v 1.7 2006/05/16 02:32:39 brad Exp $ */ /* * Copyright (c) 2005 Peter Valchev <pvalchev@openbsd.org> @@ -97,6 +97,12 @@ re_pci_probe(struct device *parent, void *match, void *aux) subid = pci_conf_read(pc, pa->pa_tag, PCI_SUBSYS_ID_REG); + /* C+ mode 8139's */ + if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_REALTEK && + PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_REALTEK_RT8139 && + PCI_REVISION(pa->pa_class) == 0x20) + return (1); + if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_LINKSYS && PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_LINKSYS_EG1032 && subid == RE_LINKSYS_EG1032_SUBID) @@ -189,7 +195,11 @@ re_pci_attach(struct device *parent, struct device *self, void *aux) sc->sc_dmat = pa->pa_dmat; sc->sc_flags |= RL_ENABLED; - sc->rl_type = RL_8169; + + if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_REALTEK_RT8139) + sc->rl_type = RL_8139; + else + sc->rl_type = RL_8169; /* Call bus-independent attach routine */ re_attach_common(sc); |