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 converts 2.4 to use driver_name
diff -purNX /suse/olh/kernel/kernel_exclude.txt usb-2.4.21.orig/drivers/usb/CDCEther.c
usb-2.4.21/drivers/usb/CDCEther.c
--- usb-2.4.21.orig/drivers/usb/CDCEther.c 2003-06-06 16:30:12.000000000 +0200
+++ usb-2.4.21/drivers/usb/CDCEther.c 2003-06-07 01:29:48.000000000 +0200
@@ -37,6 +37,7 @@
#define SHORT_DRIVER_DESC "CDC Ethernet Class"
#define DRIVER_VERSION "0.98.6"
+static const char driver_name[] = "CDCEther";
static const char *version = __FILE__ ": " DRIVER_VERSION " 7 Jan 2002 Brad Hards and
another";
// We only try to claim CDC Ethernet model devices */
static struct usb_device_id CDCEther_ids[] = {
@@ -460,7 +461,7 @@ static int netdev_ethtool_ioctl(struct n
/* get driver info */
case ETHTOOL_GDRVINFO: {
struct ethtool_drvinfo info = {ETHTOOL_GDRVINFO};
- strncpy(info.driver, "CDCEther", ETHTOOL_BUSINFO_LEN);
+ strncpy(info.driver, driver_name, ETHTOOL_BUSINFO_LEN);
strncpy(info.version, DRIVER_VERSION, ETHTOOL_BUSINFO_LEN);
sprintf(tmp, "usb%d:%d", ether_dev->usb->bus->busnum,
ether_dev->usb->devnum);
strncpy(info.bus_info, tmp, ETHTOOL_BUSINFO_LEN);
@@ -1421,7 +1422,7 @@ static void CDCEther_disconnect( struct
//////////////////////////////////////////////////////////////////////////////
static struct usb_driver CDCEther_driver = {
- name: "CDCEther",
+ name: driver_name,
probe: CDCEther_probe,
disconnect: CDCEther_disconnect,
id_table: CDCEther_ids,
diff -purNX /suse/olh/kernel/kernel_exclude.txt usb-2.4.21.orig/drivers/usb/catc.c
usb-2.4.21/drivers/usb/catc.c
--- usb-2.4.21.orig/drivers/usb/catc.c 2003-06-06 16:32:01.000000000 +0200
+++ usb-2.4.21/drivers/usb/catc.c 2003-06-07 01:28:36.000000000 +0200
@@ -62,6 +62,8 @@ MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_LICENSE("GPL");
+static const char driver_name[] = "catc";
+
/*
* Some defines.
*/
@@ -674,7 +676,7 @@ static int netdev_ethtool_ioctl(struct n
/* get driver info */
case ETHTOOL_GDRVINFO: {
struct ethtool_drvinfo info = {ETHTOOL_GDRVINFO};
- strncpy(info.driver, "catc", ETHTOOL_BUSINFO_LEN);
+ strncpy(info.driver, driver_name, ETHTOOL_BUSINFO_LEN);
strncpy(info.version, DRIVER_VERSION, ETHTOOL_BUSINFO_LEN);
sprintf(tmp, "usb%d:%d", catc->usbdev->bus->busnum,
catc->usbdev->devnum);
strncpy(info.bus_info, tmp,ETHTOOL_BUSINFO_LEN);
@@ -937,7 +939,7 @@ static struct usb_device_id catc_id_tabl
MODULE_DEVICE_TABLE(usb, catc_id_table);
static struct usb_driver catc_driver = {
- 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.4.21.orig/drivers/usb/kaweth.c
usb-2.4.21/drivers/usb/kaweth.c
--- usb-2.4.21.orig/drivers/usb/kaweth.c 2003-04-05 00:00:25.000000000 +0200
+++ usb-2.4.21/drivers/usb/kaweth.c 2003-06-07 01:27:43.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 void *kaweth_probe(
struct usb_device *dev, /* the device */
unsigned ifnum, /* what interface */
@@ -170,7 +172,7 @@ MODULE_DEVICE_TABLE (usb, usb_klsi_table
* kaweth_driver
****************************************************************/
static struct usb_driver kaweth_driver = {
- .name = "kaweth",
+ .name = driver_name,
.probe = kaweth_probe,
.disconnect = kaweth_disconnect,
.id_table = usb_klsi_table,
@@ -659,7 +661,7 @@ static int netdev_ethtool_ioctl(struct n
switch (ethcmd) {
case ETHTOOL_GDRVINFO: {
struct ethtool_drvinfo info = {ETHTOOL_GDRVINFO};
- strncpy(info.driver, "kaweth", sizeof(info.driver)-1);
+ strncpy(info.driver, driver_name, sizeof(info.driver)-1);
if (copy_to_user(useraddr, &info, sizeof(info)))
return -EFAULT;
return 0;
diff -purNX /suse/olh/kernel/kernel_exclude.txt usb-2.4.21.orig/drivers/usb/rtl8150.c
usb-2.4.21/drivers/usb/rtl8150.c
--- usb-2.4.21.orig/drivers/usb/rtl8150.c 2003-06-06 16:36:34.000000000 +0200
+++ usb-2.4.21/drivers/usb/rtl8150.c 2003-06-07 01:31:41.000000000 +0200
@@ -111,8 +111,10 @@ static void rtl8150_disconnect(struct us
static void *rtl8150_probe(struct usb_device *dev, unsigned int ifnum,
const struct usb_device_id *id);
+static const char driver_name[] = "rtl8150";
+
static struct usb_driver rtl8150_driver = {
- name: "rtl8150",
+ name: driver_name,
probe: rtl8150_probe,
disconnect: rtl8150_disconnect,
id_table: rtl8150_table,
@@ -578,7 +580,7 @@ static int rtl8150_ethtool_ioctl(struct
case ETHTOOL_GDRVINFO:{
struct ethtool_drvinfo info = { ETHTOOL_GDRVINFO };
- strncpy(info.driver, "rtl8150", ETHTOOL_BUSINFO_LEN);
+ strncpy(info.driver, driver_name, ETHTOOL_BUSINFO_LEN);
strncpy(info.version, DRIVER_VERSION,
ETHTOOL_BUSINFO_LEN);
sprintf(tmp, "usb%d:%d", dev->udev->bus->busnum,
--
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