summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/autri.c19
-rw-r--r--sys/dev/pci/if_pcn.c13
2 files changed, 28 insertions, 4 deletions
diff --git a/sys/dev/pci/autri.c b/sys/dev/pci/autri.c
index a73a2cb0bd5..f6ee18c3dad 100644
--- a/sys/dev/pci/autri.c
+++ b/sys/dev/pci/autri.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autri.c,v 1.16 2005/08/09 04:10:10 mickey Exp $ */
+/* $OpenBSD: autri.c,v 1.17 2006/02/22 18:12:24 brad Exp $ */
/*
* Copyright (c) 2001 SOMEYA Yoshihiko and KUROSAWA Takahiro.
@@ -471,10 +471,9 @@ autri_flags_codec(void *v)
*
*/
const struct pci_matchid autri_devices[] = {
- { PCI_VENDOR_TRIDENT, PCI_PRODUCT_TRIDENT_4DWAVE_DX },
{ PCI_VENDOR_TRIDENT, PCI_PRODUCT_TRIDENT_4DWAVE_NX },
{ PCI_VENDOR_SIS, PCI_PRODUCT_SIS_7018 },
- { PCI_VENDOR_ALI, PCI_PRODUCT_ALI_M5451 },
+ { PCI_VENDOR_ALI, PCI_PRODUCT_ALI_M5451 }
};
int
@@ -483,6 +482,20 @@ autri_match(parent, match, aux)
void *match;
void *aux;
{
+ struct pci_attach_args *pa = aux;
+
+ if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_TRIDENT &&
+ PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_TRIDENT_4DWAVE_DX) {
+ /*
+ * IBM makes a pcn network card and improperly
+ * sets the vendor and product ID's. Avoid matching.
+ */
+ if (PCI_CLASS(pa->pa_class) == PCI_CLASS_NETWORK)
+ return (0);
+ else
+ return (1);
+ }
+
return (pci_matchbyid((struct pci_attach_args *)aux, autri_devices,
sizeof(autri_devices)/sizeof(autri_devices[0])));
}
diff --git a/sys/dev/pci/if_pcn.c b/sys/dev/pci/if_pcn.c
index 91044ee1448..54b6b56f0bd 100644
--- a/sys/dev/pci/if_pcn.c
+++ b/sys/dev/pci/if_pcn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_pcn.c,v 1.5 2006/02/03 06:38:11 brad Exp $ */
+/* $OpenBSD: if_pcn.c,v 1.6 2006/02/22 18:12:24 brad Exp $ */
/* $NetBSD: if_pcn.c,v 1.26 2005/05/07 09:15:44 is Exp $ */
/*
@@ -508,6 +508,17 @@ pcn_match(struct device *parent, void *match, void *aux)
{
struct pci_attach_args *pa = aux;
+ /*
+ * IBM makes a PCI variant of this card which shows up as a
+ * Trident Microsystems 4DWAVE DX (ethernet network, revision 0x25)
+ * this card is truly a pcn card, so we have a special case match for
+ * it.
+ */
+ if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_TRIDENT &&
+ PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_TRIDENT_4DWAVE_DX &&
+ PCI_CLASS(pa->pa_class) == PCI_CLASS_NETWORK)
+ return(1);
+
if (PCI_VENDOR(pa->pa_id) != PCI_VENDOR_AMD)
return (0);