projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
351434c
)
sfc: fix a timeout loop
author
Dan Carpenter
<
[email protected]
>
Tue, 15 Dec 2015 11:06:08 +0000
(14:06 +0300)
committer
David S. Miller
<
[email protected]
>
Tue, 15 Dec 2015 17:46:26 +0000
(12:46 -0500)
We test for if "tries" is zero at the end but "tries--" is a post-op so
it will end with "tries" set to -1. I have changed it to a pre-op
instead.
Signed-off-by: Dan Carpenter <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/ethernet/sfc/txc43128_phy.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/sfc/txc43128_phy.c
b/drivers/net/ethernet/sfc/txc43128_phy.c
index 3d5ee3259885d9486933e5b821c3af2a94c910d2..194f67d9f3bfaa81bd99bf3ad64c6c1568476319 100644
(file)
--- a/
drivers/net/ethernet/sfc/txc43128_phy.c
+++ b/
drivers/net/ethernet/sfc/txc43128_phy.c
@@
-418,7
+418,7
@@
static void txc_reset_logic_mmd(struct efx_nic *efx, int mmd)
val |= (1 << TXC_GLCMD_LMTSWRST_LBN);
efx_mdio_write(efx, mmd, TXC_GLRGS_GLCMD, val);
- while (
tries--
) {
+ while (
--tries
) {
val = efx_mdio_read(efx, mmd, TXC_GLRGS_GLCMD);
if (!(val & (1 << TXC_GLCMD_LMTSWRST_LBN)))
break;