lkml.org 
[lkml]   [2017]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH NET v3 2/2] net: hns: Use phy_driver to setup Phy loopback
>  static int hns_nic_config_phy_loopback(struct phy_device *phy_dev, u8 en)
> {
> -#define COPPER_CONTROL_REG 0
> -#define PHY_POWER_DOWN BIT(11)
> -#define PHY_LOOP_BACK BIT(14)
> - u16 val = 0;
> + int err;
>
> if (phy_dev->is_c45) /* c45 branch adding for XGE PHY */
> return -ENOTSUPP;

You should take this out as well. You want the core to tell you if
loopback is supported or not. At some point, a c45 PHY could support
loopback.

> + case MAC_LOOP_PHY_NONE:
> if ((phy_dev) && (!phy_dev->is_c45))
> ret |= hns_nic_config_phy_loopback(phy_dev, 0x0);

same here.

Andrew

\
 
 \ /
  Last update: 2017-06-24 05:19    [W:0.164 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site