diff options
author | Harini Katakam <harini.katakam@xilinx.com> | 2019-03-01 13:50:32 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-03-04 00:51:37 +0300 |
commit | 8beb79b7ae937632db1d2721d33b46526d41f153 (patch) | |
tree | a940e3543aed8ead37ac363865e0764a361c6c5a /drivers/net/ethernet/cadence/macb.h | |
parent | 41bc0ddb80e0380ab88b3902e638c89b3453b421 (diff) | |
download | linux-8beb79b7ae937632db1d2721d33b46526d41f153.tar.xz |
net: macb: Check MDIO state before read/write and use timeouts
Replace the while loop in MDIO read/write functions with a timeout.
In addition, add a check for MDIO bus busy before initiating a new
operation as well to make sure there is no ongoing MDIO operation.
Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
Signed-off-by: Harini Katakam <harini.katakam@xilinx.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cadence/macb.h')
-rw-r--r-- | drivers/net/ethernet/cadence/macb.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/cadence/macb.h b/drivers/net/ethernet/cadence/macb.h index 9bbaad9f3d63..f51040fedcf5 100644 --- a/drivers/net/ethernet/cadence/macb.h +++ b/drivers/net/ethernet/cadence/macb.h @@ -715,6 +715,8 @@ __v; \ }) +#define MACB_READ_NSR(bp) macb_readl(bp, NSR) + /* struct macb_dma_desc - Hardware DMA descriptor * @addr: DMA address of data buffer * @ctrl: Control and status bits |