From: Gabor Juhos <juhosg@openwrt.org>
To: Jakub Kicinski <moorray@wp.pl>
Cc: "John W. Linville" <linville@tuxdriver.com>,
linux-wireless@vger.kernel.org, users@rt2x00.serialmonkey.com
Subject: Re: [rt2x00-users] [PATCH 1/7] rt2x00: rt2x00dev: use rt2x00dev->tx->limit
Date: Mon, 03 Jun 2013 22:32:16 +0200 [thread overview]
Message-ID: <51ACFD50.7000807@openwrt.org> (raw)
In-Reply-To: <20130603190959.70b1f4d2@north>
Hi Kuba!
> On Wed, 1 May 2013 17:17:29 +0200, Gabor Juhos wrote:
>> The TX data queue is initialized already when
>> the rt2x00lib_probe_hw() function is called.
>>
>> Fetch the number of the queue entries from that
>> instead of using the entry_num field of the data
>> queue descriptor.
>>
>> The two values are the same, and the use of the
>> rt2x00dev->tx->limit value allows us to get rid
>> of a superfluous pointer dereference.
>>
>> Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
>> ---
>> drivers/net/wireless/rt2x00/rt2x00dev.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
>> index 90dc143..b287467 100644
>> --- a/drivers/net/wireless/rt2x00/rt2x00dev.c
>> +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
>> @@ -1077,7 +1077,7 @@ static int rt2x00lib_probe_hw(struct rt2x00_dev *rt2x00dev)
>> */
>> int kfifo_size =
>> roundup_pow_of_two(rt2x00dev->ops->tx_queues *
>> - rt2x00dev->ops->tx->entry_num *
>> + rt2x00dev->tx->limit *
>> sizeof(u32));
>>
>> status = kfifo_alloc(&rt2x00dev->txstatus_fifo, kfifo_size,
>
> Unfortunately this does not work without your "get rid of
> static data queue descriptors" series as well.
>
> queue->limit is set when rt2x00lib_start is called, not on
> probe. kfifo_alloc will fail with EINVAL here.
You are right. I should have been more careful while I have tested this patch-set.
> As a result support for all rt2x00 devices is broken on wireless-testing.
Only rt2800 devices are affected. The offending code runs only if
REQUIRE_TXSTATUS_FIFO is set in rt2x00dev->cap_flags which is not set for older
chips.
> Maybe you can just post the mentioned series for inclusion?
I will post a fix for the actual problem first, and will rebase the series on
top of that.
> I have been running with it since you posted it as RFC and
> I did not notice any problems so far...
Great!
-Gabor
next prev parent reply other threads:[~2013-06-03 20:32 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-01 15:17 [PATCH 0/7] rt2x00: avoid a few superfluous pointer dereferences Gabor Juhos
2013-05-01 15:17 ` [PATCH 1/7] rt2x00: rt2x00dev: use rt2x00dev->tx->limit Gabor Juhos
2013-05-01 20:05 ` Gertjan van Wingerde
2013-06-03 17:09 ` [rt2x00-users] " Jakub Kicinski
2013-06-03 20:32 ` Gabor Juhos [this message]
2013-05-01 15:17 ` [PATCH 2/7] rt2x00: rt61pci: " Gabor Juhos
2013-05-01 20:06 ` Gertjan van Wingerde
2013-05-01 15:17 ` [PATCH 3/7] rt2x00: rt2800pci: " Gabor Juhos
2013-05-01 20:06 ` Gertjan van Wingerde
2013-05-01 15:17 ` [PATCH 4/7] rt2x00: rt2800usb: use rt2x00dev->rx->limit Gabor Juhos
2013-05-01 20:07 ` Gertjan van Wingerde
2013-05-01 15:17 ` [PATCH 5/7] rt2x00: rt2800lib: use rt2x00dev->bcn->winfo_size Gabor Juhos
2013-05-01 20:07 ` Gertjan van Wingerde
2013-05-01 15:17 ` [PATCH 6/7] rt2x00: rt2x00dev: defer operational mode detection Gabor Juhos
2013-05-01 20:08 ` Gertjan van Wingerde
2013-05-01 15:17 ` [PATCH 7/7] rt2x00: rt2x00dev: use rt2x00dev->bcn->limit Gabor Juhos
2013-05-01 20:08 ` Gertjan van Wingerde
2013-05-02 7:36 ` Gabor Juhos
2013-05-22 18:53 ` John W. Linville
2013-05-01 20:10 ` [PATCH 0/7] rt2x00: avoid a few superfluous pointer dereferences Gertjan van Wingerde
2013-05-01 20:41 ` Gabor Juhos
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=51ACFD50.7000807@openwrt.org \
--to=juhosg@openwrt.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=moorray@wp.pl \
--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).