diff mbox

[v5,06/10] i.MX: reset TX/RX descriptors when FEC is disabled.

Message ID 01aed21c690206e1615c77a0456694212278ee8c.1463816701.git.jcd@tribudubois.net
State New
Headers show

Commit Message

Jean-Christophe DUBOIS May 21, 2016, 8:01 a.m. UTC
According to the FEC chapter of i.MX25 reference manual

RX adn TX descriptors are reseted when the FEC device is disabled through ECR.

Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net>
---

Changes since v1:
 * Not present on v1

Changes since v2:
 * Not present on v2
 
Changes since v3:
 * Not present on v3

Changes since v4:
 * Not present on v4

 hw/net/imx_fec.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/hw/net/imx_fec.c b/hw/net/imx_fec.c
index 87e3c87..63fe20f 100644
--- a/hw/net/imx_fec.c
+++ b/hw/net/imx_fec.c
@@ -453,6 +453,8 @@  static void imx_fec_write(void *opaque, hwaddr addr,
         }
         if ((s->ecr & FEC_EN) == 0) {
             s->rx_enabled = 0;
+            s->rx_descriptor = s->erdsr;
+            s->tx_descriptor = s->etdsr;
         }
         break;
     case 0x040: /* MMFR */