summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorNathan Binkert <nate@cvs.openbsd.org>2002-04-01 18:41:48 +0000
committerNathan Binkert <nate@cvs.openbsd.org>2002-04-01 18:41:48 +0000
commitd9d21f1c016f92e75547d19f81d68c20064e90b1 (patch)
tree85dd17b03f6afcd90366fbb515bfb6380de2e065 /sys/dev/pci
parentcdce8cb7db2f233f081a61f999214942ae9324c8 (diff)
Don't have dc and de return the same match value in any case.
Comment the reasoning for the various return values in dc_pci_match. dc is preferred over de on all archs except for alpha where de is used. The main reason dc is not preferred on alpha is that it doesn't fit on the floppy, so RAMDISK and GENERIC would have different drivers for the same device which is rather confusing.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/if_dc_pci.c17
-rw-r--r--sys/dev/pci/if_de.c4
2 files changed, 17 insertions, 4 deletions
diff --git a/sys/dev/pci/if_dc_pci.c b/sys/dev/pci/if_dc_pci.c
index 24379b85c24..f8f5c5422aa 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.29 2002/03/22 05:37:48 jason Exp $ */
+/* $OpenBSD: if_dc_pci.c,v 1.30 2002/04/01 18:41:47 nate Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -122,22 +122,35 @@ dc_pci_match(parent, match, aux)
struct pci_attach_args *pa = (struct pci_attach_args *)aux;
struct dc_type *t;
+ /*
+ * Support for the 21140 chip is experimental. If it works for you,
+ * that's great. By default, this chip will use de.
+ */
if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_DEC &&
PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_DEC_21140)
return (1);
+ /*
+ * The following chip revision doesn't seem to work so well with dc,
+ * so let's have de handle it. (de will return a match of 2)
+ */
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);
+ /*
+ * Since dc doesn't fit on the alpha floppy, we want de to win by
+ * default on alpha so that RAMDISK* and GENERIC will use the same
+ * driver.
+ */
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)) {
#ifdef __alpha__
return (1);
#else
- return (2);
+ return (3);
#endif
}
}
diff --git a/sys/dev/pci/if_de.c b/sys/dev/pci/if_de.c
index b3f6649fa21..2fcd0557664 100644
--- a/sys/dev/pci/if_de.c
+++ b/sys/dev/pci/if_de.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_de.c,v 1.53 2002/03/14 03:16:06 millert Exp $ */
+/* $OpenBSD: if_de.c,v 1.54 2002/04/01 18:41:47 nate Exp $ */
/* $NetBSD: if_de.c,v 1.45 1997/06/09 00:34:18 thorpej Exp $ */
/*-
@@ -5236,7 +5236,7 @@ tulip_pci_probe(
|| PCI_CHIPID(pa->pa_id) == CHIPID_21041
|| PCI_CHIPID(pa->pa_id) == CHIPID_21140
|| PCI_CHIPID(pa->pa_id) == CHIPID_21142)
- return 1;
+ return 2;
return 0;
}