mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Fix incorrect busy check for PHY write operation.
While I'm here remove unnecessary return statement.
This commit is contained in:
parent
df6e8892dc
commit
3b234fcbab
1 changed files with 2 additions and 4 deletions
|
|
@ -793,13 +793,11 @@ sk_marv_miibus_writereg(sc_if, phy, reg, val)
|
|||
|
||||
for (i = 0; i < SK_TIMEOUT; i++) {
|
||||
DELAY(1);
|
||||
if (SK_YU_READ_2(sc_if, YUKON_SMICR) & YU_SMICR_BUSY)
|
||||
if ((SK_YU_READ_2(sc_if, YUKON_SMICR) & YU_SMICR_BUSY) == 0)
|
||||
break;
|
||||
}
|
||||
if (i == SK_TIMEOUT) {
|
||||
if (i == SK_TIMEOUT)
|
||||
if_printf(sc_if->sk_ifp, "phy write timeout\n");
|
||||
return (0);
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue