From: Gertjan van Wingerde <gwingerde@gmail.com>
To: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: "John W. Linville" <linville@tuxdriver.com>,
linux-wireless@vger.kernel.org, users@rt2x00.serialmonkey.com,
Jakub Kicinski <moorray@wp.pl>
Subject: Re: [PATCH] rt2x00: rt2800usb: fix status register reread logic
Date: Tue, 20 Mar 2012 05:11:47 +0100 [thread overview]
Message-ID: <4F680383.8020707@gmail.com> (raw)
In-Reply-To: <1332169181-23169-1-git-send-email-sgruszka@redhat.com>
On 03/19/12 15:59, Stanislaw Gruszka wrote:
> Another good catch from Jakub Kicinski. This patch fixes my
> recent commit: ed61e2b02027935520d1be884fac0b2ffce8379a
> "rt2x00: rt2800usb: rework txdone code"
>
> We should reread status register only when nobody else start already
> reading status i.e. test_and_set_bit(TX_STATUS_READING, flags) return 0.
>
> Reported-by: Jakub Kicinski <moorray@wp.pl>
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
> ---
> drivers/net/wireless/rt2x00/rt2800usb.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
> index f97f846..001735f 100644
> --- a/drivers/net/wireless/rt2x00/rt2800usb.c
> +++ b/drivers/net/wireless/rt2x00/rt2800usb.c
> @@ -184,7 +184,7 @@ stop_reading:
> * here again if status reading is needed.
> */
> if (rt2800usb_txstatus_pending(rt2x00dev) &&
> - test_and_set_bit(TX_STATUS_READING, &rt2x00dev->flags))
> + !test_and_set_bit(TX_STATUS_READING, &rt2x00dev->flags))
> return true;
> else
> return false;
--
---
Gertjan
prev parent reply other threads:[~2012-03-20 4:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-19 14:59 [PATCH] rt2x00: rt2800usb: fix status register reread logic Stanislaw Gruszka
2012-03-20 4:11 ` Gertjan van Wingerde [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=4F680383.8020707@gmail.com \
--to=gwingerde@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=moorray@wp.pl \
--cc=sgruszka@redhat.com \
--cc=users@rt2x00.serialmonkey.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).