From: Stanislaw Gruszka <sgruszka@redhat.com>
To: Gertjan van Wingerde <gwingerde@gmail.com>
Cc: Helmut Schaa <helmut.schaa@googlemail.com>,
"John W. Linville" <linville@tuxdriver.com>,
linux-wireless@vger.kernel.org, users@rt2x00.serialmonkey.com
Subject: Re: [PATCH 3.3] rt2x00: fix random stalls
Date: Wed, 7 Mar 2012 19:25:24 +0100 [thread overview]
Message-ID: <20120307182523.GA15839@redhat.com> (raw)
In-Reply-To: <CAL1gcdNZR6KoZeQkW1EaZp5ptH9X5M+vhpo7pnPyUvkE6p6qDg@mail.gmail.com>
On Tue, Mar 06, 2012 at 01:08:04PM +0100, Gertjan van Wingerde wrote:
> On Tue, Mar 6, 2012 at 12:53 PM, Stanislaw Gruszka <sgruszka@redhat.com> wrote:
> > On Tue, Mar 06, 2012 at 08:45:21AM +0100, Helmut Schaa wrote:
> >> > - if (!rt2x00queue_threshold(entry->queue))
> >> > + if (!rt2x00queue_threshold(entry->queue)) {
> >> > + spin_lock_irq(&entry->queue->tx_lock);
> >> > rt2x00queue_unpause_queue(entry->queue);
> >> > + spin_unlock_irq(&entry->queue->tx_lock);
> >>
> >> Why do we need to disable interrupts here? spin_lock_bh should
> >> be sufficient.
> >
> > I'm not 100% sure, and I was to lazy to find out, and chose safer
> > version. I guess I need to find out now ...
Ok, locking with bh is fine.
> That is actually a good point of Helmut. In all other cases where the tx_lock
> is used we actually use spin_lock and spin_unlock. AFAIK we shouldn't mix
> the different spinlock variants, so with this the other uses may have to change
> as well.
We use this lock only in rt2x00mac_tx (2 times) with bh disabled by
generic net or mac80211 layer. And now from txdone in process context
(usb) or tasklet (pci), so existing spin_lock function version does not
need to be changed.
On the meantime, I realized that we should also serialize
rt2x00queue_threshold(). I'll post second version of a patch shortly.
Stanislaw
next prev parent reply other threads:[~2012-03-07 18:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-05 16:48 [PATCH 3.3] rt2x00: fix random stalls Stanislaw Gruszka
2012-03-05 19:27 ` [rt2x00-users] " Ivo Van Doorn
2012-03-05 19:54 ` Gertjan van Wingerde
2012-03-06 6:53 ` Stanislaw Gruszka
2012-03-06 7:45 ` Helmut Schaa
2012-03-06 11:53 ` Stanislaw Gruszka
2012-03-06 12:08 ` Gertjan van Wingerde
2012-03-07 18:25 ` Stanislaw Gruszka [this message]
[not found] ` <4F564CDC.5040808@gmail.com>
2012-03-06 21:37 ` Martin Hundebøll
2012-03-07 18:46 ` Stanislaw Gruszka
2012-03-11 9:53 ` Martin Hundebøll
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=20120307182523.GA15839@redhat.com \
--to=sgruszka@redhat.com \
--cc=gwingerde@gmail.com \
--cc=helmut.schaa@googlemail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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).