lkml.org 
[lkml]   [2017]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net] net: phylink: fix link state on phy-connect
> +	/* On _disconnect, the phy state machine and phylink resolve
> + * are stopped before executing full gracefull down/reset state.
> + * The further _connect starts with incorrect init state. Let's set
> + * init values here.
> + */
> + pl->phy_state.link = false;
> + pl->link_config.pause = MLO_PAUSE_AN;
> + pl->link_config.speed = SPEED_UNKNOWN;
> + pl->link_config.duplex = DUPLEX_UNKNOWN;

Hi Antoine

Looks sensible. My only comment would be, maybe it makes sense to
reduce the duplication by adding a little helper which is called here,
and in phylink_create()?

Andrew

\
 
 \ /
  Last update: 2017-11-28 14:57    [W:0.072 / U:0.732 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site