qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Bernhard Beschow <shentey@gmail.com>
To: qemu-devel@nongnu.org
Cc: Jason Wang <jasowang@redhat.com>,
	Guenter Roeck <linux@roeck-us.net>,
	qemu-arm@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	Bernhard Beschow <shentey@gmail.com>
Subject: [PATCH v3 3/5] hw/net/lan9118_phy: Fix off-by-one error in MII_ANLPAR register
Date: Sat,  2 Nov 2024 13:57:22 +0100	[thread overview]
Message-ID: <20241102125724.532843-4-shentey@gmail.com> (raw)
In-Reply-To: <20241102125724.532843-1-shentey@gmail.com>

Turns 0x70 into 0xe0 (== 0x70 << 1) which adds the missing MII_ANLPAR_TX and
fixes the MSB of selector field to be zero, as specified in the datasheet.

Fixes: 2a424990170b "LAN9118 emulation"
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
 hw/net/lan9118_phy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/net/lan9118_phy.c b/hw/net/lan9118_phy.c
index d2dcd732ac..d8fc9ddd3a 100644
--- a/hw/net/lan9118_phy.c
+++ b/hw/net/lan9118_phy.c
@@ -54,7 +54,7 @@ uint16_t lan9118_phy_read(Lan9118PhyState *s, int reg)
         val = s->advertise;
         break;
     case 5: /* Auto-neg Link Partner Ability */
-        val = 0x0f71;
+        val = 0x0fe1;
         break;
     case 6: /* Auto-neg Expansion */
         val = 1;
-- 
2.47.0



  parent reply	other threads:[~2024-11-02 12:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-02 12:57 [PATCH v3 0/5] Consolidate lan9118 phy implementations Bernhard Beschow
2024-11-02 12:57 ` [PATCH v3 1/5] hw/net/lan9118: Extract lan9118_phy Bernhard Beschow
2024-11-04 15:35   ` Guenter Roeck
2024-12-02 14:31   ` Peter Maydell
2024-11-02 12:57 ` [PATCH v3 2/5] hw/net/lan9118_phy: Reuse in imx_fec and consolidate implementations Bernhard Beschow
2024-11-04 15:35   ` Guenter Roeck
2024-12-02 14:32   ` Peter Maydell
2024-11-02 12:57 ` Bernhard Beschow [this message]
2024-11-04 15:35   ` [PATCH v3 3/5] hw/net/lan9118_phy: Fix off-by-one error in MII_ANLPAR register Guenter Roeck
2024-12-02 14:31   ` Peter Maydell
2024-11-02 12:57 ` [PATCH v3 4/5] hw/net/lan9118_phy: Reuse MII constants Bernhard Beschow
2024-11-04 15:36   ` Guenter Roeck
2024-11-02 12:57 ` [PATCH v3 5/5] hw/net/lan9118_phy: Add missing 100 mbps full duplex advertisement Bernhard Beschow
2024-11-04 15:36   ` Guenter Roeck
2024-12-02 14:33 ` [PATCH v3 0/5] Consolidate lan9118 phy implementations Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241102125724.532843-4-shentey@gmail.com \
    --to=shentey@gmail.com \
    --cc=jasowang@redhat.com \
    --cc=linux@roeck-us.net \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).