netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mithlesh Thukral <mithlesh@netxen.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: netdev@vger.kernel.org, amitkale@netxen.com,
	netxenproj@linsyssoft.com, rob@netxen.com
Subject: Re: [PATCH 1/4] NetXen: Fix link status messages
Date: Mon, 11 Jun 2007 12:07:23 +0530	[thread overview]
Message-ID: <200706111207.23445.mithlesh@netxen.com> (raw)
In-Reply-To: <466B2826.2060007@garzik.org>

On Sunday 10 June 2007 03:52, Jeff Garzik wrote:
> 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.
I will rework the IFF_UP tests using netif_running(), test and resubmit the 
patches again.

Thanks,
Mithlesh Thukral
>
> 	Jeff

      reply	other threads:[~2007-06-11  6:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-07 11:30 [PATCH 1/4] NetXen: Fix link status messages Mithlesh Thukral
2007-06-09 22:22 ` Jeff Garzik
2007-06-11  6:37   ` Mithlesh Thukral [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200706111207.23445.mithlesh@netxen.com \
    --to=mithlesh@netxen.com \
    --cc=amitkale@netxen.com \
    --cc=jeff@garzik.org \
    --cc=netdev@vger.kernel.org \
    --cc=netxenproj@linsyssoft.com \
    --cc=rob@netxen.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).