Author: eadler
Date: Mon Oct 22 22:29:48 2012
New Revision: 241917
URL: http://svn.freebsd.org/changeset/base/241917

Log:
  Now that device disabling is generic, remove extraneous code from the
  device drivers that used to provide this feature.
  
  This is a subset of 241856 (which was reverted)
  
  Reviewed by:  des
  Approved by:  cperciva (implicit)
  MFC after:    1 week

Modified:
  head/sys/dev/e1000/if_lem.c
  head/sys/dev/ixgbe/ixgbe.c
  head/sys/dev/ixgbe/ixv.c
  head/sys/dev/sound/pci/emu10kx.c

Modified: head/sys/dev/e1000/if_lem.c
==============================================================================
--- head/sys/dev/e1000/if_lem.c Mon Oct 22 21:49:56 2012        (r241916)
+++ head/sys/dev/e1000/if_lem.c Mon Oct 22 22:29:48 2012        (r241917)
@@ -390,11 +390,6 @@ lem_attach(device_t dev)
 
        INIT_DEBUGOUT("lem_attach: begin");
 
-       if (resource_disabled("lem", device_get_unit(dev))) {
-               device_printf(dev, "Disabled by device hint\n");
-               return (ENXIO);
-       }
-
        adapter = device_get_softc(dev);
        adapter->dev = adapter->osdep.dev = dev;
        EM_CORE_LOCK_INIT(adapter, device_get_nameunit(dev));

Modified: head/sys/dev/ixgbe/ixgbe.c
==============================================================================
--- head/sys/dev/ixgbe/ixgbe.c  Mon Oct 22 21:49:56 2012        (r241916)
+++ head/sys/dev/ixgbe/ixgbe.c  Mon Oct 22 22:29:48 2012        (r241917)
@@ -401,11 +401,6 @@ ixgbe_attach(device_t dev)
 
        INIT_DEBUGOUT("ixgbe_attach: begin");
 
-       if (resource_disabled("ixgbe", device_get_unit(dev))) {
-               device_printf(dev, "Disabled by device hint\n");
-               return (ENXIO);
-       }
-
        /* Allocate, clear, and link in our adapter structure */
        adapter = device_get_softc(dev);
        adapter->dev = adapter->osdep.dev = dev;

Modified: head/sys/dev/ixgbe/ixv.c
==============================================================================
--- head/sys/dev/ixgbe/ixv.c    Mon Oct 22 21:49:56 2012        (r241916)
+++ head/sys/dev/ixgbe/ixv.c    Mon Oct 22 22:29:48 2012        (r241917)
@@ -299,11 +299,6 @@ ixv_attach(device_t dev)
 
        INIT_DEBUGOUT("ixv_attach: begin");
 
-       if (resource_disabled("ixgbe", device_get_unit(dev))) {
-               device_printf(dev, "Disabled by device hint\n");
-               return (ENXIO);
-       }
-
        /* Allocate, clear, and link in our adapter structure */
        adapter = device_get_softc(dev);
        adapter->dev = adapter->osdep.dev = dev;

Modified: head/sys/dev/sound/pci/emu10kx.c
==============================================================================
--- head/sys/dev/sound/pci/emu10kx.c    Mon Oct 22 21:49:56 2012        
(r241916)
+++ head/sys/dev/sound/pci/emu10kx.c    Mon Oct 22 22:29:48 2012        
(r241917)
@@ -3050,11 +3050,6 @@ emu_pci_attach(device_t dev)
        sc = device_get_softc(dev);
        unit = device_get_unit(dev);
 
-       if (resource_disabled("emu10kx", unit)) {
-               device_printf(dev, "disabled by kernel hints\n");
-               return (ENXIO); /* XXX to avoid unit reuse */
-       }
-
        /* Get configuration */
 
        sc->ctx = device_get_sysctl_ctx(dev);
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to