diff options
author | Ajit Khaparde <ajit.khaparde@emulex.com> | 2011-02-20 11:42:07 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-02-22 10:26:46 -0800 |
commit | 609ff3bb8f6cd38c68c719bbc3c31d6b0b9ce894 (patch) | |
tree | d0b1c965750782ad9daa44099cfd296caef5d0f7 /drivers/net/benet/be_ethtool.c | |
parent | 3968fa1e58896187ee5629db0720d93b9313ad9f (diff) | |
download | op-kernel-dev-609ff3bb8f6cd38c68c719bbc3c31d6b0b9ce894.zip op-kernel-dev-609ff3bb8f6cd38c68c719bbc3c31d6b0b9ce894.tar.gz |
be2net: add code to display temperature of ASIC
Add support to display temperature of ASIC via ethtool -S
From: Somnath K <somnath.kotur@emulex.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/benet/be_ethtool.c')
-rw-r--r-- | drivers/net/benet/be_ethtool.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/benet/be_ethtool.c b/drivers/net/benet/be_ethtool.c index 0833cbd..4766693 100644 --- a/drivers/net/benet/be_ethtool.c +++ b/drivers/net/benet/be_ethtool.c @@ -27,7 +27,7 @@ struct be_ethtool_stat { }; enum {NETSTAT, PORTSTAT, MISCSTAT, DRVSTAT_TX, DRVSTAT_RX, ERXSTAT, - PMEMSTAT}; + PMEMSTAT, DRVSTAT}; #define FIELDINFO(_struct, field) FIELD_SIZEOF(_struct, field), \ offsetof(_struct, field) #define NETSTAT_INFO(field) #field, NETSTAT,\ @@ -46,6 +46,9 @@ enum {NETSTAT, PORTSTAT, MISCSTAT, DRVSTAT_TX, DRVSTAT_RX, ERXSTAT, FIELDINFO(struct be_erx_stats, field) #define PMEMSTAT_INFO(field) #field, PMEMSTAT,\ FIELDINFO(struct be_pmem_stats, field) +#define DRVSTAT_INFO(field) #field, DRVSTAT,\ + FIELDINFO(struct be_drv_stats, \ + field) static const struct be_ethtool_stat et_stats[] = { {NETSTAT_INFO(rx_packets)}, @@ -105,7 +108,8 @@ static const struct be_ethtool_stat et_stats[] = { {MISCSTAT_INFO(rx_drops_mtu)}, {MISCSTAT_INFO(port0_jabber_events)}, {MISCSTAT_INFO(port1_jabber_events)}, - {PMEMSTAT_INFO(eth_red_drops)} + {PMEMSTAT_INFO(eth_red_drops)}, + {DRVSTAT_INFO(be_on_die_temperature)} }; #define ETHTOOL_STATS_NUM ARRAY_SIZE(et_stats) @@ -285,6 +289,9 @@ be_get_ethtool_stats(struct net_device *netdev, case PMEMSTAT: p = &hw_stats->pmem; break; + case DRVSTAT: + p = &adapter->drv_stats; + break; } p = (u8 *)p + et_stats[i].offset; |