linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Drake <dsd@laptop.org>
To: Ben Hutchings <bhutchings@solarflare.com>
Cc: netdev@vger.kernel.org, libertas-dev@lists.infradead.org,
	linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: Frequent spurious tx_timeouts for libertas
Date: Mon, 2 May 2011 20:59:04 +0100	[thread overview]
Message-ID: <BANLkTi=FT4v=Jvv5bQpUX15R87kPudKq=Q@mail.gmail.com> (raw)
In-Reply-To: <1304303082.2833.159.camel@localhost>

On 2 May 2011 03:24, Ben Hutchings <bhutchings@solarflare.com> wrote:
>> Also, while looking at this code, I spotted a bug in dev_watchdog():
>>                               /*
>>                                * old device drivers set dev->trans_start
>>                                */
>>                               trans_start = txq->trans_start ? : dev->trans_start;
>>
>> i.e. it is trying to figure out whether to read trans_start from txq
>> or dev. In both cases, trans_start is updated based on the value of
>> jiffies, which will occasionally be 0 (as it wraps around). Therefore
>> this line of code will occasionally make the wrong decision.
>
> No, I don't think so.
>
> If only dev->trans_start is being updated then the watchdog reads that.
> If both txq->trans_start and dev->trans_start are being updated then it
> doesn't matter much which the watchdog reads.
> If only txq->trans_start is being updated then dev->trans_start is
> always set to 0, so when txq->trans_start is 0 the watchdog still gets
> 0.

dev->trans_start is unconditionally initialized by dev_activate() in
sch_generic.c:

	if (need_watchdog) {
		dev->trans_start = jiffies;
		dev_watchdog_up(dev);
	}

so it is (usually) not 0.

Thanks for your input on the tx timeout issue, now that I understand
it better I think the right plan of action is to remove it from
libertas entirely, I'll CC you on the patch.

Daniel

  reply	other threads:[~2011-05-02 19:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <BANLkTintnaEj0DDjwQJjc4wpuz-c_QOGyg@mail.gmail.com>
2011-05-02  2:24 ` Frequent spurious tx_timeouts for libertas Ben Hutchings
2011-05-02 19:59   ` Daniel Drake [this message]
2011-05-02 20:01     ` Daniel Drake
2011-05-02 20:47     ` Ben Hutchings
2011-05-17 20:05       ` David Miller
2011-05-03 16:47   ` Ben Hutchings

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='BANLkTi=FT4v=Jvv5bQpUX15R87kPudKq=Q@mail.gmail.com' \
    --to=dsd@laptop.org \
    --cc=bhutchings@solarflare.com \
    --cc=libertas-dev@lists.infradead.org \
    --cc=linux-wireless@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;
as well as URLs for NNTP newsgroup(s).