hostapd: bump to 2024-09-06 (wip)
[openwrt/staging/xback.git] / target / linux / ath79 / patches-6.6 / 720-mdio_bitbang_ignore_ta_value.patch
1 From: Jonas Gorski <jogo@openwrt.org>
2 Subject: ar71xx: add a workaround for ar8316 not always driving the TA bit to low
3
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
6 returned value anyway.
7
8 SVN-Revision: 28422
9 ---
10 drivers/net/mdio/mdio-bitbang.c | 16 ++-----------------
11 1 file changed, 2 insertions(+), 14 deletions(-)
12
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)
17 {
18 struct mdiobb_ctrl *ctrl = bus->priv;
19 - int ret, i;
20 + int ret;
21
22 ctrl->ops->set_mdio_dir(ctrl, 0);
23
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
26 - */
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.
31 - */
32 - for (i = 0; i < 32; i++)
33 - mdiobb_get_bit(ctrl);
34 -
35 - return 0xffff;
36 - }
37 + mdiobb_get_bit(ctrl);
38
39 ret = mdiobb_get_num(ctrl, 16);
40 mdiobb_get_bit(ctrl);