On Fri, Jun 06, Greg KH wrote:
> On Fri, Jun 06, 2003 at 04:49:55PM +0200, Olaf Hering wrote:
> > Hi,
> >
> > ethtool -i ethX should return the driver name instead of a 'verbose'
> > string. Other tools rely on the output.
> > 2.5 might need a similar fix.
>
> Applied to my 2.4 tree (along with the pegasus fix). Can you send me a
> 2.5 version too? This one doesn't apply at all (even with the directory
> and file name changes.)
This one should be ok, but you better double check:
diff -purNX /suse/olh/kernel/kernel_exclude.txt usb-2.5.70.orig/drivers/usb/net/catc.c
usb-2.5.70/drivers/usb/net/catc.c
--- usb-2.5.70.orig/drivers/usb/net/catc.c 2003-05-30 00:37:51.000000000 +0200
+++ usb-2.5.70/drivers/usb/net/catc.c 2003-06-07 01:06:26.000000000 +0200
@@ -63,6 +63,8 @@ MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_LICENSE("GPL");
+static const char driver_name[] = "catc";
+
/*
* Some defines.
*/
@@ -677,7 +679,7 @@ static int netdev_ethtool_ioctl(struct n
/* get driver info */
case ETHTOOL_GDRVINFO: {
struct ethtool_drvinfo info = {ETHTOOL_GDRVINFO};
- strncpy(info.driver, SHORT_DRIVER_DESC, ETHTOOL_BUSINFO_LEN);
+ strncpy(info.driver, driver_name, ETHTOOL_BUSINFO_LEN);
strncpy(info.version, DRIVER_VERSION, ETHTOOL_BUSINFO_LEN);
usb_make_path (catc->usbdev, info.bus_info, sizeof info.bus_info);
if (copy_to_user(useraddr, &info, sizeof(info)))
@@ -967,7 +969,7 @@ MODULE_DEVICE_TABLE(usb, catc_id_table);
static struct usb_driver catc_driver = {
.owner = THIS_MODULE,
- .name = "catc",
+ .name = driver_name,
.probe = catc_probe,
.disconnect = catc_disconnect,
.id_table = catc_id_table,
diff -purNX /suse/olh/kernel/kernel_exclude.txt
usb-2.5.70.orig/drivers/usb/net/kaweth.c usb-2.5.70/drivers/usb/net/kaweth.c
--- usb-2.5.70.orig/drivers/usb/net/kaweth.c 2003-05-29 09:55:52.000000000 +0200
+++ usb-2.5.70/drivers/usb/net/kaweth.c 2003-06-07 01:03:55.000000000 +0200
@@ -114,6 +114,8 @@ MODULE_AUTHOR("Michael Zappe <[EMAIL PROTECTED]
MODULE_DESCRIPTION("KL5USB101 USB Ethernet driver");
MODULE_LICENSE("GPL");
+static const char driver_name[] = "kaweth";
+
static int kaweth_probe(
struct usb_interface *intf,
const struct usb_device_id *id /* from id_table */
@@ -169,7 +171,7 @@ MODULE_DEVICE_TABLE (usb, usb_klsi_table
****************************************************************/
static struct usb_driver kaweth_driver = {
.owner = THIS_MODULE,
- .name = "kaweth",
+ .name = driver_name,
.probe = kaweth_probe,
.disconnect = kaweth_disconnect,
.id_table = usb_klsi_table,
@@ -670,7 +672,7 @@ static int netdev_ethtool_ioctl(struct n
switch (ethcmd) {
case ETHTOOL_GDRVINFO: {
struct ethtool_drvinfo info = {ETHTOOL_GDRVINFO};
- strlcpy(info.driver, "kaweth", sizeof(info.driver));
+ strlcpy(info.driver, driver_name, sizeof(info.driver));
if (copy_to_user(useraddr, &info, sizeof(info)))
return -EFAULT;
return 0;
diff -purNX /suse/olh/kernel/kernel_exclude.txt
usb-2.5.70.orig/drivers/usb/net/rtl8150.c usb-2.5.70/drivers/usb/net/rtl8150.c
--- usb-2.5.70.orig/drivers/usb/net/rtl8150.c 2003-05-30 00:37:51.000000000 +0200
+++ usb-2.5.70/drivers/usb/net/rtl8150.c 2003-06-07 01:02:30.000000000 +0200
@@ -114,9 +114,11 @@ static void rtl8150_disconnect(struct us
static int rtl8150_probe(struct usb_interface *intf,
const struct usb_device_id *id);
+static const char driver_name [] = "rtl8150";
+
static struct usb_driver rtl8150_driver = {
.owner = THIS_MODULE,
- .name = "rtl8150",
+ .name = driver_name,
.probe = rtl8150_probe,
.disconnect = rtl8150_disconnect,
.id_table = rtl8150_table,
@@ -690,7 +692,7 @@ static int rtl8150_ethtool_ioctl(struct
case ETHTOOL_GDRVINFO:{
struct ethtool_drvinfo info = { ETHTOOL_GDRVINFO };
- strncpy(info.driver, DRIVER_DESC, ETHTOOL_BUSINFO_LEN);
+ strncpy(info.driver, driver_name, ETHTOOL_BUSINFO_LEN);
strncpy(info.version, DRIVER_VERSION, ETHTOOL_BUSINFO_LEN);
usb_make_path(dev->udev, info.bus_info, sizeof info.bus_info);
if (copy_to_user(uaddr, &info, sizeof(info)))
--
USB is for mice, FireWire is for men!
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel