Date: Wed, 1 Jan 2014 20:18:03 +0000 (UTC) From: Zbigniew Bodek <zbb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260163 - head/sys/dev/ahci Message-ID: <201401012018.s01KI31L014441@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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@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 &&
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401012018.s01KI31L014441>