Subject: Re: [PATCH] jme: fix panic on load

From: "Guo-Fu Tseng" <[email-masked]>
Date: Mon, 1 Nov 2010 00:39:14 +0800

On Sun, 31 Oct 2010 16:46:18 +0100, Eric Dumazet wrote
> Its now illegal to call netif_stop_queue() before register_netdev()
> 
> Signed-off-by: Eric Dumazet <[email-masked]>
> Cc: Guo-Fu Tseng <[email-masked]>
> ---
>  drivers/net/jme.c |    4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/net/jme.c b/drivers/net/jme.c
> index d85edf3..c57d9a4 100644
> --- a/drivers/net/jme.c
> +++ b/drivers/net/jme.c
> @@ -2955,11 +2955,7 @@ jme_init_one(struct pci_dev *pdev,
>  	 * Tell stack that we are not ready to work until open()
>  	 */
>  	netif_carrier_off(netdev);
> -	netif_stop_queue(netdev);
> 
> -	/*
> -	 * Register netdev
> -	 */
>  	rc = register_netdev(netdev);
>  	if (rc) {
>  		pr_err("Cannot register net device\n");
> 
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to [email-masked]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Can this patch be modified to move the netif_stop_queue()
after register_netdev() ?
It seems the __QUEUE_STATE_XOFF is not set after the register_netdev.
The tx_queue was kcalloc() ed without touching state flags.

Guo-Fu Tseng