New functions to manipulate registers for ethtool
Subsystems (2)
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
David Miller
maintainerFrom: Hitoshi Mitake <[email protected]>
Date: Mon, 8 Dec 2008 17:12:30 +0900
Quoted 4 lines
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.
Quoted 1 line
Another function is for reading driver's register on MMIO.
Also not necessary, for the same reasons described above.
Quoted 11 lines · On Mon, 08 Dec 2008 00:54:31 -0800 (PST) David Miller <[email protected]>…
From: Hitoshi Mitake <[email protected]>
Date: Mon, 8 Dec 2008 17:12:30 +0900Quoted 4 lines
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.
Quoted 6 lines
No ethtool support is necessary for this.
Quoted 1 line
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.
Quoted 5 lines · David Miller
From: Hitoshi Mitake <[email protected]>
Date: Mon, 8 Dec 2008 17:12:30 +0900Quoted 2 lines
I want to add two new functions to ethtool.
Quoted 7 lines
Quoted 2 lines
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.. ;)
David Miller
maintainerFrom: [email protected]
Date: Mon, 08 Dec 2008 04:01:43 -0500
Quoted 9 lines · David Miller
Quoted 8 lines
From: Hitoshi Mitake <[email protected]>
Date: Mon, 8 Dec 2008 17:12:30 +0900Quoted 4 lines
I want to add two new functions to ethtool.
One is for setting driver's registers on MMIO area like --change-eeprom option.
Quoted 7 lines
Quoted 4 lines
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).
Quoted 2 lines · David Miller
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?
David Miller
maintainerFrom: [email protected]
Date: Mon, 08 Dec 2008 04:26:12 -0500
Quoted 6 lines · David Miller
Quoted 3 lines
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.
Quoted 14 lines · David Miller
From: [email protected]
Date: Mon, 08 Dec 2008 04:01:43 -0500Quoted 11 lines · David Miller
Quoted 10 lines
From: Hitoshi Mitake <[email protected]>
Date: Mon, 8 Dec 2008 17:12:30 +0900Quoted 4 lines
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.
Quoted 5 lines
Quoted 4 lines
Quoted 1 line
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>
Quoted 5 lines
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.
Quoted 22 lines · Jesse
Quoted 14 lines · David Miller
From: [email protected]
Date: Mon, 08 Dec 2008 04:01:43 -0500Quoted 11 lines · David Miller
Quoted 10 lines
From: Hitoshi Mitake <[email protected]>
Date: Mon, 8 Dec 2008 17:12:30 +0900Quoted 4 lines
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.
Quoted 13 lines
Quoted 5 lines
Quoted 4 lines
Quoted 1 line
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>
Quoted 5 lines
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.
Quoted 7 lines
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.
Quoted 1 line
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?