From: David Miller <davem@davemloft.net>
To: jeff@garzik.org
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH/RFA] sch_generic: fix carrier-on bug?
Date: Wed, 17 Oct 2007 23:26:05 -0700 (PDT) [thread overview]
Message-ID: <20071017.232605.74748149.davem@davemloft.net> (raw)
In-Reply-To: <20071016215555.GA4732@havoc.gtf.org>
From: Jeff Garzik <jeff@garzik.org>
Date: Tue, 16 Oct 2007 17:55:55 -0400
> While looking at a net driver with the following construct,
>
> if (!netif_carrier_ok(dev))
> netif_carrier_on(dev);
>
> it stuck me that the netif_carrier_ok() check was redundant, since
> netif_carrier_on() checks bit __LINK_STATE_NOCARRIER anyway. This is
> the same reason why netif_queue_stopped() need not be called prior to
> netif_wake_queue().
>
> This is true, but there is however an unwanted side effect from assuming
> that netif_carrier_on() can be called multiple times: it touches the
> watchdog, regardless of pre-existing carrier state.
>
> The fix: move watchdog-up inside the bit-cleared code path.
>
> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
I see no problems with this patch, I'll apply it, thanks!
prev parent reply other threads:[~2007-10-18 6:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-16 21:55 [PATCH/RFA] sch_generic: fix carrier-on bug? Jeff Garzik
2007-10-18 6:26 ` David Miller [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=20071017.232605.74748149.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=jeff@garzik.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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