Send users mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        
http://rt2x00.serialmonkey.com/mailman/listinfo/users_rt2x00.serialmonkey.com

or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of users digest..."


Today's Topics:

   1. Re: [PATCH 5/5] rt2x00: Avoid unnecessary uncached reads in
      rt2800pci (Helmut Schaa)
   2. Re: [PATCH 5/5] rt2x00: Avoid unnecessary uncached reads in
      rt2800pci (Helmut Schaa)
   3. Re: [PATCH 5/5] rt2x00: Avoid unnecessary uncached reads in
      rt2800pci (Ivo Van Doorn)
   4. Re: [PATCH 5/5] rt2x00: Avoid unnecessary uncached reads in
      rt2800pci (Helmut Schaa)
   5. Re: [PATCH 5/5] rt2x00: Avoid unnecessary uncached reads in
      rt2800pci (Ivo Van Doorn)
   6. [PATCH 5/5 v2] rt2x00: Avoid unnecessary uncached reads in
      rt2800pci (Helmut Schaa)


----------------------------------------------------------------------

Message: 1
Date: Fri, 2 Sep 2011 09:00:18 +0200
From: Helmut Schaa <[email protected]>
To: Ivo Van Doorn <[email protected]>
Cc: [email protected]
Subject: Re: [rt2x00-users] [PATCH 5/5] rt2x00: Avoid unnecessary
        uncached reads in rt2800pci
Message-ID:
        <cagxe3d8lj9dtjpgg0quww0cmleqkzwlpoahdpmjltghtyzp...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

On Thu, Sep 1, 2011 at 5:35 PM, Ivo Van Doorn <[email protected]> wrote:
> On Thu, Sep 1, 2011 at 3:36 PM, Helmut Schaa
> <[email protected]> wrote:
>> Reading the TX desciptor words from coherent memory is always uncached
>> and potentially slow. Hence, don't read the TX descriptor prior to
>> writing it since we update all fields anyway.
>>
>> Signed-off-by: Helmut Schaa <[email protected]>
>
> Could you create (a separate) patch which does the same for the other drivers?

Sure :)
Helmut



------------------------------

Message: 2
Date: Fri, 2 Sep 2011 09:01:00 +0200
From: Helmut Schaa <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: Re: [rt2x00-users] [PATCH 5/5] rt2x00: Avoid unnecessary
        uncached reads in rt2800pci
Message-ID:
        <cagxe3d8y0sapnpgxaa1-sdkwjvnl-byhyjfz92dwmnt9fdg...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

