svn commit: r260163 - head/sys/dev/ahci
Zbigniew Bodek
zbb at FreeBSD.org
Wed Jan 1 20:18:03 UTC 2014
Author: zbb
Date: Wed Jan 1 20:18:03 2014
New Revision: 260163
URL: http://svnweb.freebsd.org/changeset/base/260163
Log:
Do not attach to PCI bridges in AHCI driver
Some vendors use the same VID:PID combination in AHCI and PCI bridge cards
Submitted by: Wojciech Macek <wma at semihalf.com>
Obtained from: Semihalf
Modified:
head/sys/dev/ahci/ahci.c
Modified: head/sys/dev/ahci/ahci.c
==============================================================================
--- head/sys/dev/ahci/ahci.c Wed Jan 1 20:04:43 2014 (r260162)
+++ head/sys/dev/ahci/ahci.c Wed Jan 1 20:18:03 2014 (r260163)
@@ -375,6 +375,13 @@ ahci_probe(device_t dev)
uint32_t devid = pci_get_devid(dev);
uint8_t revid = pci_get_revid(dev);
+ /*
+ * Ensure it is not a PCI bridge (some vendors use
+ * the same PID and VID in PCI bridge and AHCI cards).
+ */
+ if (pci_get_class(dev) == PCIC_BRIDGE)
+ return (ENXIO);
+
/* Is this a possible AHCI candidate? */
if (pci_get_class(dev) == PCIC_STORAGE &&
pci_get_subclass(dev) == PCIS_STORAGE_SATA &&
More information about the svn-src-head
mailing list