diff mbox

FSL eTSEC: Fix typo in rx ring

Message ID 1394815901-7153-1-git-send-email-chouteau@adacore.com
State New
Headers show

Commit Message

Fabien Chouteau March 14, 2014, 4:51 p.m. UTC
Signed-off-by: Fabien Chouteau <chouteau@adacore.com>
---
 hw/net/fsl_etsec/rings.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Michael Tokarev March 14, 2014, 5:35 p.m. UTC | #1
14.03.2014 20:51, Fabien Chouteau wrote:

>  hw/net/fsl_etsec/rings.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/net/fsl_etsec/rings.c b/hw/net/fsl_etsec/rings.c
> index 7760272..31e6f58 100644
> --- a/hw/net/fsl_etsec/rings.c
> +++ b/hw/net/fsl_etsec/rings.c
> @@ -592,7 +592,7 @@ void etsec_walk_rx_ring(eTSEC *etsec, int ring_nbr)
>  
>                  /* TODO: Broadcast and Multicast */
>  
> -                if (bd.flags | BD_INTERRUPT) {
> +                if (bd.flags & BD_INTERRUPT) {
>                      /* Set RXFx */
[..etc..]

Hm.  Has this code _ever_ worked?? :(

Thanks, applied to -trivial.

/mjt
Fabien Chouteau March 17, 2014, 5:08 p.m. UTC | #2
On 03/14/2014 06:35 PM, Michael Tokarev wrote:
> 14.03.2014 20:51, Fabien Chouteau wrote:
> 
>>  hw/net/fsl_etsec/rings.c |    4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/hw/net/fsl_etsec/rings.c b/hw/net/fsl_etsec/rings.c
>> index 7760272..31e6f58 100644
>> --- a/hw/net/fsl_etsec/rings.c
>> +++ b/hw/net/fsl_etsec/rings.c
>> @@ -592,7 +592,7 @@ void etsec_walk_rx_ring(eTSEC *etsec, int ring_nbr)
>>  
>>                  /* TODO: Broadcast and Multicast */
>>  
>> -                if (bd.flags | BD_INTERRUPT) {
>> +                if (bd.flags & BD_INTERRUPT) {
>>                      /* Set RXFx */
> [..etc..]
> 
> Hm.  Has this code _ever_ worked?? :(
> 

Yes because the kernel I'm using always set the BD_INTERRUPT flag.
diff mbox

Patch

diff --git a/hw/net/fsl_etsec/rings.c b/hw/net/fsl_etsec/rings.c
index 7760272..31e6f58 100644
--- a/hw/net/fsl_etsec/rings.c
+++ b/hw/net/fsl_etsec/rings.c
@@ -592,7 +592,7 @@  void etsec_walk_rx_ring(eTSEC *etsec, int ring_nbr)
 
                 /* TODO: Broadcast and Multicast */
 
-                if (bd.flags | BD_INTERRUPT) {
+                if (bd.flags & BD_INTERRUPT) {
                     /* Set RXFx */
                     etsec->regs[RSTAT].value |= 1 << (7 - ring_nbr);
 
@@ -601,7 +601,7 @@  void etsec_walk_rx_ring(eTSEC *etsec, int ring_nbr)
                 }
 
             } else {
-                if (bd.flags | BD_INTERRUPT) {
+                if (bd.flags & BD_INTERRUPT) {
                     /* Set IEVENT */
                     ievent_set(etsec, IEVENT_RXB);
                 }