diff options
author | Kurt Kanzenbach <kurt@linutronix.de> | 2019-05-19 20:59:36 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-05-21 03:00:46 +0300 |
commit | 882119ff969da4ec308d1161c78d22bc9b4a1f01 (patch) | |
tree | c9f84cd837e2b3aa08d7142dbb272cc1d76466c5 /drivers/net/ethernet/xilinx/xilinx_axienet.h | |
parent | fa2c52be7129c7370e6089a8162c7119a78b9a1c (diff) | |
download | linux-882119ff969da4ec308d1161c78d22bc9b4a1f01.tar.xz |
1/2] net: axienet: use readx_poll_timeout() in mdio wait function
On loaded systems with a preemptible kernel the mdio_wait() function may
report an error while everything is working fine:
axienet_mdio_wait_until_ready():
axienet_ior() -> chip not ready
--> interrupt here (other work for some time / chip become ready)
if (time_before_eq(end, jiffies))
--> false positive error report
Replace the current code with readx_poll_timeout() which take care
of the situation.
Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
Signed-off-by: Benedikt Spranger <b.spranger@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/xilinx/xilinx_axienet.h')
-rw-r--r-- | drivers/net/ethernet/xilinx/xilinx_axienet.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet.h b/drivers/net/ethernet/xilinx/xilinx_axienet.h index c337400485da..011adae32b89 100644 --- a/drivers/net/ethernet/xilinx/xilinx_axienet.h +++ b/drivers/net/ethernet/xilinx/xilinx_axienet.h @@ -484,6 +484,11 @@ static inline u32 axienet_ior(struct axienet_local *lp, off_t offset) return in_be32(lp->regs + offset); } +static inline u32 axinet_ior_read_mcr(struct axienet_local *lp) +{ + return axienet_ior(lp, XAE_MDIO_MCR_OFFSET); +} + /** * axienet_iow - Memory mapped Axi Ethernet register write * @lp: Pointer to axienet local structure |