Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Sergei Shtylyov and committed by
David S. Miller
ad846aa5 d78a1f08

+4 -2
+4 -2
drivers/net/ethernet/renesas/sh_eth.c
··· 1312 1312 if (start) { 1313 1313 /* Setting the Rx mode will start the Rx process. */ 1314 1314 sh_eth_write(ndev, EDRRR_R, EDRRR); 1315 - 1316 - netif_start_queue(ndev); 1317 1315 } 1318 1316 1319 1317 return ret; ··· 2259 2261 if (ret) 2260 2262 goto out_free_irq; 2261 2263 2264 + netif_start_queue(ndev); 2265 + 2262 2266 mdp->is_opened = 1; 2263 2267 2264 2268 return ret; ··· 2304 2304 2305 2305 /* device init */ 2306 2306 sh_eth_dev_init(ndev, true); 2307 + 2308 + netif_start_queue(ndev); 2307 2309 } 2308 2310 2309 2311 /* Packet transmit function */