netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: andrew@lunn.ch
Cc: netdev@vger.kernel.org, cphealy@gmail.com, fugang.duan@nxp.com,
	leonard.crestez@nxp.com
Subject: Re: [PATCH net-next] net: ethernet: fec: Prevent MII event after MII_SPEED write
Date: Tue, 28 Apr 2020 14:33:39 -0700 (PDT)	[thread overview]
Message-ID: <20200428.143339.1189475969435668035.davem@davemloft.net> (raw)
In-Reply-To: <20200428175833.30517-1-andrew@lunn.ch>

From: Andrew Lunn <andrew@lunn.ch>
Date: Tue, 28 Apr 2020 19:58:33 +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.
> 
> Fixes: 29ae6bd1b0d8 ("net: ethernet: fec: Replace interrupt driven MDIO with polled IO")
> Reported-by: Andy Duan <fugang.duan@nxp.com>
> Suggested-by: Andy Duan <fugang.duan@nxp.com>
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>

Applied to net-next, thanks.

  parent reply	other threads:[~2020-04-28 21:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-28 17:58 [PATCH net-next] net: ethernet: fec: Prevent MII event after MII_SPEED write Andrew Lunn
2020-04-28 18:01 ` Andrew Lunn
2020-04-29  1:39   ` [EXT] " Andy Duan
2020-04-28 21:33 ` David Miller [this message]
2020-04-29  1:55   ` Andy Duan
2020-04-29  3:34     ` David Miller
2020-04-29  3:43       ` Andy Duan
2020-04-29 14:11         ` Andrew Lunn
2020-04-29 19:16           ` David Miller
2020-04-29  1:53 ` [EXT] " Andy Duan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200428.143339.1189475969435668035.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=andrew@lunn.ch \
    --cc=cphealy@gmail.com \
    --cc=fugang.duan@nxp.com \
    --cc=leonard.crestez@nxp.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).