[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200501.152954.1266270078854134704.davem@davemloft.net>
Date: Fri, 01 May 2020 15:29:54 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: andrew@...n.ch
Cc: netdev@...r.kernel.org, fugang.duan@....com, cphealy@...il.com
Subject: Re: [PATCH net-next v2] net: ethernet: fec: Prevent MII event
after MII_SPEED write
From: Andrew Lunn <andrew@...n.ch>
Date: Wed, 29 Apr 2020 22:53:23 +0200
> The change to polled IO for MDIO completion assumes that MII events
> are only generated for MDIO transactions. However on some SoCs writing
> to the MII_SPEED register can also trigger an MII event. As a result,
> the next MDIO read has a pending MII event, and immediately reads the
> data registers before it contains useful data. When the read does
> complete, another MII event is posted, which results in the next read
> also going wrong, and the cycle continues.
>
> By writing 0 to the MII_DATA register before writing to the speed
> register, this MII event for the MII_SPEED is suppressed, and polled
> IO works as expected.
>
> v2 - Only infec_enet_mii_init()
>
> Fixes: 29ae6bd1b0d8 ("net: ethernet: fec: Replace interrupt driven MDIO with polled IO")
> Reported-by: Andy Duan <fugang.duan@....com>
> Suggested-by: Andy Duan <fugang.duan@....com>
> Signed-off-by: Andrew Lunn <andrew@...n.ch>
Hmmm, I reverted the Fixes: tag patch so you'll need to respin this I think.
Thanks.
Powered by blists - more mailing lists