Subject: Re: [PATCH 1/4] NetXen: Fix link status messages

From: Jeff Garzik <[email-masked]>
Date: Sat, 09 Jun 2007 18:22:30 -0400

Mithlesh Thukral wrote:
> -	if ((netif_running(netdev)) && !netif_carrier_ok(netdev)) {
> -		printk(KERN_INFO "%s port %d, %s carrier is now ok\n",
> -		       netxen_nic_driver_name, adapter->portnum, netdev->name);
> +	if ((netdev->flags & IFF_UP) && !netif_carrier_ok(netdev) &&
> +			netxen_nic_link_ok(adapter) ) {
> +		printk(KERN_INFO "%s %s (port %d), Link is up\n",
> +			       netxen_nic_driver_name, netdev->name, adapter->portnum);
>  		netif_carrier_on(netdev);
> -	}
> -
> -	if (netif_queue_stopped(netdev))
>  		netif_wake_queue(netdev);
> +	} else if(!(netdev->flags & IFF_UP) && netif_carrier_ok(netdev)) {
> +		printk(KERN_ERR "%s %s Link is Down\n",
> +				netxen_nic_driver_name, netdev->name);
> +		netif_carrier_off(netdev);
> +		netif_stop_queue(netdev);

Most of the patch is OK, but by substituting IFF_UP tests for 
netif_running(), you are removing race-free, correct tests and replacing 
them with incorrect, racy tests.

NAK the IFF_UP changes.  the rest looks OK.

	Jeff