summaryrefslogtreecommitdiffstats
path: root/sys/dev/e1000/if_em.c
diff options
context:
space:
mode:
authoreadler <eadler@FreeBSD.org>2012-10-22 13:06:09 +0000
committereadler <eadler@FreeBSD.org>2012-10-22 13:06:09 +0000
commit92f340b6e7dc02801983812c792c7d3964d31ef7 (patch)
tree07e19b18864f030899e170c445daf41bd547c6d1 /sys/dev/e1000/if_em.c
parenta9d460420e5a6206b25b2ffac4bcaa0d37cc837a (diff)
downloadFreeBSD-src-92f340b6e7dc02801983812c792c7d3964d31ef7.zip
FreeBSD-src-92f340b6e7dc02801983812c792c7d3964d31ef7.tar.gz
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)
Diffstat (limited to 'sys/dev/e1000/if_em.c')
-rw-r--r--sys/dev/e1000/if_em.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c
index c64b417..112b538 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;
OpenPOWER on IntegriCloud