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)
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to