Re: [PATCH NET] net/hns:bugfix of ethtool -t phy self_test

2017-06-21 Thread l00371289
Hi, Andrew On 2017/6/22 11:35, Andrew Lunn wrote: >> I don't think returning to user space is an option, because it mean >> ethtool phy self test would fail because if availability of some software >> resoure, which is not some application would expect. here is what I can >> think of: >> >> driver

Re: [PATCH NET] net/hns:bugfix of ethtool -t phy self_test

2017-06-21 Thread Andrew Lunn
> I don't think returning to user space is an option, because it mean > ethtool phy self test would fail because if availability of some software > resoure, which is not some application would expect. here is what I can > think of: > > driver/net/ethernet/hisilicon/hns/hns_ethtool.c > int phy_loop

Re: [PATCH NET] net/hns:bugfix of ethtool -t phy self_test

2017-06-21 Thread l00371289
Hi, Andrew On 2017/6/21 21:34, Andrew Lunn wrote: >> drivers/net/ph/marvell.c >> marvell_set_loopback(struct phy_device *dev, bool enable) >> { >> /* do some device specific setting */ >> >> >> return genphy_loopback(dev, enable); >> } >> >> I don't know if this makes sense

Re: [PATCH NET] net/hns:bugfix of ethtool -t phy self_test

2017-06-21 Thread Andrew Lunn
> drivers/net/ph/marvell.c > marvell_set_loopback(struct phy_device *dev, bool enable) > { > /* do some device specific setting */ > > > return genphy_loopback(dev, enable); > } > > I don't know if this makes sense or not? Nope, you want something in phy.c like this. N

Re: [PATCH NET] net/hns:bugfix of ethtool -t phy self_test

2017-06-20 Thread l00371289
Hi, Andrew On 2017/6/21 11:13, Andrew Lunn wrote: > On Wed, Jun 21, 2017 at 10:03:29AM +0800, l00371289 wrote: >> Hi, Andrew >> >> On 2017/6/20 21:27, Andrew Lunn wrote: >>> On Tue, Jun 20, 2017 at 11:05:54AM +0800, l00371289 wrote: hi, Florian On 2017/6/20 5:00, Florian Fainelli wr

Re: [PATCH NET] net/hns:bugfix of ethtool -t phy self_test

2017-06-20 Thread Andrew Lunn
On Wed, Jun 21, 2017 at 10:03:29AM +0800, l00371289 wrote: > Hi, Andrew > > On 2017/6/20 21:27, Andrew Lunn wrote: > > 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:

Re: [PATCH NET] net/hns:bugfix of ethtool -t phy self_test

2017-06-20 Thread l00371289
Hi, Andrew On 2017/6/20 21:28, Andrew Lunn wrote: 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? >>> >>> This whole drive

Re: [PATCH NET] net/hns:bugfix of ethtool -t phy self_test

2017-06-20 Thread l00371289
Hi, Andrew On 2017/6/20 21:27, Andrew Lunn wrote: > 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 M

Re: [PATCH NET] net/hns:bugfix of ethtool -t phy self_test

2017-06-20 Thread Andrew Lunn
> >> 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? > > > > This whole driver pokes various PHY registers, rather than use > >

Re: [PATCH NET] net/hns:bugfix of ethtool -t phy self_test

2017-06-20 Thread Andrew Lunn
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 wh

Re: [PATCH NET] net/hns:bugfix of ethtool -t phy self_test

2017-06-19 Thread l00371289
Hi, Andrew On 2017/6/20 5:54, Andrew Lunn wrote: > On Mon, Jun 19, 2017 at 02:00:43PM -0700, 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 doi

Re: [PATCH NET] net/hns:bugfix of ethtool -t phy self_test

2017-06-19 Thread l00371289
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

Re: [PATCH NET] net/hns:bugfix of ethtool -t phy self_test

2017-06-19 Thread Andrew Lunn
On Mon, Jun 19, 2017 at 02:00:43PM -0700, 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 loopba

Re: [PATCH NET] net/hns:bugfix of ethtool -t phy self_test

2017-06-19 Thread Florian Fainelli
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 > --- > drivers/net

Re: [PATCH NET] net/hns:bugfix of ethtool -t phy self_test

2017-06-19 Thread David Miller
From: Lin Yun Sheng Date: Fri, 16 Jun 2017 17:24:51 +0800 > 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 Appl

[PATCH NET] net/hns:bugfix of ethtool -t phy self_test

2017-06-16 Thread Lin Yun Sheng
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 --- drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 16 ++--