All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [uml-devel] [patch] ethtool support
@ 2004-04-30  9:45 Gerd Knorr
  2004-05-04 20:41 ` Jeff Dike
  0 siblings, 1 reply; 6+ messages in thread
From: Gerd Knorr @ 2004-04-30  9:45 UTC (permalink / raw
  To: uml devel

  Hi,

Trivial patch for the uml network driver: basic ethtool support
so it returns name + version on ETHTOOL_GDRVINFO.

  Gerd

--- linux-2.6.5/arch/um/drivers/net_kern.c.ethtool	2004-04-28 15:17:29.125885216 +0200
+++ linux-2.6.5/arch/um/drivers/net_kern.c	2004-04-28 16:59:57.841138416 +0200
@@ -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(&ethcmd, 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
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [uml-devel] [patch] ethtool support
  2004-04-30  9:45 [uml-devel] [patch] ethtool support Gerd Knorr
@ 2004-05-04 20:41 ` Jeff Dike
  2004-05-05  5:45   ` Gerd Knorr
  0 siblings, 1 reply; 6+ messages in thread
From: Jeff Dike @ 2004-05-04 20:41 UTC (permalink / raw
  To: Gerd Knorr; +Cc: uml devel

kraxel@bytesex.org 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
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [uml-devel] [patch] ethtool support
  2004-05-04 20:41 ` Jeff Dike
@ 2004-05-05  5:45   ` Gerd Knorr
  2004-05-05  6:33     ` the ultimate answer - was: " roland
  0 siblings, 1 reply; 6+ messages in thread
From: Gerd Knorr @ 2004-05-05  5:45 UTC (permalink / raw
  To: Jeff Dike; +Cc: uml devel

On Tue, May 04, 2004 at 04:41:40PM -0400, Jeff Dike wrote:
> kraxel@bytesex.org 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

-- 
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
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* the ultimate answer - was: Re: [uml-devel] [patch] ethtool support
  2004-05-05  5:45   ` Gerd Knorr
@ 2004-05-05  6:33     ` roland
  2004-05-05 11:30       ` [ot] " Henrik Nordstrom
  2004-07-09 15:55       ` Romain Chantereau
  0 siblings, 2 replies; 6+ messages in thread
From: roland @ 2004-05-05  6:33 UTC (permalink / raw
  To: Gerd Knorr, Jeff Dike; +Cc: uml devel


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" <kraxel@bytesex.org>
To: "Jeff Dike" <jdike@addtoit.com>
Cc: "uml devel" <user-mode-linux-devel@lists.sourceforge.net>
Sent: Wednesday, May 05, 2004 7:45 AM
Subject: Re: [uml-devel] [patch] ethtool support


> On Tue, May 04, 2004 at 04:41:40PM -0400, Jeff Dike wrote:
> > kraxel@bytesex.org 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
> 
> -- 
> 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
> User-mode-linux-devel@lists.sourceforge.net
> 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
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ot] the ultimate answer - was: Re: [uml-devel] [patch] ethtool support
  2004-05-05  6:33     ` the ultimate answer - was: " roland
@ 2004-05-05 11:30       ` Henrik Nordstrom
  2004-07-09 15:55       ` Romain Chantereau
  1 sibling, 0 replies; 6+ messages in thread
From: Henrik Nordstrom @ 2004-05-05 11:30 UTC (permalink / raw
  To: roland; +Cc: uml devel

On Wed, 5 May 2004, roland wrote:

> 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
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: the ultimate answer - was: Re: [uml-devel] [patch] ethtool support
  2004-05-05  6:33     ` the ultimate answer - was: " roland
  2004-05-05 11:30       ` [ot] " Henrik Nordstrom
@ 2004-07-09 15:55       ` Romain Chantereau
  1 sibling, 0 replies; 6+ messages in thread
From: Romain Chantereau @ 2004-07-09 15:55 UTC (permalink / raw
  To: user-mode-linux-devel

roland wrote:

>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
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-07-09 15:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-30  9:45 [uml-devel] [patch] ethtool support Gerd Knorr
2004-05-04 20:41 ` Jeff Dike
2004-05-05  5:45   ` Gerd Knorr
2004-05-05  6:33     ` the ultimate answer - was: " roland
2004-05-05 11:30       ` [ot] " Henrik Nordstrom
2004-07-09 15:55       ` Romain Chantereau

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.