diff options
author | Nathan Binkert <nate@cvs.openbsd.org> | 2002-02-17 05:12:57 +0000 |
---|---|---|
committer | Nathan Binkert <nate@cvs.openbsd.org> | 2002-02-17 05:12:57 +0000 |
commit | 698b6139de5f74cde2542edbeb069a989a4cc115 (patch) | |
tree | ee382052bba553403e86895656982c0a0c68e889 /sys/dev | |
parent | 52347de318287f5e62e4f6b210f31d335e15f60c (diff) |
Make dc match with higher priorit over de for 21142/3 chips
Also match on 21140
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/if_dc_pci.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/sys/dev/pci/if_dc_pci.c b/sys/dev/pci/if_dc_pci.c index f5e44507bb8..a8153a48b66 100644 --- a/sys/dev/pci/if_dc_pci.c +++ b/sys/dev/pci/if_dc_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_dc_pci.c,v 1.23 2002/01/11 01:31:21 nordin Exp $ */ +/* $OpenBSD: if_dc_pci.c,v 1.24 2002/02/17 05:12:56 nate Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -82,6 +82,7 @@ * Various supported device vendors/types and their names. */ struct dc_type dc_devs[] = { + { PCI_VENDOR_DEC, PCI_PRODUCT_DEC_21140 }, { PCI_VENDOR_DEC, PCI_PRODUCT_DEC_21142 }, { PCI_VENDOR_DAVICOM, PCI_PRODUCT_DAVICOM_DM9100 }, { PCI_VENDOR_DAVICOM, PCI_PRODUCT_DAVICOM_DM9102 }, @@ -119,11 +120,22 @@ dc_pci_match(parent, match, aux) struct pci_attach_args *pa = (struct pci_attach_args *)aux; struct dc_type *t; + if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_DEC && + PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_DEC_21142 && + PCI_REVISION(pa->pa_class) == 0x21) + return (1); + for (t = dc_devs; t->dc_vid != 0; t++) { if ((PCI_VENDOR(pa->pa_id) == t->dc_vid) && - (PCI_PRODUCT(pa->pa_id) == t->dc_did)) + (PCI_PRODUCT(pa->pa_id) == t->dc_did)) { +#if defined(__alpha__) return (1); +#else + return (2); +#endif + } } + return (0); } @@ -261,7 +273,8 @@ void dc_pci_attach(parent, self, aux) switch (PCI_VENDOR(pa->pa_id)) { case PCI_VENDOR_DEC: - if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_DEC_21142) { + if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_DEC_21140 || + PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_DEC_21142) { found = 1; sc->dc_type = DC_TYPE_21143; sc->dc_flags |= DC_TX_POLL|DC_TX_USE_TX_INTR; |