Skip to content
Commit 79206c04 authored by Vladimir Zapolskiy's avatar Vladimir Zapolskiy Committed by Tom Rini
Browse files

net: lpc32xx: fix ignored MDIO busy wait status on read



The change fixes PHY write operation, which incorrectly waits for
released busy state before issuing a write operation, this breaks
sequential write/read operation logic, because read operation
starts immediately on request and it completes, when busy state is
gone.

Instead of adding the second preceding busy state check to read
function, do busy state release check after issuing a write operation,
this method of operation is also recommended by the LPC32xx User's
Manual, see MII Mgmt Indicators Register notes:

  For PHY Write if scan is not used:
  1. Write 0 to MCMD
  2. Write PHY address and register address to MADR
  3. Write data to MWTD
  4. Wait for busy bit to be cleared in MIND

Reported-by: default avatarAlexandre Messier <amessier@tycoint.com>
Signed-off-by: default avatarVladimir Zapolskiy <vz@mleia.com>
Tested-by: default avatarAlexandre Messier <amessier@tycoint.com>
parent 5c58e3a7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment