diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2015-04-28 12:41:43 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-04-28 12:41:45 +0200 |
commit | acd1d67ea22dd0e140bf5d085e03243053c31935 (patch) | |
tree | 944b8c90240f31be1b530144454f272a530442f9 /net | |
parent | efe0fa9e927a699d1d0e09ad56e8ba9eb08a61e2 (diff) | |
download | barebox-acd1d67ea22dd0e140bf5d085e03243053c31935.tar.gz barebox-acd1d67ea22dd0e140bf5d085e03243053c31935.tar.xz |
eth: halt active ethernet device on unregister
When an active ethernet device is unregistered it should
be halted to quiesce the device.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'net')
-rw-r--r-- | net/eth.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -385,6 +385,9 @@ void eth_unregister(struct eth_device *edev) if (edev == eth_current) eth_current = NULL; + if (edev->active) + edev->halt(edev); + if (IS_ENABLED(CONFIG_OFDEVICE)) free(edev->nodepath); |