From: Dominic Chen <d.c.ddcc@gmail.com>
To: jasowang@redhat.com
Cc: qemu-devel@nongnu.org, Dominic Chen <d.c.ddcc@gmail.com>
Subject: [PATCH] e1000: emulate additional dummy M88 registers
Date: Tue, 21 Jan 2020 16:14:58 -0500 [thread overview]
Message-ID: <20200121211458.62838-1-d.c.ddcc@gmail.com> (raw)
Certain drivers will write to the M88E1000_PHY_PAGE_SELECT and M88E1000_PHY_GEN_CONTROL
registers on the M88 PHY, so perform dummy reads/writes instead of returning errors.
Signed-off-by: Dominic Chen <d.c.ddcc@gmail.com>
---
hw/net/e1000.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/hw/net/e1000.c b/hw/net/e1000.c
index a73f8d404e..52c5d80042 100644
--- a/hw/net/e1000.c
+++ b/hw/net/e1000.c
@@ -206,13 +206,14 @@ enum { NPHYWRITEOPS = ARRAY_SIZE(phyreg_writeops) };
enum { PHY_R = 1, PHY_W = 2, PHY_RW = PHY_R | PHY_W };
static const char phy_regcap[0x20] = {
- [PHY_STATUS] = PHY_R, [M88E1000_EXT_PHY_SPEC_CTRL] = PHY_RW,
- [PHY_ID1] = PHY_R, [M88E1000_PHY_SPEC_CTRL] = PHY_RW,
- [PHY_CTRL] = PHY_RW, [PHY_1000T_CTRL] = PHY_RW,
- [PHY_LP_ABILITY] = PHY_R, [PHY_1000T_STATUS] = PHY_R,
- [PHY_AUTONEG_ADV] = PHY_RW, [M88E1000_RX_ERR_CNTR] = PHY_R,
- [PHY_ID2] = PHY_R, [M88E1000_PHY_SPEC_STATUS] = PHY_R,
- [PHY_AUTONEG_EXP] = PHY_R,
+ [PHY_CTRL] = PHY_RW, [PHY_1000T_CTRL] = PHY_RW,
+ [PHY_STATUS] = PHY_R, [PHY_ID1] = PHY_R,
+ [PHY_ID2] = PHY_R, [PHY_AUTONEG_ADV] = PHY_RW,
+ [PHY_LP_ABILITY] = PHY_R, [PHY_AUTONEG_EXP] = PHY_R,
+ [PHY_1000T_STATUS] = PHY_R, [M88E1000_PHY_SPEC_CTRL] = PHY_RW,
+ [M88E1000_PHY_SPEC_STATUS] = PHY_R, [M88E1000_EXT_PHY_SPEC_CTRL] = PHY_RW,
+ [M88E1000_RX_ERR_CNTR] = PHY_R, [M88E1000_PHY_PAGE_SELECT] = PHY_RW,
+ [M88E1000_PHY_GEN_CONTROL] = PHY_RW,
};
/* PHY_ID2 documented in 8254x_GBe_SDM.pdf, pp. 250 */
--
2.17.1
reply other threads:[~2020-01-21 21:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20200121211458.62838-1-d.c.ddcc@gmail.com \
--to=d.c.ddcc@gmail.com \
--cc=jasowang@redhat.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.