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 @@ -152,7 +152,7 @@ static int mdiobb_cmd_addr(struct mdiobb
16 int mdiobb_read(struct mii_bus *bus, int phy, int reg)
18 struct mdiobb_ctrl *ctrl = bus->priv;
22 if (reg & MII_ADDR_C45) {
23 reg = mdiobb_cmd_addr(ctrl, phy, reg);
24 @@ -162,19 +162,7 @@ int mdiobb_read(struct mii_bus *bus, int
26 ctrl->ops->set_mdio_dir(ctrl, 0);
28 - /* check the turnaround bit: the PHY should be driving it to zero, if this
29 - * PHY is listed in phy_ignore_ta_mask as having broken TA, skip that
31 - if (mdiobb_get_bit(ctrl) != 0 &&
32 - !(bus->phy_ignore_ta_mask & (1 << phy))) {
33 - /* PHY didn't drive TA low -- flush any bits it
34 - * may be trying to send.
36 - for (i = 0; i < 32; i++)
37 - mdiobb_get_bit(ctrl);
41 + mdiobb_get_bit(ctrl);
43 ret = mdiobb_get_num(ctrl, 16);