]> git.baikalelectronics.ru Git - kernel.git/commit
r8169: let mdio read functions return -ETIMEDOUT
authorHeiner Kallweit <hkallweit1@gmail.com>
Tue, 11 Jun 2019 19:04:09 +0000 (21:04 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 14 Jun 2019 05:43:10 +0000 (22:43 -0700)
commitbc7520b7b1e230a445ba66119372c941b0071e12
tree9126a1698f41abb1748253371bf8af9277649e78
parent8eb126b2bce287ee1f88caab1a1bd80d0369315d
r8169: let mdio read functions return -ETIMEDOUT

In case of a timeout currently ~0 is returned. Callers often just check
whether a certain bit is set and therefore may behave incorrectly.
So let's return -ETIMEDOUT in case of a timeout.

r8168_phy_ocp_read is used in r8168g_mdio_read only, therefore we can
apply the same change.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/realtek/r8169_main.c