lkml.org 
[lkml]   [2022]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] net: mtk_sgmii: implement mtk_pcs_ops
Am 18. Oktober 2022 18:39:01 MESZ schrieb "Russell King (Oracle)" <linux@armlinux.org.uk>:
>Hi,
>
>A couple of points:
>
>On Tue, Oct 18, 2022 at 05:35:06PM +0200, Frank Wunderlich wrote:

>> + regmap_read(mpcs->regmap, SGMSYS_PCS_CONTROL_1, &val);
>> + state->an_complete = !!(val & SGMII_AN_COMPLETE);
>> + state->link = !!(val & SGMII_LINK_STATYS);
>> + state->pause = 0;
>
>Finally, something approaching a reasonable implementation for this!
>Two points however:
>1) There's no need to set state->pause if there is no way to get that
> state.
>2) There should also be a setting for state->pause.

Currently it looks like pause cannot be controlled in sgmii-mode so we disabled it here to not leave it undefined. Should i drop assignment here?

>> +}
>> +
>> static const struct phylink_pcs_ops mtk_pcs_ops = {
>> .pcs_config = mtk_pcs_config,
>> .pcs_an_restart = mtk_pcs_restart_an,
>> .pcs_link_up = mtk_pcs_link_up,
>> + .pcs_get_state = mtk_pcs_get_state,
>
>Please keep this in order - pcs_get_state should be just before
>pcs_config.

Ok,will change order

regards Frank

\
 
 \ /
  Last update: 2022-10-20 07:55    [W:0.124 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site