[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 4/8] i.MX: Fix FEC code for MDIO address selectio
From: |
Jean-Christophe Dubois |
Subject: |
[Qemu-devel] [PATCH v4 4/8] i.MX: Fix FEC code for MDIO address selection |
Date: |
Thu, 19 May 2016 00:22:58 +0200 |
According to the FEC chapter of i.MX25 reference manual
When writing to MMFR register, the MDIO device and adress are selected by
bit 27 to 23 and bit 22 to 18 respectively. This is a total of 10 bits
that need to be used by the Phy chip/address decoding function.
This patch fixes the number of bits used from 9 to 10.
Signed-off-by: Jean-Christophe Dubois <address@hidden>
---
Changes since v1:
* Not present on v1
Changes since v2:
* Not present on v2
Changes since v3:
* Not present on v3
hw/net/imx_fec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/net/imx_fec.c b/hw/net/imx_fec.c
index b3f5e4a..a649027 100644
--- a/hw/net/imx_fec.c
+++ b/hw/net/imx_fec.c
@@ -459,9 +459,9 @@ static void imx_fec_write(void *opaque, hwaddr addr,
/* store the value */
s->mmfr = value;
if (extract32(value, 29, 1)) {
- s->mmfr = do_phy_read(s, extract32(value, 18, 9));
+ s->mmfr = do_phy_read(s, extract32(value, 18, 10));
} else {
- do_phy_write(s, extract32(value, 18, 9), extract32(value, 0, 16));
+ do_phy_write(s, extract32(value, 18, 10), extract32(value, 0, 16));
}
/* raise the interrupt as the PHY operation is done */
s->eir |= FEC_INT_MII;
--
2.7.4
- [Qemu-devel] [PATCH v4 0/8] Add Ethernet device for i.MX6 SOC, Jean-Christophe Dubois, 2016/05/18
- [Qemu-devel] [PATCH v4 3/8] i.MX: Fix FEC code for MDIO operation selection, Jean-Christophe Dubois, 2016/05/18
- [Qemu-devel] [PATCH v4 1/8] net: improve UDP/TCP checksum computation., Jean-Christophe Dubois, 2016/05/18
- [Qemu-devel] [PATCH v4 4/8] i.MX: Fix FEC code for MDIO address selection,
Jean-Christophe Dubois <=
- [Qemu-devel] [PATCH v4 2/8] net: handle optional VLAN header in checksum computation., Jean-Christophe Dubois, 2016/05/18
- [Qemu-devel] [PATCH v4 5/8] i.MX: Fix FEC code for ECR register reset value., Jean-Christophe Dubois, 2016/05/18
- [Qemu-devel] [PATCH v4 6/8] i.MX: move FEC device to a register array structure., Jean-Christophe Dubois, 2016/05/18
[Qemu-devel] [PATCH v4 7/8] Add ENET/Gbps Ethernet support to FEC device, Jean-Christophe Dubois, 2016/05/18