aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/e1000
diff options
context:
space:
mode:
authorEitan Adler <eadler@FreeBSD.org>2012-10-22 13:06:09 +0000
committerEitan Adler <eadler@FreeBSD.org>2012-10-22 13:06:09 +0000
commita8de37b0244d1101e634922d018579cc3073318f (patch)
tree07e19b18864f030899e170c445daf41bd547c6d1 /sys/dev/e1000
parent7994d24f0c2194c99c01a9f8b3c97b08b4984c46 (diff)
downloadsrc-a8de37b0244d1101e634922d018579cc3073318f.tar.gz
src-a8de37b0244d1101e634922d018579cc3073318f.zip
This isn't functionally identical. In some cases a hint to disable
unit 0 would in fact disable all units. This reverts r241856 Approved by: cperciva (implicit)
Notes
Notes: svn path=/head/; revision=241885
Diffstat (limited to 'sys/dev/e1000')
-rw-r--r--sys/dev/e1000/if_em.c5
-rw-r--r--sys/dev/e1000/if_igb.c5
-rw-r--r--sys/dev/e1000/if_lem.c5
3 files changed, 15 insertions, 0 deletions
diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c
index c64b417f15ff..112b538f5585 100644
--- a/sys/dev/e1000/if_em.c
+++ b/sys/dev/e1000/if_em.c
@@ -472,6 +472,11 @@ 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;
diff --git a/sys/dev/e1000/if_igb.c b/sys/dev/e1000/if_igb.c
index ae3665843640..13189108c060 100644
--- a/sys/dev/e1000/if_igb.c
+++ b/sys/dev/e1000/if_igb.c
@@ -460,6 +460,11 @@ 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));
diff --git a/sys/dev/e1000/if_lem.c b/sys/dev/e1000/if_lem.c
index aeb32952de68..cce734695ace 100644
--- a/sys/dev/e1000/if_lem.c
+++ b/sys/dev/e1000/if_lem.c
@@ -390,6 +390,11 @@ 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));