[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7af71256-7c94-3847-f50f-482ff26f7e45@gmail.com>
Date: Sun, 20 Nov 2016 09:32:26 -0800
From: Florian Fainelli <f.fainelli@...il.com>
To: Timur Tabi <timur@...eaurora.org>
Cc: David Miller <davem@...emloft.net>, jon.mason@...adcom.com,
netdev <netdev@...r.kernel.org>, Andrew Lunn <andrew@...n.ch>
Subject: Re: [PATCH] [v2] net: phy: phy drivers should not set
SUPPORTED_[Asym_]Pause
On 11/20/2016 08:08 AM, Timur Tabi wrote:
> On Mon, Nov 14, 2016 at 12:35 PM, Florian Fainelli <f.fainelli@...il.com> wrote:
>> if (!(drv->features & (SUPPORTED_Pause | SUPPORTED_AsymPause))
>> phydev->supported |= SUPPORTED_Pause | SUPPORTED_AsymPause;
>
> How about, if either bit is set in drv->features, then assume the phy
> driver really knows what it's doing, and just copy those bits to
> phydev->supported?
Yes, that seems completely reasonable to me. Thanks!
>
> if (drv->features & (SUPPORTED_Pause | SUPPORTED_AsymPause)) {
> phydev->supported &= ~(SUPPORTED_Pause | SUPPORTED_AsymPause);
> phydev->supported |= drv->features & (SUPPORTED_Pause |
> SUPPORTED_AsymPause);
> } else
> phydev->supported |= SUPPORTED_Pause | SUPPORTED_AsymPause;
>
--
Florian
Powered by blists - more mailing lists