Author: eadler
Date: Mon Oct 22 03:41:14 2012
New Revision: 241856
URL: http://svn.freebsd.org/changeset/base/241856

Log:
  Now that device disabling is generic, remove extraneous code from the
  device drivers that used to provide this feature.
  
  Reviewed by:  des
  Approved by:  cperciva
  MFC after:    1 week

Modified:
  head/sys/arm/xscale/pxa/pxa_smi.c
  head/sys/dev/acpica/acpi.c
  head/sys/dev/acpica/acpi_perf.c
  head/sys/dev/acpica/acpi_throttle.c
  head/sys/dev/agp/agp_ali.c
  head/sys/dev/agp/agp_amd.c
  head/sys/dev/agp/agp_amd64.c
  head/sys/dev/agp/agp_apple.c
  head/sys/dev/agp/agp_i810.c
  head/sys/dev/agp/agp_intel.c
  head/sys/dev/agp/agp_nvidia.c
  head/sys/dev/agp/agp_sis.c
  head/sys/dev/agp/agp_via.c
  head/sys/dev/amdsbwd/amdsbwd.c
  head/sys/dev/amdtemp/amdtemp.c
  head/sys/dev/asmc/asmc.c
  head/sys/dev/coretemp/coretemp.c
  head/sys/dev/e1000/if_em.c
  head/sys/dev/e1000/if_igb.c
  head/sys/dev/e1000/if_lem.c
  head/sys/dev/glxiic/glxiic.c
  head/sys/dev/ixgbe/ixgbe.c
  head/sys/dev/ixgbe/ixv.c
  head/sys/dev/kbdmux/kbdmux.c
  head/sys/dev/sound/pci/emu10kx.c
  head/sys/i386/acpica/acpi_machdep.c
  head/sys/i386/bios/apm.c
  head/sys/x86/cpufreq/est.c
  head/sys/x86/cpufreq/p4tcc.c
  head/sys/x86/isa/elcr.c

Modified: head/sys/arm/xscale/pxa/pxa_smi.c
==============================================================================
--- head/sys/arm/xscale/pxa/pxa_smi.c   Mon Oct 22 03:37:00 2012        
(r241855)
+++ head/sys/arm/xscale/pxa/pxa_smi.c   Mon Oct 22 03:41:14 2012        
(r241856)
@@ -82,9 +82,6 @@ static int
 pxa_smi_probe(device_t dev)
 {
 
-       if (resource_disabled("smi", device_get_unit(dev)))
-               return (ENXIO);
-
        device_set_desc(dev, "Static Memory Interface");
        return (0);
 }

Modified: head/sys/dev/acpica/acpi.c
==============================================================================
--- head/sys/dev/acpica/acpi.c  Mon Oct 22 03:37:00 2012        (r241855)
+++ head/sys/dev/acpica/acpi.c  Mon Oct 22 03:41:14 2012        (r241856)
@@ -377,10 +377,6 @@ acpi_identify(void)
     if (!cold)
        return (ENXIO);
 
