netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: f.fainelli@gmail.com
Cc: cugyly@163.com, andrew@lunn.ch, netdev@vger.kernel.org,
	Linyu.Yuan@alcatel-sbell.com.cn
Subject: Re: [PATCH] net: add regs attribute to phy device for user diagnose
Date: Mon, 16 Jan 2017 16:54:01 -0500 (EST)	[thread overview]
Message-ID: <20170116.165401.1642553705400599921.davem@davemloft.net> (raw)
In-Reply-To: <cf3e3125-582f-8b91-9c23-05dbdd2c6d24@gmail.com>

From: Florian Fainelli <f.fainelli@gmail.com>
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 attribute file "regs" to do
>>>> a full check of all registers value, and they can write any register
>>>> inside PHY through this file.
>>> Since this is intended for debug, it should not be sysfs, but debugfs.
>> agree,
>>> However, in general, Linux does not allow user space to peek and poke
>>> device registers. Can you point me at examples where i can do the same
>>> to my GPU? SATA controller? Ethernet controller, I2C temperature
>>> sensor? Any device?
>> we can read registers of ethernet controller(memory register accessed) through devmem or ethtool
> 
> So why not add support in ethtool for reading PHY registers if you need
> it? There are handful of PHY "things" in ethtool, such as reading
> counters, configuring downshift etc., adding support for dumping
> registers does not sound out of space.

Agreed.

  reply	other threads:[~2017-01-16 21:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-14  2:46 [PATCH] net: add regs attribute to phy device for user diagnose yuan linyu
2017-01-14 16:24 ` Andrew Lunn
2017-01-14 18:35   ` Florian Fainelli
2017-01-15  1:51     ` yuan linyu
2017-01-15  1:57       ` Florian Fainelli
2017-01-15 10:40         ` yuan linyu
2017-01-15 17:21       ` Andrew Lunn
2017-01-16 12:59         ` yuan linyu
2017-01-16 20:22           ` Florian Fainelli
2017-01-16 21:54             ` David Miller [this message]
2017-01-17  0:11               ` YUAN Linyu
2017-01-18 12:37                 ` Zefir Kurtisi
2017-01-19  0:45                   ` YUAN Linyu
2017-01-19  1:01                     ` Andrew Lunn
2017-02-11  3:48                       ` yuan linyu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170116.165401.1642553705400599921.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=Linyu.Yuan@alcatel-sbell.com.cn \
    --cc=andrew@lunn.ch \
    --cc=cugyly@163.com \
    --cc=f.fainelli@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).