Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1670226 > unrolled thread
| Started by | l00371289 <linyunsheng@huawei.com> |
|---|---|
| First post | 2017-06-20 05:20 +0200 |
| Last post | 2017-06-21 04:10 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH NET] net/hns:bugfix of ethtool -t phy self_test l00371289 <linyunsheng@huawei.com> - 2017-06-20 05:20 +0200
Re: [PATCH NET] net/hns:bugfix of ethtool -t phy self_test Andrew Lunn <andrew@lunn.ch> - 2017-06-20 15:30 +0200
Re: [PATCH NET] net/hns:bugfix of ethtool -t phy self_test l00371289 <linyunsheng@huawei.com> - 2017-06-21 04:10 +0200
| From | l00371289 <linyunsheng@huawei.com> |
|---|---|
| Date | 2017-06-20 05:20 +0200 |
| Subject | Re: [PATCH NET] net/hns:bugfix of ethtool -t phy self_test |
| Message-ID | <tUhRT-37F-3@gated-at.bofh.it> |
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 doing >>> phy loopback self test, which cause phy loopback self_test fail. >>> >>> Signed-off-by: Lin Yun Sheng <linyunsheng@huawei.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? > > This whole driver pokes various PHY registers, rather than use > phylib. And it does so without taking the PHY lock. I will consider using phylib as much as possible, thanks. It also assumes it > is a Marvell PHY and i don't see anywhere it actually verifies this. When it said Marvell Phy , I meant Marvell Phy with fibre support. I will send anther patch to only setting bit in Fiber Control when it is a Marvell Phy with fibre support. Thanks for reply. Best Regards Yunsheng Lin > > This is all broken. > > Andrew > > . >
[toc] | [next] | [standalone]
| From | Andrew Lunn <andrew@lunn.ch> |
|---|---|
| Date | 2017-06-20 15:30 +0200 |
| Message-ID | <tUrod-Jj-15@gated-at.bofh.it> |
| In reply to | #1670226 |
> >> 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
> > phylib. And it does so without taking the PHY lock.
> I will consider using phylib as much as possible, thanks.
>
> It also assumes it
> > is a Marvell PHY and i don't see anywhere it actually verifies this.
> When it said Marvell Phy , I meant Marvell Phy with fibre support.
> I will send anther patch to only setting bit in Fiber Control when
> it is a Marvell Phy with fibre support.
There is a lot more broken than just that.
You really should remove all code which is accessing the PHY, and add
support to phylib and the drivers for what you need.
Andrew
[toc] | [prev] | [next] | [standalone]
| From | l00371289 <linyunsheng@huawei.com> |
|---|---|
| Date | 2017-06-21 04:10 +0200 |
| Message-ID | <tUDfH-8jH-1@gated-at.bofh.it> |
| In reply to | #1670756 |
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 driver pokes various PHY registers, rather than use >>> phylib. And it does so without taking the PHY lock. >> I will consider using phylib as much as possible, thanks. >> >> It also assumes it >>> is a Marvell PHY and i don't see anywhere it actually verifies this. >> When it said Marvell Phy , I meant Marvell Phy with fibre support. >> I will send anther patch to only setting bit in Fiber Control when >> it is a Marvell Phy with fibre support. > > There is a lot more broken than just that. > > You really should remove all code which is accessing the PHY, and add > support to phylib and the drivers for what you need. > > Andrew After adding genphy_loopback support, I will try it. Thanks for pointing out. Best Regards Yunsheng Lin
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web