Re: [PATCH net-next 1/4] net: ethernet: validate pause autoneg setting

2020-05-13 Thread Doug Berger
On 5/13/2020 6:49 AM, Andrew Lunn wrote: >> So, I think consistency of implementation is more important than fixing >> this; the current behaviour has been established for many years now. > > Hi Russell, Doug > > With netlink ethtool we have the possibility of adding a new API to > control this.

Re: [PATCH net-next 1/4] net: ethernet: validate pause autoneg setting

2020-05-13 Thread Doug Berger
On 5/13/2020 2:20 AM, Russell King - ARM Linux admin wrote: > On Wed, May 13, 2020 at 06:34:05AM +0100, Russell King - ARM Linux admin > wrote: >> On Tue, May 12, 2020 at 08:48:22PM -0700, Doug Berger wrote: >>> On 5/12/2020 11:55 AM, Russell King - ARM Linux admin wrote: On Tue, May 12,

Re: [PATCH net-next 1/4] net: ethernet: validate pause autoneg setting

2020-05-13 Thread Doug Berger
On 5/12/2020 10:34 PM, Russell King - ARM Linux admin wrote: > On Tue, May 12, 2020 at 08:48:22PM -0700, Doug Berger wrote: >> On 5/12/2020 11:55 AM, Russell King - ARM Linux admin wrote: >>> On Tue, May 12, 2020 at 11:31:39AM -0700, Doug Berger wrote: This was intended as a fix, but I

Re: [PATCH net-next 1/4] net: ethernet: validate pause autoneg setting

2020-05-13 Thread Russell King - ARM Linux admin
On Wed, May 13, 2020 at 03:49:25PM +0200, Andrew Lunn wrote: > Hi Russell, Doug > > With netlink ethtool we have the possibility of adding a new API to > control this. And we can leave the IOCTL API alone, and the current > ethtool commands. We can add a new command to ethtool which uses the new

Re: [PATCH net-next 1/4] net: ethernet: validate pause autoneg setting

2020-05-13 Thread Michal Kubecek
On Wed, May 13, 2020 at 03:49:25PM +0200, Andrew Lunn wrote: > > So, I think consistency of implementation is more important than fixing > > this; the current behaviour has been established for many years now. > > With netlink ethtool we have the possibility of adding a new API to > control this.

Re: [PATCH net-next 1/4] net: ethernet: validate pause autoneg setting

2020-05-13 Thread Andrew Lunn
> So, I think consistency of implementation is more important than fixing > this; the current behaviour has been established for many years now. Hi Russell, Doug With netlink ethtool we have the possibility of adding a new API to control this. And we can leave the IOCTL API alone, and the

Re: [PATCH net-next 1/4] net: ethernet: validate pause autoneg setting

2020-05-13 Thread Russell King - ARM Linux admin
On Wed, May 13, 2020 at 06:34:05AM +0100, Russell King - ARM Linux admin wrote: > On Tue, May 12, 2020 at 08:48:22PM -0700, Doug Berger wrote: > > On 5/12/2020 11:55 AM, Russell King - ARM Linux admin wrote: > > > On Tue, May 12, 2020 at 11:31:39AM -0700, Doug Berger wrote: > > >> This was

Re: [PATCH net-next 1/4] net: ethernet: validate pause autoneg setting

2020-05-12 Thread Russell King - ARM Linux admin
On Tue, May 12, 2020 at 08:48:22PM -0700, Doug Berger wrote: > On 5/12/2020 11:55 AM, Russell King - ARM Linux admin wrote: > > On Tue, May 12, 2020 at 11:31:39AM -0700, Doug Berger wrote: > >> This was intended as a fix, but I thought it would be better to keep it > >> as part of this set for

Re: [PATCH net-next 1/4] net: ethernet: validate pause autoneg setting

