Date: Sun, 4 Sep 2016 01:47:21 +0000 (UTC) From: "Landon J. Fuller" <landonf@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305375 - head/sys/dev/bhnd/bhndb Message-ID: <201609040147.u841lL2G049325@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: landonf Date: Sun Sep 4 01:47:21 2016 New Revision: 305375 URL: https://svnweb.freebsd.org/changeset/base/305375 Log: bhndb(4): Fix probing of bhndb-attached bhnd_nvram devices. This fixes bhnd(4) nvram handling on devices that map SPROM CSRs via PCI configuration space. The probe method previously required that a bhnd(4) device be attached to the parent bridge; now that the bhnd_nvram device is always attached first, this unnecessary sanity check always failed. Approved by: adrian (mentor, implicit) Modified: head/sys/dev/bhnd/bhndb/bhndb_pci_sprom.c Modified: head/sys/dev/bhnd/bhndb/bhndb_pci_sprom.c ============================================================================== --- head/sys/dev/bhnd/bhndb/bhndb_pci_sprom.c Sun Sep 4 01:43:54 2016 (r305374) +++ head/sys/dev/bhnd/bhndb/bhndb_pci_sprom.c Sun Sep 4 01:47:21 2016 (r305375) @@ -60,17 +60,13 @@ __FBSDID("$FreeBSD$"); static int bhndb_pci_sprom_probe(device_t dev) { - device_t bridge, bus; + device_t bridge; int error; - /* Our parent must be a PCI-BHND bridge with an attached bhnd bus */ + /* Our parent must be a PCI-BHND bridge */ bridge = device_get_parent(dev); if (device_get_driver(bridge) != &bhndb_pci_driver) return (ENXIO); - - bus = device_find_child(bridge, devclass_get_name(bhnd_devclass), 0); - if (bus == NULL) - return (ENXIO); /* Defer to default driver implementation */ if ((error = bhnd_sprom_probe(dev)) > 0)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609040147.u841lL2G049325>