diff mbox series

dp8393x: Mask EOL bit from descriptor addresses, take 2

Message ID alpine.LNX.2.22.394.2003041421280.12@nippy.intranet (mailing list archive)
State New, archived
Headers show
Series dp8393x: Mask EOL bit from descriptor addresses, take 2 | expand

Commit Message

Finn Thain March 4, 2020, 3:23 a.m. UTC
A portion of a recent patch got lost due to a merge snafu. That patch is
now commit 88f632fbb1 ("dp8393x: Mask EOL bit from descriptor addresses").
This patch restores the portion that got lost.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
---
 hw/net/dp8393x.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Laurent Vivier March 4, 2020, 9:35 a.m. UTC | #1
Le 04/03/2020 à 04:23, Finn Thain a écrit :
> A portion of a recent patch got lost due to a merge snafu. That patch is
> now commit 88f632fbb1 ("dp8393x: Mask EOL bit from descriptor addresses").
> This patch restores the portion that got lost.
> 
> Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
> ---
>  hw/net/dp8393x.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c
> index 8a3504d962..81fc13ee9f 100644
> --- a/hw/net/dp8393x.c
> +++ b/hw/net/dp8393x.c
> @@ -525,8 +525,8 @@ static void dp8393x_do_transmit_packets(dp8393xState *s)
>                                   * (4 + 3 * s->regs[SONIC_TFC]),
>                                 MEMTXATTRS_UNSPECIFIED, s->data,
>                                 size);
> -            s->regs[SONIC_CTDA] = dp8393x_get(s, width, 0) & ~0x1;
> -            if (dp8393x_get(s, width, 0) & SONIC_DESC_EOL) {
> +            s->regs[SONIC_CTDA] = dp8393x_get(s, width, 0);
> +            if (s->regs[SONIC_CTDA] & SONIC_DESC_EOL) {
>                  /* EOL detected */
>                  break;
>              }
> 

Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Philippe Mathieu-Daudé March 4, 2020, 1:26 p.m. UTC | #2
On 3/4/20 4:23 AM, Finn Thain wrote:
> A portion of a recent patch got lost due to a merge snafu. That patch is
> now commit 88f632fbb1 ("dp8393x: Mask EOL bit from descriptor addresses").
> This patch restores the portion that got lost.
> 
> Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
> ---
>   hw/net/dp8393x.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c
> index 8a3504d962..81fc13ee9f 100644
> --- a/hw/net/dp8393x.c
> +++ b/hw/net/dp8393x.c
> @@ -525,8 +525,8 @@ static void dp8393x_do_transmit_packets(dp8393xState *s)
>                                    * (4 + 3 * s->regs[SONIC_TFC]),
>                                  MEMTXATTRS_UNSPECIFIED, s->data,
>                                  size);
> -            s->regs[SONIC_CTDA] = dp8393x_get(s, width, 0) & ~0x1;
> -            if (dp8393x_get(s, width, 0) & SONIC_DESC_EOL) {
> +            s->regs[SONIC_CTDA] = dp8393x_get(s, width, 0);
> +            if (s->regs[SONIC_CTDA] & SONIC_DESC_EOL) {
>                   /* EOL detected */
>                   break;
>               }
> 

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Laurent Vivier March 8, 2020, 9:52 a.m. UTC | #3
Le 04/03/2020 à 04:23, Finn Thain a écrit :
> A portion of a recent patch got lost due to a merge snafu. That patch is
> now commit 88f632fbb1 ("dp8393x: Mask EOL bit from descriptor addresses").
> This patch restores the portion that got lost.
> 
> Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
> ---
>  hw/net/dp8393x.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c
> index 8a3504d962..81fc13ee9f 100644
> --- a/hw/net/dp8393x.c
> +++ b/hw/net/dp8393x.c
> @@ -525,8 +525,8 @@ static void dp8393x_do_transmit_packets(dp8393xState *s)
>                                   * (4 + 3 * s->regs[SONIC_TFC]),
>                                 MEMTXATTRS_UNSPECIFIED, s->data,
>                                 size);
> -            s->regs[SONIC_CTDA] = dp8393x_get(s, width, 0) & ~0x1;
> -            if (dp8393x_get(s, width, 0) & SONIC_DESC_EOL) {
> +            s->regs[SONIC_CTDA] = dp8393x_get(s, width, 0);
> +            if (s->regs[SONIC_CTDA] & SONIC_DESC_EOL) {
>                  /* EOL detected */
>                  break;
>              }
> 

Jason,

as it's a trivial bug fixes (only a diff between the commit and the
patch), will you merge it via the network queue or do you want I take it
via trivial queue?

