netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel@savoirfairelinux.com,
	"David S. Miller" <davem@davemloft.net>,
	Florian Fainelli <f.fainelli@gmail.com>
Subject: Re: [PATCH net-next 07/11] net: dsa: mv88e6xxx: add port link setter
Date: Wed, 2 Nov 2016 10:16:29 +0100	[thread overview]
Message-ID: <20161102091629.GA384@lunn.ch> (raw)
In-Reply-To: <87shra4rlu.fsf@ketchup.i-did-not-set--mail-host-address--so-tickle-me>

On Wed, Nov 02, 2016 at 02:07:09AM +0100, Vivien Didelot wrote:
> Hi Andrew,
> 
> Andrew Lunn <andrew@lunn.ch> 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 *chip, int port, int link);
> >
> > Maybe LINK_AUTO would be better than UNKNOWN? Or LINK_UNFORCED.
> 
> I used LINK_UNKNOWN to be consistent with the supported SPEED_UNKNOWN
> and DUPLEX_UNKNOWN values of PHY devices.

Hi Vivien

These are i think for reporting back to user space what duplex or link
is currently being used. But here you are setting, not
reporting. Setting something to an unknown state is rather odd, and in
fact, it is not unknown, it is unforced.

      Andrew

  reply	other threads:[~2016-11-02  9:16 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-01  3:20 [PATCH net-next 00/11] net: dsa: mv88e6xxx: refine port operations Vivien Didelot
2016-11-01  3:20 ` [PATCH net-next 01/11] net: dsa: mv88e6xxx: add port files Vivien Didelot
2016-11-01  3:20 ` [PATCH net-next 02/11] net: dsa: mv88e6xxx: add port state setter Vivien Didelot
2016-11-01  3:20 ` [PATCH net-next 03/11] net: dsa: mv88e6xxx: add port vlan map setter Vivien Didelot
2016-11-01  3:20 ` [PATCH net-next 04/11] net: dsa: mv88e6xxx: add port FID accessors Vivien Didelot
2016-11-01  9:38   ` Andrew Lunn
2016-11-02  1:01     ` Vivien Didelot
2016-11-01  3:20 ` [PATCH net-next 05/11] net: dsa: mv88e6xxx: add port PVID accessors Vivien Didelot
2016-11-01  3:20 ` [PATCH net-next 06/11] net: dsa: mv88e6xxx: add port 802.1Q mode setter Vivien Didelot
2016-11-01  3:20 ` [PATCH net-next 07/11] net: dsa: mv88e6xxx: add port link setter Vivien Didelot
2016-11-01  9:43   ` Andrew Lunn
2016-11-02  1:07     ` Vivien Didelot
2016-11-02  9:16       ` Andrew Lunn [this message]
2016-11-02 22:31         ` Vivien Didelot
2016-11-02 23:05           ` Andrew Lunn
2016-11-01  3:20 ` [PATCH net-next 08/11] net: dsa: mv88e6xxx: add port duplex setter Vivien Didelot
2016-11-01  9:44   ` Andrew Lunn
2016-11-02  1:12     ` Vivien Didelot
2016-11-01  3:20 ` [PATCH net-next 09/11] net: dsa: mv88e6xxx: add port's RGMII delay setter Vivien Didelot
2016-11-01  3:20 ` [PATCH net-next 10/11] net: dsa: mv88e6xxx: add port's MAC speed setter Vivien Didelot
2016-11-01  3:20 ` [PATCH net-next 11/11] net: dsa: mv88e6xxx: setup port's MAC Vivien Didelot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161102091629.GA384@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=kernel@savoirfairelinux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@savoirfairelinux.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).