-    /* Check that we haven't been disabled with a hint. */
-    if (resource_disabled("acpi", 0))
-       return (ENXIO);
-
     /* Check for other PM systems. */
     if (power_pm_get_type() != POWER_PM_TYPE_NONE &&
        power_pm_get_type() != POWER_PM_TYPE_ACPI) {

Modified: head/sys/dev/acpica/acpi_perf.c
==============================================================================
--- head/sys/dev/acpica/acpi_perf.c     Mon Oct 22 03:37:00 2012        
(r241855)
+++ head/sys/dev/acpica/acpi_perf.c     Mon Oct 22 03:41:14 2012        
(r241856)
@@ -175,9 +175,6 @@ acpi_perf_probe(device_t dev)
        ACPI_BUFFER buf;
        int error, rid, type;
 
-       if (resource_disabled("acpi_perf", 0))
-               return (ENXIO);
-
        /*
         * Check the performance state registers.  If they are of type
         * "functional fixed hardware", we attach quietly since we will

Modified: head/sys/dev/acpica/acpi_throttle.c
==============================================================================
--- head/sys/dev/acpica/acpi_throttle.c Mon Oct 22 03:37:00 2012        
(r241855)
+++ head/sys/dev/acpica/acpi_throttle.c Mon Oct 22 03:41:14 2012        
(r241856)
@@ -167,9 +167,6 @@ static int
 acpi_throttle_probe(device_t dev)
 {
 
-       if (resource_disabled("acpi_throttle", 0))
-               return (ENXIO);
-
        /*
         * On i386 platforms at least, ACPI throttling is accomplished by
         * the chipset modulating the STPCLK# pin based on the duty cycle.

Modified: head/sys/dev/agp/agp_ali.c
==============================================================================
--- head/sys/dev/agp/agp_ali.c  Mon Oct 22 03:37:00 2012        (r241855)
+++ head/sys/dev/agp/agp_ali.c  Mon Oct 22 03:41:14 2012        (r241856)
@@ -81,8 +81,6 @@ agp_ali_probe(device_t dev)
 {
        const char *desc;
 
-       if (resource_disabled("agp", device_get_unit(dev)))
-               return (ENXIO);
        desc = agp_ali_match(dev);
        if (desc) {
                device_set_desc(dev, desc);

Modified: head/sys/dev/agp/agp_amd.c
==============================================================================
--- head/sys/dev/agp/agp_amd.c  Mon Oct 22 03:37:00 2012        (r241855)
+++ head/sys/dev/agp/agp_amd.c  Mon Oct 22 03:41:14 2012        (r241856)
@@ -203,8 +203,6 @@ agp_amd_probe(device_t dev)
 {
        const char *desc;
 
-       if (resource_disabled("agp", device_get_unit(dev)))
-               return (ENXIO);
        desc = agp_amd_match(dev);
        if (desc) {
                device_set_desc(dev, desc);

Modified: head/sys/dev/agp/agp_amd64.c
==============================================================================
--- head/sys/dev/agp/agp_amd64.c        Mon Oct 22 03:37:00 2012        
(r241855)
+++ head/sys/dev/agp/agp_amd64.c        Mon Oct 22 03:41:14 2012        
(r241856)
@@ -152,8 +152,6 @@ agp_amd64_probe(device_t dev)
 {
        const char *desc;
 
-       if (resource_disabled("agp", device_get_unit(dev)))
-               return (ENXIO);
        if ((desc = agp_amd64_match(dev))) {
                device_set_desc(dev, desc);
                return (BUS_PROBE_DEFAULT);

Modified: head/sys/dev/agp/agp_apple.c
==============================================================================
--- head/sys/dev/agp/agp_apple.c        Mon Oct 22 03:37:00 2012        
(r241855)
+++ head/sys/dev/agp/agp_apple.c        Mon Oct 22 03:41:14 2012        
(r241856)
@@ -71,9 +71,6 @@ static int
 agp_apple_probe(device_t dev)
 {
 
-       if (resource_disabled("agp", device_get_unit(dev)))
-               return (ENXIO);
-
        if (pci_get_class(dev) != PCIC_BRIDGE
            || pci_get_subclass(dev) != PCIS_BRIDGE_HOST)
                return (ENXIO);

Modified: head/sys/dev/agp/agp_i810.c
==============================================================================
--- head/sys/dev/agp/agp_i810.c Mon Oct 22 03:37:00 2012        (r241855)
+++ head/sys/dev/agp/agp_i810.c Mon Oct 22 03:41:14 2012        (r241856)
@@ -860,8 +860,6 @@ agp_i810_probe(device_t dev)
        const struct agp_i810_match *match;
        int err;
 
-       if (resource_disabled("agp", device_get_unit(dev)))
-               return (ENXIO);
        match = agp_i810_match(dev);
        if (match == NULL)
                return (ENXIO);

Modified: head/sys/dev/agp/agp_intel.c
==============================================================================
--- head/sys/dev/agp/agp_intel.c        Mon Oct 22 03:37:00 2012        
(r241855)
+++ head/sys/dev/agp/agp_intel.c        Mon Oct 22 03:41:14 2012        
(r241856)
@@ -117,8 +117,6 @@ agp_intel_probe(device_t dev)
 {
        const char *desc;
 
-       if (resource_disabled("agp", device_get_unit(dev)))
-               return (ENXIO);
        desc = agp_intel_match(dev);
        if (desc) {
                device_set_desc(dev, desc);

Modified: head/sys/dev/agp/agp_nvidia.c
==============================================================================
--- head/sys/dev/agp/agp_nvidia.c       Mon Oct 22 03:37:00 2012        
(r241855)
+++ head/sys/dev/agp/agp_nvidia.c       Mon Oct 22 03:41:14 2012        
(r241856)
@@ -117,8 +117,6 @@ agp_nvidia_probe (device_t dev)
 {
        const char *desc;
 
-       if (resource_disabled("agp", device_get_unit(dev)))
-               return (ENXIO);
        desc = agp_nvidia_match(dev);
        if (desc) {
                device_set_desc(dev, desc);

Modified: head/sys/dev/agp/agp_sis.c
==============================================================================
--- head/sys/dev/agp/agp_sis.c  Mon Oct 22 03:37:00 2012        (r241855)
+++ head/sys/dev/agp/agp_sis.c  Mon Oct 22 03:41:14 2012        (r241856)
@@ -113,8 +113,6 @@ agp_sis_probe(device_t dev)
 {
        const char *desc;
 
-       if (resource_disabled("agp", device_get_unit(dev)))
-               return (ENXIO);
        desc = agp_sis_match(dev);
        if (desc) {
                device_set_desc(dev, desc);

Modified: head/sys/dev/agp/agp_via.c
==============================================================================
--- head/sys/dev/agp/agp_via.c  Mon Oct 22 03:37:00 2012        (r241855)
+++ head/sys/dev/agp/agp_via.c  Mon Oct 22 03:41:14 2012        (r241856)
@@ -147,8 +147,6 @@ agp_via_probe(device_t dev)
 {
        const char *desc;
 
-       if (resource_disabled("agp", device_get_unit(dev)))
-               return (ENXIO);
        desc = agp_via_match(dev);
        if (desc) {
                device_set_desc(dev, desc);

Modified: head/sys/dev/amdsbwd/amdsbwd.c
==============================================================================
--- head/sys/dev/amdsbwd/amdsbwd.c      Mon Oct 22 03:37:00 2012        
(r241855)
+++ head/sys/dev/amdsbwd/amdsbwd.c      Mon Oct 22 03:41:14 2012        
(r241856)
@@ -267,8 +267,6 @@ amdsbwd_identify(driver_t *driver, devic
        device_t                child;
        device_t                smb_dev;
 
-       if (resource_disabled("amdsbwd", 0))
-               return;
        if (device_find_child(parent, "amdsbwd", -1) != NULL)
                return;
 

Modified: head/sys/dev/amdtemp/amdtemp.c
==============================================================================
--- head/sys/dev/amdtemp/amdtemp.c      Mon Oct 22 03:37:00 2012        
(r241855)
+++ head/sys/dev/amdtemp/amdtemp.c      Mon Oct 22 03:41:14 2012        
(r241856)
@@ -185,9 +185,6 @@ amdtemp_probe(device_t dev)
 {
        uint32_t family, model;
 
-       if (resource_disabled("amdtemp", 0))
-               return (ENXIO);
-
        family = CPUID_TO_FAMILY(cpu_id);
        model = CPUID_TO_MODEL(cpu_id);
 

Modified: head/sys/dev/asmc/asmc.c
==============================================================================
--- head/sys/dev/asmc/asmc.c    Mon Oct 22 03:37:00 2012        (r241855)
+++ head/sys/dev/asmc/asmc.c    Mon Oct 22 03:41:14 2012        (r241856)
@@ -291,8 +291,6 @@ asmc_probe(device_t dev)
 {
        struct asmc_model *model;
 
-       if (resource_disabled("asmc", 0))
-               return (ENXIO);
        if (ACPI_ID_PROBE(device_get_parent(dev), dev, asmc_ids) == NULL)
                return (ENXIO);
        

Modified: head/sys/dev/coretemp/coretemp.c
==============================================================================
--- head/sys/dev/coretemp/coretemp.c    Mon Oct 22 03:37:00 2012        
(r241855)
+++ head/sys/dev/coretemp/coretemp.c    Mon Oct 22 03:41:14 2012        
(r241856)
@@ -138,8 +138,6 @@ coretemp_identify(driver_t *driver, devi
 static int
 coretemp_probe(device_t dev)
 {
-       if (resource_disabled("coretemp", 0))
-               return (ENXIO);
 
        device_set_desc(dev, "CPU On-Die Thermal Sensors");
 

Modified: head/sys/dev/e1000/if_em.c
==============================================================================
--- head/sys/dev/e1000/if_em.c  Mon Oct 22 03:37:00 2012        (r241855)
+++ head/sys/dev/e1000/if_em.c  Mon Oct 22 03:41:14 2012        (r241856)
@@ -472,11 +472,6 @@ em_attach(device_t dev)
 
        INIT_DEBUGOUT("em_attach: begin");
 
-       if (resource_disabled("em", 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;
        hw = &adapter->hw;

Modified: head/sys/dev/e1000/if_igb.c
==============================================================================
--- head/sys/dev/e1000/if_igb.c Mon Oct 22 03:37:00 2012        (r241855)
+++ head/sys/dev/e1000/if_igb.c Mon Oct 22 03:41:14 2012        (r241856)
@@ -460,11 +460,6 @@ igb_attach(device_t dev)
 
        INIT_DEBUGOUT("igb_attach: begin");
 
-       if (resource_disabled("igb", 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;
        IGB_CORE_LOCK_INIT(adapter, device_get_nameunit(dev));

Modified: head/sys/dev/e1000/if_lem.c
==============================================================================
--- head/sys/dev/e1000/if_lem.c Mon Oct 22 03:37:00 2012        (r241855)
+++ head/sys/dev/e1000/if_lem.c Mon Oct 22 03:41:14 2012        (r241856)
@@ -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/glxiic/glxiic.c
==============================================================================
--- head/sys/dev/glxiic/glxiic.c        Mon Oct 22 03:37:00 2012        
(r241855)
+++ head/sys/dev/glxiic/glxiic.c        Mon Oct 22 03:41:14 2012        
(r241856)
@@ -298,9 +298,6 @@ static int
 glxiic_probe(device_t dev)
 {
 
-       if (resource_disabled("glxiic", device_get_unit(dev)))
-               return (ENXIO);
-
        device_set_desc(dev, "AMD Geode CS5536 SMBus controller");
 
        return (BUS_PROBE_DEFAULT);

Modified: head/sys/dev/ixgbe/ixgbe.c
==============================================================================
--- head/sys/dev/ixgbe/ixgbe.c  Mon Oct 22 03:37:00 2012        (r241855)
+++ head/sys/dev/ixgbe/ixgbe.c  Mon Oct 22 03:41:14 2012        (r241856)
@@ -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 03:37:00 2012        (r241855)
+++ head/sys/dev/ixgbe/ixv.c    Mon Oct 22 03:41:14 2012        (r241856)
@@ -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/kbdmux/kbdmux.c
==============================================================================
--- head/sys/dev/kbdmux/kbdmux.c        Mon Oct 22 03:37:00 2012        
(r241855)
+++ head/sys/dev/kbdmux/kbdmux.c        Mon Oct 22 03:41:14 2012        
(r241856)
@@ -378,8 +378,6 @@ kbdmux_configure(int flags)
 static int
 kbdmux_probe(int unit, void *arg, int flags)
 {
-       if (resource_disabled(KEYBOARD_NAME, unit))
-               return (ENXIO);
 
        return (0);
 }

Modified: head/sys/dev/sound/pci/emu10kx.c
==============================================================================
--- head/sys/dev/sound/pci/emu10kx.c    Mon Oct 22 03:37:00 2012        
(r241855)
+++ head/sys/dev/sound/pci/emu10kx.c    Mon Oct 22 03:41:14 2012        
(r241856)
@@ -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);

Modified: head/sys/i386/acpica/acpi_machdep.c
==============================================================================
--- head/sys/i386/acpica/acpi_machdep.c Mon Oct 22 03:37:00 2012        
(r241855)
+++ head/sys/i386/acpica/acpi_machdep.c Mon Oct 22 03:41:14 2012        
(r241856)
@@ -268,9 +268,6 @@ acpi_find_table(const char *sig)
        vm_paddr_t addr;
        int i, count;
 
-       if (resource_disabled("acpi", 0))
-               return (0);
-
        /*
         * Map in the RSDP.  Since ACPI uses AcpiOsMapMemory() which in turn
         * calls pmap_mapbios() to find the RSDP, we assume that we can use

Modified: head/sys/i386/bios/apm.c
==============================================================================
--- head/sys/i386/bios/apm.c    Mon Oct 22 03:37:00 2012        (r241855)
+++ head/sys/i386/bios/apm.c    Mon Oct 22 03:41:14 2012        (r241856)
@@ -878,9 +878,6 @@ apm_identify(driver_t *driver, device_t 
                return;
        }
 
-       if (resource_disabled("apm", 0))
-               return;
-
        child = BUS_ADD_CHILD(parent, 0, "apm", 0);
        if (child == NULL)
                panic("apm_identify");

Modified: head/sys/x86/cpufreq/est.c
==============================================================================
--- head/sys/x86/cpufreq/est.c  Mon Oct 22 03:37:00 2012        (r241855)
+++ head/sys/x86/cpufreq/est.c  Mon Oct 22 03:41:14 2012        (r241856)
@@ -991,9 +991,6 @@ est_probe(device_t dev)
        uint64_t msr;
        int error, type;
 
-       if (resource_disabled("est", 0))
-               return (ENXIO);
-
        /*
         * If the ACPI perf driver has attached and is not just offering
         * info, let it manage things.

Modified: head/sys/x86/cpufreq/p4tcc.c
==============================================================================
--- head/sys/x86/cpufreq/p4tcc.c        Mon Oct 22 03:37:00 2012        
(r241855)
+++ head/sys/x86/cpufreq/p4tcc.c        Mon Oct 22 03:41:14 2012        
(r241856)
@@ -139,10 +139,6 @@ p4tcc_identify(driver_t *driver, device_
 static int
 p4tcc_probe(device_t dev)
 {
-
-       if (resource_disabled("p4tcc", 0))
-               return (ENXIO);
-
        device_set_desc(dev, "CPU Frequency Thermal Control");
        return (0);
 }

Modified: head/sys/x86/isa/elcr.c
==============================================================================
--- head/sys/x86/isa/elcr.c     Mon Oct 22 03:37:00 2012        (r241855)
+++ head/sys/x86/isa/elcr.c     Mon Oct 22 03:41:14 2012        (r241856)
@@ -84,8 +84,6 @@ elcr_probe(void)
                                printf("  E");
                printf("\n");
        }
-       if (resource_disabled("elcr", 0))
-               return (ENXIO);
        elcr_found = 1;
        return (0);
 }
_______________________________________________
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