On Fri, Sep 2, 2011 at 1:15 AM, Eduardo Kienetz <[email protected]> wrote:
> On Thu, Sep 1, 2011 at 4:49 PM, Ivo Van Doorn <[email protected]> wrote:
>> Hi,
>>
>>> --- a/drivers/net/wireless/rt2x00/rt2800pci.c
>>> +++ b/drivers/net/wireless/rt2x00/rt2800pci.c
>>> @@ -619,11 +619,9 @@ static void rt2800pci_write_tx_desc(struct queue_entry 
>>> *entry,
>>> ? ? ? ?/*
>>> ? ? ? ? * Initialize TX descriptor
>>> ? ? ? ? */
>>> - ? ? ? rt2x00_desc_read(txd, 0, &word);
>>> ? ? ? ?rt2x00_set_field32(&word, TXD_W0_SD_PTR0, skbdesc->skb_dma);
>>> ? ? ? ?rt2x00_desc_write(txd, 0, word);
>>
>> Instead of removing the rt2x00_desc_read completely, would replacing it with
>> a 'word = 0' be nicer (and prevent problems in case we don't set all the 
>> fields
>> of the word)?
>
> That's what he did if you look carefully at the diff :)
> Or did I misunderstand your comment?

Only for the last word since we don't touch every bit in it. The first two words
are always initialized completely.

Helmut



------------------------------

Message: 3
Date: Fri, 2 Sep 2011 09:59:22 +0200
From: Ivo Van Doorn <[email protected]>
To: Helmut Schaa <[email protected]>
Cc: [email protected], [email protected]
Subject: Re: [rt2x00-users] [PATCH 5/5] rt2x00: Avoid unnecessary
        uncached reads in rt2800pci
Message-ID:
        <caozox0v34yonphcauebhlczrlpvbweimep8hz7qzfocqeaf...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Hi,

On Fri, Sep 2, 2011 at 9:01 AM, Helmut Schaa
<[email protected]> wrote:
> On Fri, Sep 2, 2011 at 1:15 AM, Eduardo Kienetz <[email protected]> wrote:
>> On Thu, Sep 1, 2011 at 4:49 PM, Ivo Van Doorn <[email protected]> wrote:
>>> Hi,
>>>
>>>> --- a/drivers/net/wireless/rt2x00/rt2800pci.c
>>>> +++ b/drivers/net/wireless/rt2x00/rt2800pci.c
>>>> @@ -619,11 +619,9 @@ static void rt2800pci_write_tx_desc(struct 
>>>> queue_entry *entry,
>>>> ? ? ? ?/*
>>>> ? ? ? ? * Initialize TX descriptor
>>>> ? ? ? ? */
>>>> - ? ? ? rt2x00_desc_read(txd, 0, &word);
>>>> ? ? ? ?rt2x00_set_field32(&word, TXD_W0_SD_PTR0, skbdesc->skb_dma);
>>>> ? ? ? ?rt2x00_desc_write(txd, 0, word);
>>>
>>> Instead of removing the rt2x00_desc_read completely, would replacing it with
>>> a 'word = 0' be nicer (and prevent problems in case we don't set all the 
>>> fields
>>> of the word)?
>>
>> That's what he did if you look carefully at the diff :)
>> Or did I misunderstand your comment?
>
> Only for the last word since we don't touch every bit in it. The first two 
> words
> are always initialized completely.

Well I missed that last word, but yeah it would look cleaner to me if
all 3 times the
word was initialized to 0. :)

Ivo



------------------------------

Message: 4
Date: Fri, 2 Sep 2011 10:04:19 +0200
From: Helmut Schaa <[email protected]>
To: Ivo Van Doorn <[email protected]>
Cc: [email protected], [email protected]
Subject: Re: [rt2x00-users] [PATCH 5/5] rt2x00: Avoid unnecessary
        uncached reads in rt2800pci
Message-ID:
        <cagxe3d-6ky0zcbmt0z8ps66fevzchgwhczqtdgksok1rpxm...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

On Fri, Sep 2, 2011 at 9:59 AM, Ivo Van Doorn <[email protected]> wrote:
> Hi,
>
> On Fri, Sep 2, 2011 at 9:01 AM, Helmut Schaa
> <[email protected]> wrote:
>> On Fri, Sep 2, 2011 at 1:15 AM, Eduardo Kienetz <[email protected]> wrote:
>>> On Thu, Sep 1, 2011 at 4:49 PM, Ivo Van Doorn <[email protected]> wrote:
>>>> Hi,
>>>>
>>>>> --- a/drivers/net/wireless/rt2x00/rt2800pci.c
>>>>> +++ b/drivers/net/wireless/rt2x00/rt2800pci.c
>>>>> @@ -619,11 +619,9 @@ static void rt2800pci_write_tx_desc(struct 
>>>>> queue_entry *entry,
>>>>> ? ? ? ?/*
>>>>> ? ? ? ? * Initialize TX descriptor
>>>>> ? ? ? ? */
>>>>> - ? ? ? rt2x00_desc_read(txd, 0, &word);
>>>>> ? ? ? ?rt2x00_set_field32(&word, TXD_W0_SD_PTR0, skbdesc->skb_dma);
>>>>> ? ? ? ?rt2x00_desc_write(txd, 0, word);
>>>>
>>>> Instead of removing the rt2x00_desc_read completely, would replacing it 
>>>> with
>>>> a 'word = 0' be nicer (and prevent problems in case we don't set all the 
>>>> fields
>>>> of the word)?
>>>
>>> That's what he did if you look carefully at the diff :)
>>> Or did I misunderstand your comment?
>>
>> Only for the last word since we don't touch every bit in it. The first two 
>> words
>> are always initialized completely.
>
> Well I missed that last word, but yeah it would look cleaner to me if
> all 3 times the
> word was initialized to 0. :)

Fine with me, I'll respin that one.

Helmut



------------------------------

Message: 5
Date: Fri, 2 Sep 2011 10:10:18 +0200
From: Ivo Van Doorn <[email protected]>
To: Helmut Schaa <[email protected]>
Cc: [email protected], [email protected]
Subject: Re: [rt2x00-users] [PATCH 5/5] rt2x00: Avoid unnecessary
        uncached reads in rt2800pci
Message-ID:
        <caozox0uw2p9wnnqdyceaw-w1o0oppeoyemapg2bba07wrbb...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Hi,

On Fri, Sep 2, 2011 at 10:04 AM, Helmut Schaa
<[email protected]> wrote:
> On Fri, Sep 2, 2011 at 9:59 AM, Ivo Van Doorn <[email protected]> wrote:
>> Hi,
>>
>> On Fri, Sep 2, 2011 at 9:01 AM, Helmut Schaa
>> <[email protected]> wrote:
>>> On Fri, Sep 2, 2011 at 1:15 AM, Eduardo Kienetz <[email protected]> wrote:
>>>> On Thu, Sep 1, 2011 at 4:49 PM, Ivo Van Doorn <[email protected]> wrote:
>>>>> Hi,
>>>>>
>>>>>> --- a/drivers/net/wireless/rt2x00/rt2800pci.c
>>>>>> +++ b/drivers/net/wireless/rt2x00/rt2800pci.c
>>>>>> @@ -619,11 +619,9 @@ static void rt2800pci_write_tx_desc(struct 
>>>>>> queue_entry *entry,
>>>>>> ? ? ? ?/*
>>>>>> ? ? ? ? * Initialize TX descriptor
>>>>>> ? ? ? ? */
>>>>>> - ? ? ? rt2x00_desc_read(txd, 0, &word);
>>>>>> ? ? ? ?rt2x00_set_field32(&word, TXD_W0_SD_PTR0, skbdesc->skb_dma);
>>>>>> ? ? ? ?rt2x00_desc_write(txd, 0, word);
>>>>>
>>>>> Instead of removing the rt2x00_desc_read completely, would replacing it 
>>>>> with
>>>>> a 'word = 0' be nicer (and prevent problems in case we don't set all the 
>>>>> fields
>>>>> of the word)?
>>>>
>>>> That's what he did if you look carefully at the diff :)
>>>> Or did I misunderstand your comment?
>>>
>>> Only for the last word since we don't touch every bit in it. The first two 
>>> words
>>> are always initialized completely.
>>
>> Well I missed that last word, but yeah it would look cleaner to me if
>> all 3 times the
>> word was initialized to 0. :)
>
> Fine with me, I'll respin that one.

Thanks,

btw, I'll apply you other patches locally to my rt2x00.git tree, but due to
the kernel.org hack I can't push them to the server at this time.

Ivo



------------------------------

Message: 6
Date: Fri,  2 Sep 2011 10:10:23 +0200
From: Helmut Schaa <[email protected]>
To: [email protected]
Subject: [rt2x00-users] [PATCH 5/5 v2] rt2x00: Avoid unnecessary
        uncached        reads in rt2800pci
Message-ID:
        <[email protected]>

Reading the TX desciptor words from coherent memory is always uncached
and potentially slow. Hence, don't read the TX descriptor prior to
writing it since we update all fields anyway.

Signed-off-by: Helmut Schaa <[email protected]>
---

v2: Initialize word to zero for readability reasons ...

 drivers/net/wireless/rt2x00/rt2800pci.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c 
b/drivers/net/wireless/rt2x00/rt2800pci.c
index 2633628..e0493fb 100644
--- a/drivers/net/wireless/rt2x00/rt2800pci.c
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
@@ -619,11 +619,11 @@ static void rt2800pci_write_tx_desc(struct queue_entry 
*entry,
        /*
         * Initialize TX descriptor
         */
-       rt2x00_desc_read(txd, 0, &word);
+       word = 0;
        rt2x00_set_field32(&word, TXD_W0_SD_PTR0, skbdesc->skb_dma);
        rt2x00_desc_write(txd, 0, word);
 
-       rt2x00_desc_read(txd, 1, &word);
+       word = 0;
        rt2x00_set_field32(&word, TXD_W1_SD_LEN1, entry->skb->len);
        rt2x00_set_field32(&word, TXD_W1_LAST_SEC1,
                           !test_bit(ENTRY_TXD_MORE_FRAG, &txdesc->flags));
@@ -634,12 +634,12 @@ static void rt2800pci_write_tx_desc(struct queue_entry 
*entry,
        rt2x00_set_field32(&word, TXD_W1_DMA_DONE, 0);
        rt2x00_desc_write(txd, 1, word);
 
-       rt2x00_desc_read(txd, 2, &word);
+       word = 0;
        rt2x00_set_field32(&word, TXD_W2_SD_PTR1,
                           skbdesc->skb_dma + TXWI_DESC_SIZE);
        rt2x00_desc_write(txd, 2, word);
 
-       rt2x00_desc_read(txd, 3, &word);
+       word = 0;
        rt2x00_set_field32(&word, TXD_W3_WIV,
                           !test_bit(ENTRY_TXD_ENCRYPT_IV, &txdesc->flags));
        rt2x00_set_field32(&word, TXD_W3_QSEL, 2);
-- 
1.7.3.4




------------------------------

_______________________________________________
users mailing list
[email protected]
http://rt2x00.serialmonkey.com/mailman/listinfo/users_rt2x00.serialmonkey.com


End of users Digest, Vol 31, Issue 4
************************************

Reply via email to