# HG changeset patch
# User Patrick Bruenn
# Date 1401977653 -7200
# Node ID 2f3078ec9ffb1004cef2ad5b7eef34bf229305d6
# Parent d70aad2f131f2a9063b5383d8a1971bf4920c365
move first *_carrier_off() in front of register_netdev()/ ecdev_open()
diff -r d70aad2f131f -r 2f3078ec9ffb devices/ccat/netdev.c
--- a/devices/ccat/netdev.c Thu Jun 05 16:07:52 2014 +0200
+++ b/devices/ccat/netdev.c Thu Jun 05 16:14:13 2014 +0200
@@ -320,6 +320,8 @@
priv->stop_queue = ecdev_nop;
priv->tx_fifo_full = ecdev_tx_fifo_full;
priv->unregister = unregister_ecdev;
+
+ priv->carrier_off(netdev);
if (ecdev_open(priv->ecdev)) {
pr_info("unable to register network device.\n");
ecdev_withdraw(priv->ecdev);
@@ -339,6 +341,8 @@
priv->stop_queue = netif_stop_queue;
priv->tx_fifo_full = ccat_eth_tx_fifo_full;
priv->unregister = unregister_netdev;
+
+ priv->carrier_off(netdev);
if (register_netdev(netdev)) {
pr_info("unable to register network device.\n");
ccat_eth_priv_free_dma(priv);
@@ -361,7 +365,6 @@
{
struct ccat_eth_priv *const priv = netdev_priv(dev);
- priv->carrier_off(dev);
hrtimer_init(&priv->poll_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
priv->poll_timer.function = poll_timer_callback;
hrtimer_start(&priv->poll_timer, ktime_set(0, 100000),