Skip to content

Commit

Permalink
ag71xx: fix SGMII invalid fixup execution
Browse files Browse the repository at this point in the history
Above this code section, follow comment is present:

* Across resets SGMII link status goes to weird state.
* If SGMII_DEBUG register reads other than 0x1f or 0x10,
* we are for sure in a bad  state.

Fix the loop check to we actually check for these 2 values.

Currently this results in the devices being resetted 20 times
and giving up printing an error .. while it still works nicely afterwards.

Signed-off-by: Koen Vandeputte <[email protected]>
  • Loading branch information
Koen Vandeputte authored and rsalvaterra committed Jun 30, 2024
1 parent bfde0eb commit d2e84c7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ static void ag71xx_sgmii_init_qca955x(struct device_node *np)
pr_err("ag71xx: max retries for SGMII fixup exceeded\n");
break;
}
} while (!(sgmii_status == 0xf || sgmii_status == 0x10));
} while (!(sgmii_status == 0x1f || sgmii_status == 0x10));

sgmii_out:
iounmap(gmac_base);
Expand Down

0 comments on commit d2e84c7

Please sign in to comment.