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] [day] [month] [year] [list]
Message-ID: <20170518130220.GA32503@lunn.ch>
Date:   Thu, 18 May 2017 15:02:20 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Quan Nguyen <qnguyen@....com>
Cc:     Iyappan Subramanian <isubramanian@....com>,
        "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
        Florian Fainelli <f.fainelli@...il.com>,
        linux-arm-kernel@...ts.infradead.org, patches <patches@....com>
Subject: Re: [PATCH net-next] drivers: net: xgene: Check all RGMII phy mode
 variants

> Hi Andrew,
> 
> Our purpose is to handle our internal pdata->phy_mode, so
> phy_interface_is_rgmii(phydev) seems not to fit.
> Instead, we're working on the below:
> 
> +bool is_xgene_enet_phy_mode_rgmii(struct net_device *ndev)
> +{
> +       struct xgene_enet_pdata *pdata = netdev_priv(ndev);
> +
> +       return pdata->phy_mode >= PHY_INTERFACE_MODE_RGMII &&
> +              pdata->phy_mode <= PHY_INTERFACE_MODE_RGMII_TXID;
> +}
> +

This is very generic, can could be used by other drivers. I prefer
what Florian suggested, have a generic helper which takes phy_mode as
a parameters. And then modify phy_interface_is_rgmii() to use this
helper.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