2020-05-12 Thread Doug Berger
On 5/12/2020 11:55 AM, Russell King - ARM Linux admin wrote: > On Tue, May 12, 2020 at 11:31:39AM -0700, Doug Berger wrote: >> This was intended as a fix, but I thought it would be better to keep it >> as part of this set for context and since net-next is currently open. >> >> The context is

Re: [PATCH net-next 1/4] net: ethernet: validate pause autoneg setting

2020-05-12 Thread Doug Berger
On 5/12/2020 12:08 PM, Michal Kubecek wrote: > On Tue, May 12, 2020 at 11:31:39AM -0700, Doug Berger wrote: >> On 5/11/2020 5:47 PM, Andrew Lunn wrote: >>> On Mon, May 11, 2020 at 05:24:07PM -0700, Doug Berger wrote: A comment in uapi/linux/ethtool.h states "Drivers should reject a

Re: [PATCH net-next 1/4] net: ethernet: validate pause autoneg setting

2020-05-12 Thread Michal Kubecek
On Tue, May 12, 2020 at 11:31:39AM -0700, Doug Berger wrote: > On 5/11/2020 5:47 PM, Andrew Lunn wrote: > > On Mon, May 11, 2020 at 05:24:07PM -0700, Doug Berger wrote: > >> A comment in uapi/linux/ethtool.h states "Drivers should reject a > >> non-zero setting of @autoneg when autoneogotiation is

Re: [PATCH net-next 1/4] net: ethernet: validate pause autoneg setting

2020-05-12 Thread Russell King - ARM Linux admin
On Tue, May 12, 2020 at 11:31:39AM -0700, Doug Berger wrote: > This was intended as a fix, but I thought it would be better to keep it > as part of this set for context and since net-next is currently open. > > The context is trying to improve the phylib support for offloading > ethtool pause

Re: [PATCH net-next 1/4] net: ethernet: validate pause autoneg setting

2020-05-12 Thread Andrew Lunn
On Tue, May 12, 2020 at 11:31:39AM -0700, Doug Berger wrote: > On 5/11/2020 5:47 PM, Andrew Lunn wrote: > > On Mon, May 11, 2020 at 05:24:07PM -0700, Doug Berger wrote: > >> A comment in uapi/linux/ethtool.h states "Drivers should reject a > >> non-zero setting of @autoneg when autoneogotiation is

Re: [PATCH net-next 1/4] net: ethernet: validate pause autoneg setting

2020-05-12 Thread Doug Berger
On 5/11/2020 5:47 PM, Andrew Lunn wrote: > On Mon, May 11, 2020 at 05:24:07PM -0700, Doug Berger wrote: >> A comment in uapi/linux/ethtool.h states "Drivers should reject a >> non-zero setting of @autoneg when autoneogotiation is disabled (or >> not supported) for the link". >> >> That check

Re: [PATCH net-next 1/4] net: ethernet: validate pause autoneg setting

2020-05-11 Thread Florian Fainelli
On 5/11/2020 5:24 PM, Doug Berger wrote: > A comment in uapi/linux/ethtool.h states "Drivers should reject a > non-zero setting of @autoneg when autoneogotiation is disabled (or > not supported) for the link". > > That check should be added to phy_validate_pause() to consolidate > the code

Re: [PATCH net-next 1/4] net: ethernet: validate pause autoneg setting

2020-05-11 Thread Andrew Lunn
On Mon, May 11, 2020 at 05:24:07PM -0700, Doug Berger wrote: > A comment in uapi/linux/ethtool.h states "Drivers should reject a > non-zero setting of @autoneg when autoneogotiation is disabled (or > not supported) for the link". > > That check should be added to phy_validate_pause() to

[PATCH net-next 1/4] net: ethernet: validate pause autoneg setting

2020-05-11 Thread Doug Berger
A comment in uapi/linux/ethtool.h states "Drivers should reject a non-zero setting of @autoneg when autoneogotiation is disabled (or not supported) for the link". That check should be added to phy_validate_pause() to consolidate the code where possible. Fixes: 22b7d29926b5 ("net: ethernet: Add