Date: Mon, 22 Jun 2015 00:34:30 +0000 (UTC) From: Marcel Moolenaar <marcel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284689 - head/sys/dev/proto Message-ID: <201506220034.t5M0YU34087647@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marcel Date: Mon Jun 22 00:34:29 2015 New Revision: 284689 URL: https://svnweb.freebsd.org/changeset/base/284689 Log: Change the probe to what was intended: attach to devices with a type 0 header and not to function 0 devices. Modified: head/sys/dev/proto/proto_bus_pci.c Modified: head/sys/dev/proto/proto_bus_pci.c ============================================================================== --- head/sys/dev/proto/proto_bus_pci.c Mon Jun 22 00:30:34 2015 (r284688) +++ head/sys/dev/proto/proto_bus_pci.c Mon Jun 22 00:34:29 2015 (r284689) @@ -64,8 +64,7 @@ proto_pci_probe(device_t dev) { struct sbuf *sb; - /* For now we only attach to function 0 devices. */ - if (pci_get_function(dev) != 0) + if ((pci_read_config(dev, PCIR_HDRTYPE, 1) & PCIM_HDRTYPE) != 0) return (ENXIO); sb = sbuf_new_auto();
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201506220034.t5M0YU34087647>