There are other registers in the PHY model which should be partially or entirely read-only, but this solves the immediate issue.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3297 Signed-off-by: Jim MacArthur <[email protected]> --- See: https://gitlab.com/qemu-project/qemu/-/issues/3297 https://lore.kernel.org/qemu-devel/CAJy5ezqTAMr=a3uafmuwlepk66adlru4q8amfmh4+4q2htd...@mail.gmail.com/ IEEE 802.3-2022 does not explicitly state that these registers should be read-only, but suggests it in 22.2.4.3.1 which says this information should be entirely manufacturer-supplied information. The standard does mention several other registers in the set which should be partially or entirely read-only, so further work may be required. --- hw/net/xilinx_axienet.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/net/xilinx_axienet.c b/hw/net/xilinx_axienet.c index d85f8bb23f..970732b162 100644 --- a/hw/net/xilinx_axienet.c +++ b/hw/net/xilinx_axienet.c @@ -141,6 +141,10 @@ tdk_write(struct PHY *phy, unsigned int req, unsigned int data) regnum = req & 0x1f; DPHY(qemu_log("%s reg[%d] = %x\n", __func__, regnum, data)); switch (regnum) { + case 2: + case 3: + /* Writes to PHY Identification registers are disallowed */ + break; default: phy->regs[regnum] = data; break; --- base-commit: 3fb456e9a0e9eef6a71d9b49bfff596a0f0046e9 change-id: 20260305-xilinx-phy-protection-c396a658d072 Best regards, -- Jim MacArthur <[email protected]>
