mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-14 06:38:29 +04:00
realtek: pcs: rtl930x: fix RX calibration warning
The calibration retry loop warns whenever it reaches the third attempt, even if that final attempt succeeds. Preserve the final check result and only warn when calibration actually remains unsuccessful. Assisted-by: ChatGPT (OpenAI GPT-5.6 Sol) Signed-off-by: Jonas Jelonek <jonas@jonasjelonek.de>
This commit is contained in:
1 file changed
+4
-2
@@ -3221,6 +3221,7 @@ static int rtpcs_930x_sds_config_attachment(struct rtpcs_serdes *sds,
|
||||
|
||||
static int rtpcs_930x_sds_post_config(struct rtpcs_serdes *sds, enum rtpcs_sds_mode hw_mode)
|
||||
{
|
||||
bool calib_failed;
|
||||
int calib_tries = 0;
|
||||
|
||||
if (hw_mode == RTPCS_SDS_MODE_QSGMII)
|
||||
@@ -3231,8 +3232,9 @@ static int rtpcs_930x_sds_post_config(struct rtpcs_serdes *sds, enum rtpcs_sds_m
|
||||
rtpcs_930x_sds_do_rx_calibration(sds, hw_mode);
|
||||
calib_tries++;
|
||||
msleep(50);
|
||||
} while (rtpcs_930x_sds_check_calibration(sds, hw_mode) && calib_tries < 3);
|
||||
if (calib_tries >= 3)
|
||||
calib_failed = rtpcs_930x_sds_check_calibration(sds, hw_mode);
|
||||
} while (calib_failed && calib_tries < 3);
|
||||
if (calib_failed)
|
||||
dev_warn(sds->ctrl->dev, "SerDes %u: RX calibration failed\n", sds->id);
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in new issue
Block a user