1 From: Jonas Gorski <jogo@openwrt.org>
2 Subject: ar71xx: add a workaround for ar8316 not always driving the TA bit to low
4 AR8316 behind a GPIO bitbanged MDIO bus fails to drive the turnaround bit
5 to low despite returning a valid value. Ignore it and just use the
10 drivers/net/mdio/mdio-bitbang.c | 16 ++-----------------
11 1 file changed, 2 insertions(+), 14 deletions(-)
13 --- a/drivers/net/mdio/mdio-bitbang.c
14 +++ b/drivers/net/mdio/mdio-bitbang.c
15 @@ -148,23 +148,11 @@ static void mdiobb_cmd_addr(struct mdiob
16 static int mdiobb_read_common(struct mii_bus *bus, int phy)
18 struct mdiobb_ctrl *ctrl = bus->priv;
22 ctrl->ops->set_mdio_dir(ctrl, 0);
24 - /* check the turnaround bit: the PHY should be driving it to zero, if this
25 - * PHY is listed in phy_ignore_ta_mask as having broken TA, skip that
27 - if (mdiobb_get_bit(ctrl) != 0 &&
28 - !(bus->phy_ignore_ta_mask & (1 << phy))) {
29 - /* PHY didn't drive TA low -- flush any bits it
30 - * may be trying to send.
32 - for (i = 0; i < 32; i++)
33 - mdiobb_get_bit(ctrl);
37 + mdiobb_get_bit(ctrl);
39 ret = mdiobb_get_num(ctrl, 16);