Commit ad846aa5 authored by Sergei Shtylyov's avatar Sergei Shtylyov Committed by David S. Miller

sh_eth: do not call netif_start_queue() from sh_eth_dev_init()

Iff  sh_eth_phy_start() call fails in sh_eth_open(), the netif_start_queue()
call done by sh_eth_dev_init()  is not undone.  In order to deal with that,
stop calling netif_start_queue()  from there, so that it can be called only
when the device is fully opened and sh_eth_dev_init() only deals with the
hardware initialization, symmetrically to sh_eth_dev_exit()...
Signed-off-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d78a1f08
...@@ -1312,8 +1312,6 @@ static int sh_eth_dev_init(struct net_device *ndev, bool start) ...@@ -1312,8 +1312,6 @@ static int sh_eth_dev_init(struct net_device *ndev, bool start)
if (start) { if (start) {
/* Setting the Rx mode will start the Rx process. */ /* Setting the Rx mode will start the Rx process. */
sh_eth_write(ndev, EDRRR_R, EDRRR); sh_eth_write(ndev, EDRRR_R, EDRRR);
netif_start_queue(ndev);
} }
return ret; return ret;
...@@ -2261,6 +2259,8 @@ static int sh_eth_open(struct net_device *ndev) ...@@ -2261,6 +2259,8 @@ static int sh_eth_open(struct net_device *ndev)
if (ret) if (ret)
goto out_free_irq; goto out_free_irq;
netif_start_queue(ndev);
mdp->is_opened = 1; mdp->is_opened = 1;
return ret; return ret;
...@@ -2304,6 +2304,8 @@ static void sh_eth_tx_timeout(struct net_device *ndev) ...@@ -2304,6 +2304,8 @@ static void sh_eth_tx_timeout(struct net_device *ndev)
/* device init */ /* device init */
sh_eth_dev_init(ndev, true); sh_eth_dev_init(ndev, true);
netif_start_queue(ndev);
} }
/* Packet transmit function */ /* Packet transmit function */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment