1
0

900-mdio_bitbang_ignore_ta_value.patch 928 B

1234567891011121314151617181920212223242526272829303132
  1. --- a/drivers/net/phy/mdio-bitbang.c
  2. +++ b/drivers/net/phy/mdio-bitbang.c
  3. @@ -155,7 +155,7 @@ static int mdiobb_cmd_addr(struct mdiobb
  4. static int mdiobb_read(struct mii_bus *bus, int phy, int reg)
  5. {
  6. struct mdiobb_ctrl *ctrl = bus->priv;
  7. - int ret, i;
  8. + int ret;
  9. if (reg & MII_ADDR_C45) {
  10. reg = mdiobb_cmd_addr(ctrl, phy, reg);
  11. @@ -165,19 +165,7 @@ static int mdiobb_read(struct mii_bus *b
  12. ctrl->ops->set_mdio_dir(ctrl, 0);
  13. - /* check the turnaround bit: the PHY should be driving it to zero, if this
  14. - * PHY is listed in phy_ignore_ta_mask as having broken TA, skip that
  15. - */
  16. - if (mdiobb_get_bit(ctrl) != 0 &&
  17. - !(bus->phy_ignore_ta_mask & (1 << phy))) {
  18. - /* PHY didn't drive TA low -- flush any bits it
  19. - * may be trying to send.
  20. - */
  21. - for (i = 0; i < 32; i++)
  22. - mdiobb_get_bit(ctrl);
  23. -
  24. - return 0xffff;
  25. - }
  26. + mdiobb_get_bit(ctrl);
  27. ret = mdiobb_get_num(ctrl, 16);
  28. mdiobb_get_bit(ctrl);