Subject: Re: [PATCH for 2.6.24][NET] fs_enet: check for phydev existence in the ethtool handlers

From: Scott Wood <[email-masked]>
Date: Thu, 10 Jan 2008 11:27:08 -0600

Heiko Schocher wrote:
> diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c
> index f2a4d39..f432a18 100644
> --- a/drivers/net/fs_enet/fs_enet-main.c
> +++ b/drivers/net/fs_enet/fs_enet-main.c
> @@ -810,6 +810,10 @@ static int fs_enet_open(struct net_device *dev)
>  	if (fep->fpi->use_napi)
>  		napi_enable(&fep->napi);
> 
> +	/* to initialize the fep->cur_rx,... */
> +	/* not doing this, will cause a crash in fs_enet_rx_napi */
> +	fs_init_bds(fep->ndev);

We should do this just before napi_enable() rather than just after, to 
eliminate any chance of a race window.

Looks good otherwise.

-Scott