[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170624031856.GH4875@lunn.ch>
Date: Sat, 24 Jun 2017 05:18:56 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Lin Yun Sheng <linyunsheng@...wei.com>
Cc: davem@...emloft.net, f.fainelli@...il.com,
huangdaode@...ilicon.com, xuwei5@...ilicon.com,
liguozhu@...ilicon.com, Yisen.Zhuang@...wei.com,
gabriele.paoloni@...wei.com, john.garry@...wei.com,
linuxarm@...wei.com, salil.mehta@...wei.com, lipeng321@...wei.com,
tremyfr@...il.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [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
Powered by blists - more mailing lists