diff options
| author | Jonas Jelonek | 2026-02-02 22:48:04 +0000 |
|---|---|---|
| committer | Hauke Mehrtens | 2026-02-07 23:35:19 +0000 |
| commit | b87db98aff62ca8bc9726f6b78d6bc3d864abe4b (patch) | |
| tree | 66a8b7dc2c000e8279d0a326ea1f33e22343c92c | |
| parent | 459b456185210f1311b98a9daed4af3cd291ef6d (diff) | |
| download | nbd-b87db98aff62ca8bc9726f6b78d6bc3d864abe4b.tar.gz | |
realtek: pcs: rtl931x: config CMU before media
Currently, the CMU is configured after media specific settings have been
set. This seems to work however does not make that much sense. The
proper clock should be configured before the TX/RX channels are
configured. Thus, move the call to the CMU configuration above the media
handling.
While at it, handle the return code of the CMU config properly.
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21858
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
| -rw-r--r-- | target/linux/realtek/files-6.12/drivers/net/pcs/pcs-rtl-otto.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/target/linux/realtek/files-6.12/drivers/net/pcs/pcs-rtl-otto.c b/target/linux/realtek/files-6.12/drivers/net/pcs/pcs-rtl-otto.c index d1997b7a09..58e64a5713 100644 --- a/target/linux/realtek/files-6.12/drivers/net/pcs/pcs-rtl-otto.c +++ b/target/linux/realtek/files-6.12/drivers/net/pcs/pcs-rtl-otto.c @@ -3620,6 +3620,10 @@ static int rtpcs_931x_setup_serdes(struct rtpcs_serdes *sds, if (ret < 0) return ret; + ret = rtpcs_931x_sds_config_cmu(sds, hw_mode); + if (ret < 0) + return ret; + switch (hw_mode) { case RTPCS_SDS_MODE_OFF: ret = rtpcs_931x_sds_set_port_media(sds, RTPCS_PORT_MEDIA_NONE); @@ -3638,8 +3642,6 @@ static int rtpcs_931x_setup_serdes(struct rtpcs_serdes *sds, break; } - rtpcs_931x_sds_config_cmu(sds, hw_mode); - if (sds_id >= 2) { if (ctrl->chip_version == RTPCS_CHIP_V2) /* consider 9311 etc. RTL9313_CHIP_ID == HWP_CHIP_ID(unit)) */ |