mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-13 13:18:09 +04:00
realtek: pcs: rtl838x: propagate queue reset errors
The first SerDes start requests a switch queue reset but discards any regmap failure. Return the write result so PCS configuration does not report success when the required recovery reset failed. Assisted-by: ChatGPT (OpenAI GPT-5.6 Sol) Signed-off-by: Jonas Jelonek <jonas@jonasjelonek.de>
This commit is contained in:
1 file changed
+3
-3
@@ -1202,10 +1202,10 @@ static int rtpcs_838x_sds_post_config(struct rtpcs_serdes *sds, enum rtpcs_sds_m
|
||||
* Of course this is totally wrong here and should be part of the DSA driver. But
|
||||
* implementing it over there requires more tricks than this (e.g. delayed work).
|
||||
*/
|
||||
if (sds->first_start)
|
||||
regmap_write(sds->ctrl->map, RTPCS_838X_RST_GLB_CTRL_0, 0x4);
|
||||
if (!sds->first_start)
|
||||
return 0;
|
||||
|
||||
return 0;
|
||||
return regmap_write(sds->ctrl->map, RTPCS_838X_RST_GLB_CTRL_0, 0x4);
|
||||
}
|
||||
|
||||
/* RTL839X */
|
||||
|
||||
Reference in new issue
Block a user