diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2014-03-06 18:09:18 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2014-03-06 18:09:18 +0000 |
commit | 909a5f2a23b1641e9b8e1ed6f17f1624a17c3839 (patch) | |
tree | c3ffc7593258dfc24a3aa284fcdfea0d23b76d3a /sys/dev/pci | |
parent | 9a305a0c63c51ff70b4d1fb5260df8998eb1c19e (diff) |
Make sure we don't attach to those silly AMI MegaRAIDs that expose the
ISP12160 they're using as their underlying SCSI controller.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/qlw_pci.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sys/dev/pci/qlw_pci.c b/sys/dev/pci/qlw_pci.c index 865dcd287bf..bfd1aabed56 100644 --- a/sys/dev/pci/qlw_pci.c +++ b/sys/dev/pci/qlw_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qlw_pci.c,v 1.3 2014/03/06 17:57:34 kettenis Exp $ */ +/* $OpenBSD: qlw_pci.c,v 1.4 2014/03/06 18:09:17 kettenis Exp $ */ /* * Copyright (c) 2011 David Gwynne <dlg@openbsd.org> @@ -84,6 +84,17 @@ static const struct pci_matchid qlw_devices[] = { int qlw_pci_match(struct device *parent, void *match, void *aux) { + struct pci_attach_args *pa = aux; + + /* Silly AMI MegaRAID exposes its ISP12160 to us. */ + if (PCI_PRODUCT(pa->pa_id == PCI_PRODUCT_QLOGIC_ISP12160)) { + pcireg_t subid; + + subid = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_SUBVEND_0); + if (PCI_VENDOR(subid) == PCI_VENDOR_AMI) + return (0); + } + return (pci_matchbyid(aux, qlw_devices, nitems(qlw_devices)) * 2); } |