aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJeff Kirsher <jeffrey.t.kirsher@intel.com>2006-01-12 19:51:23 -0500
committerJeff Garzik <jgarzik@pobox.com>2006-01-17 07:48:04 -0500
commita2917e22dcaa53e8ad2d8dc3bcfa55a4b04e6d0f (patch)
tree75114ad5813ca2eb417bbeb602ba66329832cf47 /drivers
parentb7ee49db8b4b21dad3284d5507e7ea2946031f6e (diff)
[PATCH] e1000: Added firmware version reporting for 8257{1|2|3} controllers
The EEPROM image version is reported as a firmware version for these controllers. Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/e1000/e1000_ethtool.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c
index 0f9c86057a58..d252297e4db0 100644
--- a/drivers/net/e1000/e1000_ethtool.c
+++ b/drivers/net/e1000/e1000_ethtool.c
@@ -582,10 +582,29 @@ e1000_get_drvinfo(struct net_device *netdev,
582 struct ethtool_drvinfo *drvinfo) 582 struct ethtool_drvinfo *drvinfo)
583{ 583{
584 struct e1000_adapter *adapter = netdev_priv(netdev); 584 struct e1000_adapter *adapter = netdev_priv(netdev);
585 char firmware_version[32];
586 uint16_t eeprom_data;
585 587
586 strncpy(drvinfo->driver, e1000_driver_name, 32); 588 strncpy(drvinfo->driver, e1000_driver_name, 32);
587 strncpy(drvinfo->version, e1000_driver_version, 32); 589 strncpy(drvinfo->version, e1000_driver_version, 32);
588 strncpy(drvinfo->fw_version, "N/A", 32); 590
591 /* EEPROM image version # is reported as firmware version # for
592 * 8257{1|2|3} controllers */
593 e1000_read_eeprom(&adapter->hw, 5, 1, &eeprom_data);
594 switch (adapter->hw.mac_type) {
595 case e1000_82571:
596 case e1000_82572:
597 case e1000_82573:
598 sprintf(firmware_version, "%d.%d-%d",
599 (eeprom_data & 0xF000) >> 12,
600 (eeprom_data & 0x0FF0) >> 4,
601 eeprom_data & 0x000F);
602 break;
603 default:
604 sprintf(firmware_version, "N/A");
605 }
606
607 strncpy(drvinfo->fw_version, firmware_version, 32);
589 strncpy(drvinfo->bus_info, pci_name(adapter->pdev), 32); 608 strncpy(drvinfo->bus_info, pci_name(adapter->pdev), 32);
590 drvinfo->n_stats = E1000_STATS_LEN; 609 drvinfo->n_stats = E1000_STATS_LEN;
591 drvinfo->testinfo_len = E1000_TEST_LEN; 610 drvinfo->testinfo_len = E1000_TEST_LEN;