diff options
author | Peter Valchev <pvalchev@cvs.openbsd.org> | 2004-06-05 18:35:10 +0000 |
---|---|---|
committer | Peter Valchev <pvalchev@cvs.openbsd.org> | 2004-06-05 18:35:10 +0000 |
commit | 9af8b681c4de148afcb452f0534d5ea6b7c5f94d (patch) | |
tree | 2bd1ebb0be14d2fa5bc87bda1bbbe7bccc9431b9 /sys/dev | |
parent | e4576a1b29dca52879479051dc3a1ab4b1f17ea5 (diff) |
a step towards 8139C+
not complete as rl(4) will match it (same device id as 8139)
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/if_re.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/sys/dev/pci/if_re.c b/sys/dev/pci/if_re.c index f08889132d0..e1b34b467b8 100644 --- a/sys/dev/pci/if_re.c +++ b/sys/dev/pci/if_re.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_re.c,v 1.3 2004/06/05 17:26:12 deraadt Exp $ */ +/* $OpenBSD: if_re.c,v 1.4 2004/06/05 18:35:09 pvalchev Exp $ */ /* * Copyright (c) 1997, 1998-2003 * Bill Paul <wpaul@windriver.com>. All rights reserved. @@ -164,7 +164,6 @@ struct re_pci_softc { int redebug = 0; #define DPRINTF(x) if (redebug) printf x -/* XXX add the rest from pcidevs */ const struct pci_matchid re_devices[] = { { PCI_VENDOR_REALTEK, PCI_PRODUCT_REALTEK_RT8169 }, }; @@ -923,19 +922,14 @@ re_attach(struct device *parent, struct device *self, void *aux) /* Reset the adapter. */ re_reset(sc); -#if 0 - hw_rev = re_hwrevs; - hwrev = CSR_READ_4(sc, RL_TXCFG) & RL_TXCFG_HWREV; - while (hw_rev->rl_desc != NULL) { - if (hw_rev->rl_rev == hwrev) { - sc->rl_type = hw_rev->rl_type; - break; - } - hw_rev++; + switch (PCI_PRODUCT(pa->pa_id)) { + case PCI_PRODUCT_REALTEK_RT8139: + sc->rl_type = RL_8139CPLUS; + break; + default: + sc->rl_type = RL_8169; + break; } -#endif - /* XXX Add proper check */ - sc->rl_type = RL_8169; if (sc->rl_type == RL_8169) { |