* [RFC] New functions to manipulate registers for ethtool @ 2008-12-08 8:12 Hitoshi Mitake 2008-12-08 8:54 ` David Miller 0 siblings, 1 reply; 9+ messages in thread From: Hitoshi Mitake @ 2008-12-08 8:12 UTC (permalink / raw) To: netdev, linux-kernel; +Cc: ktaka Hi I want to add two new functions to ethtool. One is for setting driver's registers on MMIO area like --change-eeprom option. I think form of command line is like this, ethtool -X|--set-register ethX [offset N(in bytes)] [value N(single byte value)] Another function is for reading driver's register on MMIO. Currently, there is --register-dump option for dumping registers. But I want finer granularity one which unit of manipulation is byte. Like this, ethtool -B|--dump-register-byte ethX [offset N(in bytes)] (then print one byte to stdout) Of course, names of options is temporary. Because e1000e driver conflicts with some IPMI cards some time, and the reasons of conflict are setting of registers not supported by other general options of ethtool. If this function is added, examing cause of confliction will be much easier. How do you think about this plan? If this plan is not bad, and nobody is working on patch like this plan, I want to do that. Thanks Hitoshi ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC] New functions to manipulate registers for ethtool 2008-12-08 8:12 [RFC] New functions to manipulate registers for ethtool Hitoshi Mitake @ 2008-12-08 8:54 ` David Miller 2008-12-08 9:01 ` Valdis.Kletnieks 2008-12-08 9:01 ` Hitoshi Mitake 0 siblings, 2 replies; 9+ messages in thread From: David Miller @ 2008-12-08 8:54 UTC (permalink / raw) To: mitake; +Cc: netdev, linux-kernel, ktaka From: Hitoshi Mitake <mitake@clustcom.com> Date: Mon, 8 Dec 2008 17:12:30 +0900 > I want to add two new functions to ethtool. > > One is for setting driver's registers on MMIO area like > --change-eeprom option. You can map the registers into userspace using the bus level mmap facilities exported to userspace. No ethtool support is necessary for this. > Another function is for reading driver's register on MMIO. Also not necessary, for the same reasons described above. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC] New functions to manipulate registers for ethtool 2008-12-08 8:54 ` David Miller @ 2008-12-08 9:01 ` Valdis.Kletnieks 2008-12-08 9:06 ` David Miller 2008-12-08 9:01 ` Hitoshi Mitake 1 sibling, 1 reply; 9+ messages in thread From: Valdis.Kletnieks @ 2008-12-08 9:01 UTC (permalink / raw) To: David Miller; +Cc: mitake, netdev, linux-kernel, ktaka [-- Attachment #1: Type: text/plain, Size: 739 bytes --] On Mon, 08 Dec 2008 00:54:31 PST, David Miller said: > From: Hitoshi Mitake <mitake@clustcom.com> > Date: Mon, 8 Dec 2008 17:12:30 +0900 > > > I want to add two new functions to ethtool. > > > > One is for setting driver's registers on MMIO area like > > --change-eeprom option. > > You can map the registers into userspace using the bus > level mmap facilities exported to userspace. > > No ethtool support is necessary for this. Yes, but if Hitoshi wants to tell a user "run this command and send me the output", what's the incantation the user needs to use? The user probably has ethtool installed if they have a semi-sane distro. Their eyeballs are just gonna glaze over if they're asked to map the registers into userspace.. ;) [-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC] New functions to manipulate registers for ethtool 2008-12-08 9:01 ` Valdis.Kletnieks @ 2008-12-08 9:06 ` David Miller 2008-12-08 9:26 ` Valdis.Kletnieks 2008-12-08 17:36 ` Brandeburg, Jesse 0 siblings, 2 replies; 9+ messages in thread From: David Miller @ 2008-12-08 9:06 UTC (permalink / raw) To: Valdis.Kletnieks; +Cc: mitake, netdev, linux-kernel, ktaka From: Valdis.Kletnieks@vt.edu Date: Mon, 08 Dec 2008 04:01:43 -0500 > On Mon, 08 Dec 2008 00:54:31 PST, David Miller said: > > From: Hitoshi Mitake <mitake@clustcom.com> > > Date: Mon, 8 Dec 2008 17:12:30 +0900 > > > > > I want to add two new functions to ethtool. > > > > > > One is for setting driver's registers on MMIO area like > > > --change-eeprom option. > > > > You can map the registers into userspace using the bus > > level mmap facilities exported to userspace. > > > > No ethtool support is necessary for this. > > Yes, but if Hitoshi wants to tell a user "run this command and send me > the output", what's the incantation the user needs to use? That's an awful reason to have to two ways of doing the exact same thing from userspace. Write the tool. Someone will if it's important enough (in fact such code probably exists already). ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC] New functions to manipulate registers for ethtool 2008-12-08 9:06 ` David Miller @ 2008-12-08 9:26 ` Valdis.Kletnieks 2008-12-08 9:57 ` David Miller 2008-12-08 17:36 ` Brandeburg, Jesse 1 sibling, 1 reply; 9+ messages in thread From: Valdis.Kletnieks @ 2008-12-08 9:26 UTC (permalink / raw) To: David Miller; +Cc: mitake, netdev, linux-kernel, ktaka [-- Attachment #1: Type: text/plain, Size: 217 bytes --] On Mon, 08 Dec 2008 01:06:34 PST, David Miller said: > That's an awful reason to have to two ways of doing the exact same > thing from userspace. Which is why 'sysctl' and 'echo > /proc/sys/....' both exist, right? [-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC] New functions to manipulate registers for ethtool 2008-12-08 9:26 ` Valdis.Kletnieks @ 2008-12-08 9:57 ` David Miller 0 siblings, 0 replies; 9+ messages in thread From: David Miller @ 2008-12-08 9:57 UTC (permalink / raw) To: Valdis.Kletnieks; +Cc: mitake, netdev, linux-kernel, ktaka From: Valdis.Kletnieks@vt.edu Date: Mon, 08 Dec 2008 04:26:12 -0500 > On Mon, 08 Dec 2008 01:06:34 PST, David Miller said: > > > That's an awful reason to have to two ways of doing the exact same > > thing from userspace. > > Which is why 'sysctl' and 'echo > /proc/sys/....' both exist, right? We're essentially getting rid of the former, so your sarcasm was poorly applied, sorry. ^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [RFC] New functions to manipulate registers for ethtool 2008-12-08 9:06 ` David Miller 2008-12-08 9:26 ` Valdis.Kletnieks @ 2008-12-08 17:36 ` Brandeburg, Jesse 2008-12-10 11:26 ` Hitoshi Mitake 1 sibling, 1 reply; 9+ messages in thread From: Brandeburg, Jesse @ 2008-12-08 17:36 UTC (permalink / raw) To: David Miller, Valdis.Kletnieks@vt.edu Cc: mitake@clustcom.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, ktaka@clustcom.com, Brandeburg, Jesse [-- Attachment #1: Type: text/plain, Size: 1475 bytes --] David Miller wrote: > From: Valdis.Kletnieks@vt.edu > Date: Mon, 08 Dec 2008 04:01:43 -0500 > >> On Mon, 08 Dec 2008 00:54:31 PST, David Miller said: >>> From: Hitoshi Mitake <mitake@clustcom.com> >>> Date: Mon, 8 Dec 2008 17:12:30 +0900 >>> >>>> I want to add two new functions to ethtool. >>>> >>>> One is for setting driver's registers on MMIO area like >>>> --change-eeprom option. >>> >>> You can map the registers into userspace using the bus >>> level mmap facilities exported to userspace. one hiccup, Arjan recently added functionality to the kernel that could disallow this unless a user overrides at boot. [1] also, there is a .config option that disallows this but I'm just mentioning it for posterity. >>> No ethtool support is necessary for this. >> >> Yes, but if Hitoshi wants to tell a user "run this command and send >> me the output", what's the incantation the user needs to use? > ethregs -s <bus>:<dev>.<fn> > That's an awful reason to have to two ways of doing the exact same > thing from userspace. > > Write the tool. Someone will if it's important enough (in fact > such code probably exists already). Hi Hitoshi, you probably want to download and install our ethregs utility. http://prdownloads.sf.net/e1000/ethregs-1.1.tar.gz (this is not a direct link as it seems but gets redirected to a mirror page, usually) Please let me know if it doesn't support your device ID. [1] http://marc.info/?l=linux-kernel&m=122747416512900&w=2 [-- Attachment #2: smime.p7s --] [-- Type: application/x-pkcs7-signature, Size: 6703 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC] New functions to manipulate registers for ethtool 2008-12-08 17:36 ` Brandeburg, Jesse @ 2008-12-10 11:26 ` Hitoshi Mitake 0 siblings, 0 replies; 9+ messages in thread From: Hitoshi Mitake @ 2008-12-10 11:26 UTC (permalink / raw) To: Brandeburg, Jesse Cc: David Miller, Valdis.Kletnieks@vt.edu, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, ktaka@clustcom.com On Mon, 8 Dec 2008 09:36:53 -0800 "Brandeburg, Jesse" <jesse.brandeburg@intel.com> wrote: > David Miller wrote: > > From: Valdis.Kletnieks@vt.edu > > Date: Mon, 08 Dec 2008 04:01:43 -0500 > > > >> On Mon, 08 Dec 2008 00:54:31 PST, David Miller said: > >>> From: Hitoshi Mitake <mitake@clustcom.com> > >>> Date: Mon, 8 Dec 2008 17:12:30 +0900 > >>> > >>>> I want to add two new functions to ethtool. > >>>> > >>>> One is for setting driver's registers on MMIO area like > >>>> --change-eeprom option. > >>> > >>> You can map the registers into userspace using the bus > >>> level mmap facilities exported to userspace. > > one hiccup, Arjan recently added functionality to the kernel that could > disallow this unless a user overrides at boot. [1] > > also, there is a .config option that disallows this but I'm just > mentioning it for posterity. > > >>> No ethtool support is necessary for this. > >> > >> Yes, but if Hitoshi wants to tell a user "run this command and send > >> me the output", what's the incantation the user needs to use? > > > > ethregs -s <bus>:<dev>.<fn> > > > That's an awful reason to have to two ways of doing the exact same > > thing from userspace. > > > > Write the tool. Someone will if it's important enough (in fact > > such code probably exists already). Thanks for your replying, David, Valdis and Jesse. > > Hi Hitoshi, > you probably want to download and install our ethregs utility. > http://prdownloads.sf.net/e1000/ethregs-1.1.tar.gz > (this is not a direct link as it seems but gets redirected to a mirror > page, usually) > This is a nice software for me, Thanks. > Please let me know if it doesn't support your device ID. I used this on my environment. My NICs are 82573L and 82573E. ethregs could detected them well. It seems that this program doesn't support for writing value to registers. I think making ethregs to support writing is not bad idea. If you are not planning, I want to do that. I'm not a professional of Intel's NICs. How do you think? ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFC] New functions to manipulate registers for ethtool 2008-12-08 8:54 ` David Miller 2008-12-08 9:01 ` Valdis.Kletnieks @ 2008-12-08 9:01 ` Hitoshi Mitake 1 sibling, 0 replies; 9+ messages in thread From: Hitoshi Mitake @ 2008-12-08 9:01 UTC (permalink / raw) To: David Miller; +Cc: netdev, linux-kernel, ktaka On Mon, 08 Dec 2008 00:54:31 -0800 (PST) David Miller <davem@davemloft.net> wrote: > From: Hitoshi Mitake <mitake@clustcom.com> > Date: Mon, 8 Dec 2008 17:12:30 +0900 > > > I want to add two new functions to ethtool. > > > > One is for setting driver's registers on MMIO area like > > --change-eeprom option. > > You can map the registers into userspace using the bus > level mmap facilities exported to userspace. > > No ethtool support is necessary for this. > > > Another function is for reading driver's register on MMIO. > > Also not necessary, for the same reasons described > above. I didn't know that, thanks! I'll work with my problems with mmap and userspace program. ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-12-10 11:26 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-12-08 8:12 [RFC] New functions to manipulate registers for ethtool Hitoshi Mitake 2008-12-08 8:54 ` David Miller 2008-12-08 9:01 ` Valdis.Kletnieks 2008-12-08 9:06 ` David Miller 2008-12-08 9:26 ` Valdis.Kletnieks 2008-12-08 9:57 ` David Miller 2008-12-08 17:36 ` Brandeburg, Jesse 2008-12-10 11:26 ` Hitoshi Mitake 2008-12-08 9:01 ` Hitoshi Mitake
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox