Re: [PATCH net-next] drivers: net: xgene: Check all RGMII phy mode variants

2017-05-18 Thread Andrew Lunn
> 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); >

Re: [PATCH net-next] drivers: net: xgene: Check all RGMII phy mode variants

2017-05-17 Thread Quan Nguyen
On Thu, May 18, 2017 at 3:26 AM, Andrew Lunn wrote: >> +bool is_xgene_enet_phy_mode_rgmii(struct net_device *ndev) >> +{ >> + struct xgene_enet_pdata *pdata = netdev_priv(ndev); >> + int phy_mode = pdata->phy_mode; >> + bool ret; >> + >> + ret = phy_mode == PHY_INTERFACE_MODE_RGMII

Re: [PATCH net-next] drivers: net: xgene: Check all RGMII phy mode variants

2017-05-17 Thread Florian Fainelli
On 05/17/2017 02:29 PM, Iyappan Subramanian wrote: > On Wed, May 17, 2017 at 1:26 PM, Andrew Lunn wrote: >>> +bool is_xgene_enet_phy_mode_rgmii(struct net_device *ndev) >>> +{ >>> + struct xgene_enet_pdata *pdata = netdev_priv(ndev); >>> + int phy_mode = pdata->phy_mode; >>> + bool ret

Re: [PATCH net-next] drivers: net: xgene: Check all RGMII phy mode variants

2017-05-17 Thread Iyappan Subramanian
On Wed, May 17, 2017 at 1:26 PM, Andrew Lunn wrote: >> +bool is_xgene_enet_phy_mode_rgmii(struct net_device *ndev) >> +{ >> + struct xgene_enet_pdata *pdata = netdev_priv(ndev); >> + int phy_mode = pdata->phy_mode; >> + bool ret; >> + >> + ret = phy_mode == PHY_INTERFACE_MODE_RGMII

Re: [PATCH net-next] drivers: net: xgene: Check all RGMII phy mode variants

2017-05-17 Thread Andrew Lunn
> +bool is_xgene_enet_phy_mode_rgmii(struct net_device *ndev) > +{ > + struct xgene_enet_pdata *pdata = netdev_priv(ndev); > + int phy_mode = pdata->phy_mode; > + bool ret; > + > + ret = phy_mode == PHY_INTERFACE_MODE_RGMII || > + phy_mode == PHY_INTERFACE_MODE_RGMII_ID ||

[PATCH net-next] drivers: net: xgene: Check all RGMII phy mode variants

2017-05-17 Thread Iyappan Subramanian
This patch addresses the review comment from the previous patch set, by adding a helper function to address all RGMII phy mode variants. Signed-off-by: Iyappan Subramanian Signed-off-by: Quan Nguyen --- Review comment reference: http://www.spinics.net/lists/netdev/msg434649.html --- .../net/et