summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorad <ad@NetBSD.org>2003-12-09 19:43:53 +0000
committerad <ad@NetBSD.org>2003-12-09 19:43:53 +0000
commitee5a33f5aa91ef7de53515877e9e1d4fd73b35c2 (patch)
treee524571abcef09420d4dcb3668c58011f52ef9a1 /sys/dev/pci
parente58307e45854de088be188dc46fc9bc275539ae4 (diff)
Match Promise controllers.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/iop_pci.c28
1 files changed, 21 insertions, 7 deletions
diff --git a/sys/dev/pci/iop_pci.c b/sys/dev/pci/iop_pci.c
index 7a7d0b1b365..ecb74c92c6a 100644
--- a/sys/dev/pci/iop_pci.c
+++ b/sys/dev/pci/iop_pci.c
@@ -1,4 +1,4 @@
-/* $NetBSD: iop_pci.c,v 1.13 2002/11/15 17:51:33 itojun Exp $ */
+/* $NetBSD: iop_pci.c,v 1.14 2003/12/09 19:43:53 ad Exp $ */
/*-
* Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: iop_pci.c,v 1.13 2002/11/15 17:51:33 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: iop_pci.c,v 1.14 2003/12/09 19:43:53 ad Exp $");
#include "opt_i2o.h"
@@ -76,6 +76,8 @@ static int
iop_pci_match(struct device *parent, struct cfdata *match, void *aux)
{
struct pci_attach_args *pa;
+ u_int product, vendor;
+ pcireg_t reg;
pa = aux;
@@ -90,13 +92,24 @@ iop_pci_match(struct device *parent, struct cfdata *match, void *aux)
return (1);
/*
- * Match DPT/Adaptec boards that don't conform exactly to the spec.
+ * Match boards that don't conform exactly to the spec.
*/
- if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_DPT &&
- (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_DPT_RAID_I2O ||
- PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_DPT_RAID_2005S))
+ vendor = PCI_VENDOR(pa->pa_id);
+ product = PCI_PRODUCT(pa->pa_id);
+
+ if (vendor == PCI_VENDOR_DPT &&
+ (product == PCI_PRODUCT_DPT_RAID_I2O ||
+ product == PCI_PRODUCT_DPT_RAID_2005S))
return (1);
+ if (vendor == PCI_VENDOR_INTEL &&
+ (product == PCI_PRODUCT_INTEL_80960RM_2 ||
+ product == PCI_PRODUCT_INTEL_80960_RP)) {
+ reg = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_SUBSYS_ID_REG);
+ if (PCI_VENDOR(reg) == PCI_VENDOR_PROMISE)
+ return (1);
+ }
+
return (0);
}
@@ -140,7 +153,8 @@ iop_pci_attach(struct device *parent, struct device *self, void *aux)
}
/* Map the 2nd register window. */
- if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_DPT_RAID_2005S) {
+ if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_DPT &&
+ PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_DPT_RAID_2005S) {
i += 4; /* next BAR */
if (i == PCI_MAPREG_END) {
printf("can't find mapping\n");