Re: [PATCH] net: add regs attribute to phy device for user diagnose

2017-02-10 Thread yuan linyu
On 四, 2017-01-19 at 02:01 +0100, Andrew Lunn wrote: > > > > I will add two ethtool command in kernel to read and write register in PHY.  > Write access will get NACKed by me. Read only please. some register need to write some value first then read. if read only, it will not achieve the goal. > >

RE: [PATCH] net: add regs attribute to phy device for user diagnose

2017-01-18 Thread YUAN Linyu
> -Original Message- > From: Zefir Kurtisi [mailto:zefir.kurt...@neratec.com] > > ... on the other hand, having direct RW access to MDIO regs can ease your life > greatly during bring-up / debugging of PHYs. > > Attached is a patch we are using to track down PHY problems at register

Re: [PATCH] net: add regs attribute to phy device for user diagnose

2017-01-18 Thread Andrew Lunn
> I will add two ethtool command in kernel to read and write register in PHY. Write access will get NACKed by me. Read only please. > ethtool can use these command to dump what user want, there is no > more work to PHY driver. Please think about how you handle PHYs with pages. This needs to be

Re: [PATCH] net: add regs attribute to phy device for user diagnose

2017-01-18 Thread Zefir Kurtisi
g; YUAN Linyu >> Subject: Re: [PATCH] net: add regs attribute to phy device for user diagnose >> >> From: Florian Fainelli <f.faine...@gmail.com> >> Date: Mon, 16 Jan 2017 12:22:16 -0800 >> >>> >>> So why not add support in ethtool

RE: [PATCH] net: add regs attribute to phy device for user diagnose

2017-01-16 Thread YUAN Linyu
> -Original Message- > From: David Miller [mailto:da...@davemloft.net] > Sent: Tuesday, January 17, 2017 5:54 AM > To: f.faine...@gmail.com > Cc: cug...@163.com; and...@lunn.ch; netdev@vger.kernel.org; YUAN Linyu > Subject: Re: [PATCH] net: add regs attribute to p

Re: [PATCH] net: add regs attribute to phy device for user diagnose

2017-01-16 Thread David Miller
From: Florian Fainelli Date: Mon, 16 Jan 2017 12:22:16 -0800 > On 01/16/2017 04:59 AM, yuan linyu wrote: >> On 日, 2017-01-15 at 18:21 +0100, Andrew Lunn wrote: >>> On Sun, Jan 15, 2017 at 09:51:03AM +0800, yuan linyu wrote: I hope user/developer can read this

Re: [PATCH] net: add regs attribute to phy device for user diagnose

2017-01-16 Thread Florian Fainelli
On 01/16/2017 04:59 AM, yuan linyu wrote: > On 日, 2017-01-15 at 18:21 +0100, Andrew Lunn wrote: >> On Sun, Jan 15, 2017 at 09:51:03AM +0800, yuan linyu wrote: >>> >>> I hope user/developer can read this attribute file "regs" to do >>> a full check of all registers value, and they can write any

Re: [PATCH] net: add regs attribute to phy device for user diagnose

2017-01-16 Thread yuan linyu
On 日, 2017-01-15 at 18:21 +0100, Andrew Lunn wrote: > On Sun, Jan 15, 2017 at 09:51:03AM +0800, yuan linyu wrote: > >  > > I hope user/developer can read this attribute file "regs" to do > > a full check of all registers value, and they can write any register > > inside PHY through this file. >

Re: [PATCH] net: add regs attribute to phy device for user diagnose

2017-01-15 Thread Andrew Lunn
On Sun, Jan 15, 2017 at 09:51:03AM +0800, yuan linyu wrote: > On ???, 2017-01-14 at 10:35 -0800, Florian Fainelli wrote: > > On 01/14/2017 08:24 AM, Andrew Lunn wrote: > > > > > > On Sat, Jan 14, 2017 at 10:46:31AM +0800, yuan linyu wrote: > > > > > > > > From: yuan linyu

Re: [PATCH] net: add regs attribute to phy device for user diagnose

2017-01-15 Thread yuan linyu
On 六, 2017-01-14 at 17:57 -0800, Florian Fainelli wrote: > Le 01/14/17 à 17:51, yuan linyu a écrit : > > > > I think mii-tool or ethtool can't do it currently. > Maybe they cannot right now but they can certainly be patched to support > that. sysfs is not an appropriate interface for what you are

Re: [PATCH] net: add regs attribute to phy device for user diagnose

2017-01-14 Thread Florian Fainelli
Le 01/14/17 à 17:51, yuan linyu a écrit : > On 六, 2017-01-14 at 10:35 -0800, Florian Fainelli wrote: >> On 01/14/2017 08:24 AM, Andrew Lunn wrote: >>> >>> On Sat, Jan 14, 2017 at 10:46:31AM +0800, yuan linyu wrote: From: yuan linyu if phy

Re: [PATCH] net: add regs attribute to phy device for user diagnose

2017-01-14 Thread yuan linyu
On 六, 2017-01-14 at 10:35 -0800, Florian Fainelli wrote: > On 01/14/2017 08:24 AM, Andrew Lunn wrote: > > > > On Sat, Jan 14, 2017 at 10:46:31AM +0800, yuan linyu wrote: > > > > > > From: yuan linyu > > > > > > if phy device have register(s) configuration

Re: [PATCH] net: add regs attribute to phy device for user diagnose

2017-01-14 Thread Florian Fainelli
On 01/14/2017 08:24 AM, Andrew Lunn wrote: > On Sat, Jan 14, 2017 at 10:46:31AM +0800, yuan linyu wrote: >> From: yuan linyu >> >> if phy device have register(s) configuration problem, >> user can use this attribute to diagnose. >> this feature need phy driver

Re: [PATCH] net: add regs attribute to phy device for user diagnose

2017-01-14 Thread Andrew Lunn
On Sat, Jan 14, 2017 at 10:46:31AM +0800, yuan linyu wrote: > From: yuan linyu > > if phy device have register(s) configuration problem, > user can use this attribute to diagnose. > this feature need phy driver maintainer implement. what is wrong with mii-tool

[PATCH] net: add regs attribute to phy device for user diagnose

2017-01-13 Thread yuan linyu
From: yuan linyu if phy device have register(s) configuration problem, user can use this attribute to diagnose. this feature need phy driver maintainer implement. Signed-off-by: yuan linyu --- drivers/net/phy/phy_device.c | 26