lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 20 Nov 2016 10:08:44 -0600
From:   Timur Tabi <timur@...eaurora.org>
To:     Florian Fainelli <f.fainelli@...il.com>
Cc:     Timur Tabi <timur@...eaurora.org>,
        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 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?

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;

-- 
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