Thanks,
Laurent
Jason Wang March 9, 2020, 2:51 a.m. UTC | #4
On 2020/3/8 下午5:52, Laurent Vivier wrote:
> Le 04/03/2020 à 04:23, Finn Thain a écrit :
>> A portion of a recent patch got lost due to a merge snafu. That patch is
>> now commit 88f632fbb1 ("dp8393x: Mask EOL bit from descriptor addresses").
>> This patch restores the portion that got lost.
>>
>> Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
>> ---
>>   hw/net/dp8393x.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c
>> index 8a3504d962..81fc13ee9f 100644
>> --- a/hw/net/dp8393x.c
>> +++ b/hw/net/dp8393x.c
>> @@ -525,8 +525,8 @@ static void dp8393x_do_transmit_packets(dp8393xState *s)
>>                                    * (4 + 3 * s->regs[SONIC_TFC]),
>>                                  MEMTXATTRS_UNSPECIFIED, s->data,
>>                                  size);
>> -            s->regs[SONIC_CTDA] = dp8393x_get(s, width, 0) & ~0x1;
>> -            if (dp8393x_get(s, width, 0) & SONIC_DESC_EOL) {
>> +            s->regs[SONIC_CTDA] = dp8393x_get(s, width, 0);
>> +            if (s->regs[SONIC_CTDA] & SONIC_DESC_EOL) {
>>                   /* EOL detected */
>>                   break;
>>               }
>>
> Jason,
>
> as it's a trivial bug fixes (only a diff between the commit and the
> patch), will you merge it via the network queue or do you want I take it
> via trivial queue?


Hi Laurent:

Please merge it.

Thanks


>
> Thanks,
> Laurent
>
Laurent Vivier March 9, 2020, 8:48 a.m. UTC | #5
Le 09/03/2020 à 03:51, Jason Wang a écrit :
> 
> On 2020/3/8 下午5:52, Laurent Vivier wrote:
>> Le 04/03/2020 à 04:23, Finn Thain a écrit :
>>> A portion of a recent patch got lost due to a merge snafu. That patch is
>>> now commit 88f632fbb1 ("dp8393x: Mask EOL bit from descriptor
>>> addresses").
>>> This patch restores the portion that got lost.
>>>
>>> Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
>>> ---
>>>   hw/net/dp8393x.c | 4 ++--
>>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c
>>> index 8a3504d962..81fc13ee9f 100644
>>> --- a/hw/net/dp8393x.c
>>> +++ b/hw/net/dp8393x.c
>>> @@ -525,8 +525,8 @@ static void
>>> dp8393x_do_transmit_packets(dp8393xState *s)
>>>                                    * (4 + 3 * s->regs[SONIC_TFC]),
>>>                                  MEMTXATTRS_UNSPECIFIED, s->data,
>>>                                  size);
>>> -            s->regs[SONIC_CTDA] = dp8393x_get(s, width, 0) & ~0x1;
>>> -            if (dp8393x_get(s, width, 0) & SONIC_DESC_EOL) {
>>> +            s->regs[SONIC_CTDA] = dp8393x_get(s, width, 0);
>>> +            if (s->regs[SONIC_CTDA] & SONIC_DESC_EOL) {
>>>                   /* EOL detected */
>>>                   break;
>>>               }
>>>
>> Jason,
>>
>> as it's a trivial bug fixes (only a diff between the commit and the
>> patch), will you merge it via the network queue or do you want I take it
>> via trivial queue?
> 
> 
> Hi Laurent:
> 
> Please merge it.

Applied to my trivial-patch branch.

Thanks,
Laurent
diff mbox series

Patch

diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c
index 8a3504d962..81fc13ee9f 100644
--- a/hw/net/dp8393x.c
+++ b/hw/net/dp8393x.c
@@ -525,8 +525,8 @@  static void dp8393x_do_transmit_packets(dp8393xState *s)
                                  * (4 + 3 * s->regs[SONIC_TFC]),
                                MEMTXATTRS_UNSPECIFIED, s->data,
                                size);
-            s->regs[SONIC_CTDA] = dp8393x_get(s, width, 0) & ~0x1;
-            if (dp8393x_get(s, width, 0) & SONIC_DESC_EOL) {
+            s->regs[SONIC_CTDA] = dp8393x_get(s, width, 0);
+            if (s->regs[SONIC_CTDA] & SONIC_DESC_EOL) {
                 /* EOL detected */
                 break;
             }