diff options
| author | 2006-05-16 02:32:39 +0000 | |
|---|---|---|
| committer | 2006-05-16 02:32:39 +0000 | |
| commit | 5fabca521a7ce89a3253b4977266b5bc29df9a5f (patch) | |
| tree | f0e7b0099fef0b2af1a56de16e779a665a38d918 /sys/dev/pci/if_re_pci.c | |
| parent | consider re(4) as a possible 8139 chipset. (diff) | |
| download | wireguard-openbsd-5fabca521a7ce89a3253b4977266b5bc29df9a5f.tar.xz wireguard-openbsd-5fabca521a7ce89a3253b4977266b5bc29df9a5f.zip | |
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); |
