Skip to contentSkip to conversation

RFC ethtool usage

PATCH Don Fry 3 participants 3 messages May 5, 2005 – May 6, 2005

Subsystems (2)
lore
Share & tools
lore

Don Fry

author
#0 lore raw

One of the pieces of information that is useful for me when debugging problems with the pcnet32 driver, is which chip version the problem occurs with (79C973, 79C976, etc).

Since the chip has no firmware, how badly would I be flamed, if I modified the driver to return the string (which is currently printed on boot), as the 'firmware-version'?

pcnet32.c Mon May 2 15:13:38 2005 renamed from orig.pcnet32.c Mon May 2 15:12:02 2005 +1 -0
@@ -559,6 +559,7 @@ static void pcnet32_get_drvinfo(struct n
 
     strcpy (info->driver, DRV_NAME);
     strcpy (info->version, DRV_VERSION);
+    strncpy(info->fw_version, lp->name, sizeof(info->fw_version) - 1);
     if (lp->pci_dev)
 	strcpy (info->bus_info, pci_name(lp->pci_dev));
     else

So the output looked like:

$ ethtool -i eth0
driver: pcnet32
version: 1.30j
firmware-version: PCnet/PRO 79C976
bus-info: 0000:00:01.0
$ 
Signature · 2 lines
Don Fry
[email protected]
#1 lore raw
Quoted 19 lines · Don Fry

One of the pieces of information that is useful for me when debugging problems with the pcnet32 driver, is which chip version the problem occurs with (79C973, 79C976, etc).

Since the chip has no firmware, how badly would I be flamed, if I modified the driver to return the string (which is currently printed on boot), as the 'firmware-version'?

pcnet32.c Mon May 2 15:13:38 2005 renamed from orig.pcnet32.c Mon May 2 15:12:02 2005 +1 -0
@@ -559,6 +559,7 @@ static void pcnet32_get_drvinfo(struct n
 
     strcpy (info->driver, DRV_NAME);
     strcpy (info->version, DRV_VERSION);
+    strncpy(info->fw_version, lp->name, sizeof(info->fw_version) - 1);
     if (lp->pci_dev)
 	strcpy (info->bus_info, pci_name(lp->pci_dev));
     else
Quoted 6 lines

So the output looked like:

$ ethtool -i eth0
driver: pcnet32
version: 1.30j
firmware-version: PCnet/PRO 79C976
bus-info: 0000:00:01.0

Convenient in the short term, but misleading in the long run, IMO.

Surely you can get this info from an ethtool register dump?

Jeff

maintainer
#2 lore raw
Quoted 3 lines · On Thu, 05 May 2005 22:32:43 -0400 Jeff Garzik <[email protected]> wrote:

Convenient in the short term, but misleading in the long run, IMO.

Surely you can get this info from an ethtool register dump?

I agree. It might not be a bad idea to formalize this in some generic "ethtool_chip_info" block, however.