hw/net/allwinner_emac: Replace MII_ANAR_TX -> MII_ANLPAR_TX definition
PATCH 1/1 hw/net/allwinner_emac: Replace MII_ANAR_TX -> MII_ANLPAR_TX definition
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.
--- hw/net/allwinner_emac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/net/allwinner_emac.c +1 -1
@@ -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); }
Signature · 1 line
2.31.1
Ping?
Quoted 23 lines · Philippe Mathieu-Daudé
While both
MII_ANAR_TX/MII_ANLPAR_TXhave the same value, the ANAR and ANLPAR registers are different, so technically the ANLPAR register have to use theMII_ANLPAR_TXdefinition.Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/net/allwinner_emac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/net/allwinner_emac.c +1
-1@@ -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); }
Le 15/12/2021 à 11:24, Philippe Mathieu-Daudé a écrit :
Quoted 23 lines
Ping?
Quoted 20 lines · Philippe Mathieu-Daudé
While both
MII_ANAR_TX/MII_ANLPAR_TXhave the same value, the ANAR and ANLPAR registers are different, so technically the ANLPAR register have to use theMII_ANLPAR_TXdefinition.Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/net/allwinner_emac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/net/allwinner_emac.c +1
-1@@ -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 ;
Quoted 4 lines
hw/net/allwinner_emac.c static void mii_reset(RTL8201CPState *mii, bool link_ok) · line 56
Quoted 3 lines
hw/net/allwinner_emac.c +0
-0mii_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