qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hw/net/allwinner_emac: Replace MII_ANAR_TX -> MII_ANLPAR_TX definition
@ 2021-11-22 10:51 Philippe Mathieu-Daudé
  2021-12-15 10:24 ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-11-22 10:51 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, qemu-trivial, Jason Wang,
	Philippe Mathieu-Daudé,
	Beniamino Galvani, qemu-arm

While both MII_ANAR_TX / MII_ANLPAR_TX have the same value,
the ANAR and ANLPAR registers are different, so technically
the ANLPAR register have to use the MII_ANLPAR_TX definition.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/net/allwinner_emac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/net/allwinner_emac.c b/hw/net/allwinner_emac.c
index ddddf35c45d..3aed92b8f1a 100644
--- a/hw/net/allwinner_emac.c
+++ b/hw/net/allwinner_emac.c
@@ -50,7 +50,7 @@ static void mii_reset(RTL8201CPState *mii, bool link_ok)
                 MII_BMSR_10T_HD | MII_BMSR_MFPS | MII_BMSR_AUTONEG;
     mii->anar = MII_ANAR_TXFD | MII_ANAR_TX | MII_ANAR_10FD | MII_ANAR_10 |
                 MII_ANAR_CSMACD;
-    mii->anlpar = MII_ANAR_TX;
+    mii->anlpar = MII_ANLPAR_TX;
 
     mii_set_link(mii, link_ok);
 }
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] hw/net/allwinner_emac: Replace MII_ANAR_TX -> MII_ANLPAR_TX definition
  2021-11-22 10:51 [PATCH] hw/net/allwinner_emac: Replace MII_ANAR_TX -> MII_ANLPAR_TX definition Philippe Mathieu-Daudé
@ 2021-12-15 10:24 ` Philippe Mathieu-Daudé
  2021-12-17 10:33   ` Laurent Vivier
  0 siblings, 1 reply; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-12-15 10:24 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Peter Maydell, Jason Wang, qemu-arm, Beniamino Galvani

Ping?

On 11/22/21 11:51, Philippe Mathieu-Daudé wrote:
> While both MII_ANAR_TX / MII_ANLPAR_TX have the same value,
> the ANAR and ANLPAR registers are different, so technically
> the ANLPAR register have to use the MII_ANLPAR_TX definition.
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  hw/net/allwinner_emac.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/net/allwinner_emac.c b/hw/net/allwinner_emac.c
> index ddddf35c45d..3aed92b8f1a 100644
> --- a/hw/net/allwinner_emac.c
> +++ b/hw/net/allwinner_emac.c
> @@ -50,7 +50,7 @@ static void mii_reset(RTL8201CPState *mii, bool link_ok)
>                  MII_BMSR_10T_HD | MII_BMSR_MFPS | MII_BMSR_AUTONEG;
>      mii->anar = MII_ANAR_TXFD | MII_ANAR_TX | MII_ANAR_10FD | MII_ANAR_10 |
>                  MII_ANAR_CSMACD;
> -    mii->anlpar = MII_ANAR_TX;
> +    mii->anlpar = MII_ANLPAR_TX;
>  
>      mii_set_link(mii, link_ok);
>  }
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] hw/net/allwinner_emac: Replace MII_ANAR_TX -> MII_ANLPAR_TX definition
  2021-12-15 10:24 ` Philippe Mathieu-Daudé
@ 2021-12-17 10:33   ` Laurent Vivier
  0 siblings, 0 replies; 3+ messages in thread
From: Laurent Vivier @ 2021-12-17 10:33 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: qemu-trivial, Peter Maydell, Jason Wang, qemu-arm, Beniamino Galvani

Le 15/12/2021 à 11:24, Philippe Mathieu-Daudé a écrit :
> Ping?
> 
> On 11/22/21 11:51, Philippe Mathieu-Daudé wrote:
>> While both MII_ANAR_TX / MII_ANLPAR_TX have the same value,
>> the ANAR and ANLPAR registers are different, so technically
>> the ANLPAR register have to use the MII_ANLPAR_TX definition.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>> ---
>>   hw/net/allwinner_emac.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/hw/net/allwinner_emac.c b/hw/net/allwinner_emac.c
>> index ddddf35c45d..3aed92b8f1a 100644
>> --- a/hw/net/allwinner_emac.c
>> +++ b/hw/net/allwinner_emac.c
>> @@ -50,7 +50,7 @@ static void mii_reset(RTL8201CPState *mii, bool link_ok)
>>                   MII_BMSR_10T_HD | MII_BMSR_MFPS | MII_BMSR_AUTONEG;
>>       mii->anar = MII_ANAR_TXFD | MII_ANAR_TX | MII_ANAR_10FD | MII_ANAR_10 |
>>                   MII_ANAR_CSMACD;
>> -    mii->anlpar = MII_ANAR_TX;
>> +    mii->anlpar = MII_ANLPAR_TX;
>>   
>>       mii_set_link(mii, link_ok);
>>   }
>>
> 

There are  other uses of anlpar with MII_ANAR_XXX values:

  34 static void mii_set_link(RTL8201CPState *mii, bool link_ok)
  35 {
  36     if (link_ok) {
  37         mii->bmsr |= MII_BMSR_LINK_ST | MII_BMSR_AN_COMP;
  38         mii->anlpar |= MII_ANAR_TXFD | MII_ANAR_10FD | MII_ANAR_10 |
  39                        MII_ANAR_CSMACD;
  40     } else {
  41         mii->bmsr &= ~(MII_BMSR_LINK_ST | MII_BMSR_AN_COMP);
  42         mii->anlpar = MII_ANAR_TX;
  43     }
  44 }

Thanks,
Laurent


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-12-17 10:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-22 10:51 [PATCH] hw/net/allwinner_emac: Replace MII_ANAR_TX -> MII_ANLPAR_TX definition Philippe Mathieu-Daudé
2021-12-15 10:24 ` Philippe Mathieu-Daudé
2021-12-17 10:33   ` Laurent Vivier

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).