Re: [PATCH net-next 07/11] net: dsa: mv88e6xxx: add port link setter

2016-11-02 Thread Andrew Lunn
> Do you expect to return an error if adjust_link is called with > phydev->duplex == DUPLEX_UNKNOWN, or, do you expect to fallback to > unforced duplex when setting such value? ethtool(1) itself does not allow you to specify "unknown". It only allows "full" or "half". So passing DUPLEX_UNKNOWN

Re: [PATCH net-next 07/11] net: dsa: mv88e6xxx: add port link setter

2016-11-02 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > On Wed, Nov 02, 2016 at 02:07:09AM +0100, Vivien Didelot wrote: >> Hi Andrew, >> >> Andrew Lunn writes: >> >> >> +#define LINK_UNKNOWN -1 >> >> + >> >> + /* Port's MAC link state >> >> + * LINK_UNKNOWN for normal link

Re: [PATCH net-next 07/11] net: dsa: mv88e6xxx: add port link setter

2016-11-02 Thread Andrew Lunn
On Wed, Nov 02, 2016 at 02:07:09AM +0100, Vivien Didelot wrote: > Hi Andrew, > > Andrew Lunn writes: > > >> +#define LINK_UNKNOWN -1 > >> + > >> + /* Port's MAC link state > >> + * LINK_UNKNOWN for normal link detection, 0 to force link down, > >> + * otherwise force

Re: [PATCH net-next 07/11] net: dsa: mv88e6xxx: add port link setter

2016-11-01 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: >> +#define LINK_UNKNOWN-1 >> + >> +/* Port's MAC link state >> + * LINK_UNKNOWN for normal link detection, 0 to force link down, >> + * otherwise force link up. >> + */ >> +int (*port_set_link)(struct mv88e6xxx_chip

Re: [PATCH net-next 07/11] net: dsa: mv88e6xxx: add port link setter

2016-11-01 Thread Andrew Lunn
> +#define LINK_UNKNOWN -1 > + > + /* Port's MAC link state > + * LINK_UNKNOWN for normal link detection, 0 to force link down, > + * otherwise force link up. > + */ > + int (*port_set_link)(struct mv88e6xxx_chip *chip, int port, int link); Hi Vivien Maybe LINK_AUTO would

[PATCH net-next 07/11] net: dsa: mv88e6xxx: add port link setter

2016-10-31 Thread Vivien Didelot
Most of the chips will have a port register control bits to force the port's link up, down, or let normal link detection occurs. Implement such operation to use it later when setting duplex, etc. Signed-off-by: Vivien Didelot ---