ethtool support
PATCH 1/1 ethtool support
Hi,
Trivial patch for the uml network driver: basic ethtool support so it returns name + version on ETHTOOL_GDRVINFO.
Gerd
arch/um/drivers/net_kern.c renamed from arch/um/drivers/net_kern.c.ethtool +25 -1
@@ -15,6 +15,7 @@#include "linux/module.h" #include "linux/init.h" #include "linux/etherdevice.h" +#include "linux/ethtool.h" #include "linux/list.h" #include "linux/inetdevice.h" #include "linux/ctype.h"
@@ -242,7 +243,30 @@static int uml_net_ioctl (struct net_device *dev,struct ifreq *ifr,int cmd) { -return (-EINVAL ); +static const struct ethtool_drvinfo info = { + .cmd =ETHTOOL_GDRVINFO , + .driver ="uml virtual ethernet" , + .version ="42" , + }; +void *useraddr; +u32 ethcmd; + +switch (cmd) { +case SIOCETHTOOL : + useraddr = ifr->ifr_data; +if (copy_from_user (ðcmd, useraddr,sizeof (ethcmd))) +return -EFAULT ; +switch (ethcmd) { +case ETHTOOL_GDRVINFO : +if (copy_to_user (useraddr, &info,sizeof (info))) +return -EFAULT ; +return 0 ; +default : +return -EOPNOTSUPP ; + } +default : +return -EINVAL ; + } }void uml_net_user_timer_expire (unsigned long _conn)
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 2 lines · [email protected] said:
Trivial patch for the uml network driver: basic ethtool support so it returns name + version on
ETHTOOL_GDRVINFO.
Applied, thanks. What's with the version == 42?
Jeff
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 5 lines · Jeff Dike
Quoted 2 lines · [email protected] said:
Trivial patch for the uml network driver: basic ethtool support so it returns name + version on
ETHTOOL_GDRVINFO.Applied, thanks. What's with the version == 42?
I didn't find a version for the driver, so I picked a random number. Well, not completely random, just google for "42" ;)
Gerd
Signature · 13 lines
Bei Debian kannst du dir aussuchen, woran du selbst schuld sein willst. -- Thiemo Seufer in dasr zu stable vs. testing ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click _______________________________________________ User-mode-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
the ultimate answer - was: Re: [uml-devel] [patch] ethtool support
btw:
are there theories around, why deepthought calculated "42" ? i wondered myself "42? WHY THE F..K 42 ?" for years..... the most impressive idea gave a colleague of mine:
42 is "*" in ascii (decimal) - and "*" is the glob character in computing world - matching everything.
are there other theories around, why mr. adams let deepthough chose "42" in his novel ?
unfortunately, we can`t ask him anymore.... :(
:)
----- Original Message -----
From: "Gerd Knorr" <[email protected]>
To: "Jeff Dike" <[email protected]>
Cc: "uml devel" <[email protected]>
Sent: Wednesday, May 05, 2004 7:45 AM
Subject: Re: [uml-devel] [patch] ethtool support
Quoted 5 lines · Jeff Dike
Quoted 4 lines
Quoted 2 lines · [email protected] said:
Trivial patch for the uml network driver: basic ethtool support so it returns name + version on
ETHTOOL_GDRVINFO.
Quoted 22 lines
Quoted 1 line
Applied, thanks. What's with the version == 42?
I didn't find a version for the driver, so I picked a random number. Well, not completely random, just google for "42" ;)
Gerd
Signature · 13 lines
Bei Debian kannst du dir aussuchen, woran du selbst schuld sein willst. -- Thiemo Seufer in dasr zu stable vs. testing ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click _______________________________________________ User-mode-linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
[ot] the ultimate answer - was: Re: [uml-devel] [patch] ethtool support
Quoted 1 line · roland
are there theories around, why deepthought calculated "42" ?
http://www.empirenet.com/~dljones/ has a interesting collection, includig what supposedly is mr. Adams own words on why 42.
Regards
Henrik
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Re: the ultimate answer - was: Re: [uml-devel] [patch] ethtool support
In reply to rolandQuoted 3 lines · roland
unfortunately, we can`t ask him anymore.... :(
Sorry to be the dream breaker:
http://groups.google.com/groups?selm=adamsd.1102700746A%40news.cerf.net
:)
Nobody makes jokes in base 13.
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel