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:   Tue, 20 Jun 2017 15:27:05 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     l00371289 <linyunsheng@...wei.com>
Cc:     Florian Fainelli <f.fainelli@...il.com>, davem@...emloft.net,
        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,
        yankejian@...wei.com, tremyfr@...il.com, xieqianqian@...wei.com,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH NET] net/hns:bugfix of ethtool -t phy self_test

On Tue, Jun 20, 2017 at 11:05:54AM +0800, l00371289 wrote:
> hi, Florian
> 
> On 2017/6/20 5:00, Florian Fainelli wrote:
> > On 06/16/2017 02:24 AM, Lin Yun Sheng wrote:
> >> This patch fixes the phy loopback self_test failed issue. when
> >> Marvell Phy Module is loaded, it will powerdown fiber when doing
> >> phy loopback self test, which cause phy loopback self_test fail.
> >>
> >> Signed-off-by: Lin Yun Sheng <linyunsheng@...wei.com>
> >> ---
> >>  drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 16 ++++++++++++++--
> >>  1 file changed, 14 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c b/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
> >> index b8fab14..e95795b 100644
> >> --- a/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
> >> +++ b/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
> >> @@ -288,9 +288,15 @@ static int hns_nic_config_phy_loopback(struct phy_device *phy_dev, u8 en)
> > 
> > The question really is, why is not this properly integrated into the PHY
> > driver and PHYLIB such that the only thing the Ethernet MAC driver has
> > to call is a function of the PHY driver putting it in self-test?
> Do you meaning calling phy_dev->drv->resume and phy_dev->drv->suspend function?

No. Florian is saying you should add support for phylib and the
drivers to enable/disable loopback.

The BMCR loopback bit is pretty much standardised. So you can
implement a genphy_loopback(phydev, enable), which most drivers can
use. Those that need there own can implement it in there driver.

     Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