diff options
author | Guenter Roeck <linux@roeck-us.net> | 2021-05-03 06:53:00 -0700 |
---|---|---|
committer | Jason Wang <jasowang@redhat.com> | 2021-05-27 11:03:07 +0800 |
commit | f607dce2ed0a78bee3da6482c7abe58a80df2974 (patch) | |
tree | 336b9fd60f0885d5822d16c1bf69d3a1f8fdff87 /hw/net/trace-events | |
parent | d90f154867ec0ec22fd719164b88716e8fd48672 (diff) | |
download | qemu-f607dce2ed0a78bee3da6482c7abe58a80df2974.zip qemu-f607dce2ed0a78bee3da6482c7abe58a80df2974.tar.gz qemu-f607dce2ed0a78bee3da6482c7abe58a80df2974.tar.bz2 |
hw/net/imx_fec: return 0xffff when accessing non-existing PHY
If a PHY does not exist, attempts to read from it should return 0xffff.
Otherwise the Linux kernel will believe that a PHY is there and select
the non-existing PHY. This in turn will result in network errors later
on since the real PHY is not selected or configured.
Since reading from or writing to a non-existing PHY is not an emulation
error, replace guest error messages with traces.
Fixes: 461c51ad4275 ("Add a phy-num property to the i.MX FEC emulator")
Cc: Jean-Christophe Dubois <jcd@tribudubois.net>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'hw/net/trace-events')
-rw-r--r-- | hw/net/trace-events | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/net/trace-events b/hw/net/trace-events index baf25ff..78e8566 100644 --- a/hw/net/trace-events +++ b/hw/net/trace-events @@ -414,7 +414,9 @@ i82596_channel_attention(void *s) "%p: Received CHANNEL ATTENTION" # imx_fec.c imx_phy_read(uint32_t val, int phy, int reg) "0x%04"PRIx32" <= phy[%d].reg[%d]" +imx_phy_read_num(int phy, int configured) "read request from unconfigured phy %d (configured %d)" imx_phy_write(uint32_t val, int phy, int reg) "0x%04"PRIx32" => phy[%d].reg[%d]" +imx_phy_write_num(int phy, int configured) "write request to unconfigured phy %d (configured %d)" imx_phy_update_link(const char *s) "%s" imx_phy_reset(void) "" imx_fec_read_bd(uint64_t addr, int flags, int len, int data) "tx_bd 0x%"PRIx64" flags 0x%04x len %d data 0x%08x" |