diff options
author | Koki Sanagi <sanagi.koki@jp.fujitsu.com> | 2012-02-15 09:45:39 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2012-05-10 00:41:55 -0400 |
commit | 7e3b4ffb38b550b42c3868cffedb734c3a507073 (patch) | |
tree | bb68775280c644a61d635980b70459eb6b0acaf6 /drivers/net/ethernet/intel/igb/igb_ethtool.c | |
parent | 958a7586814e3498dbb2124de195982163af6bbc (diff) |
igb: output register's information related to RX/TX queue[4-15]
Current igb outputs registers related to TX/RX queues(ex. RDT, RDH, TDT, TDH).
But it thinks the number of RX/TX queues is 4. But 82576 has 16 RX/TX queues.
This patch modifies igb to output the rest of the registers if the device is
82576.
Signed-off-by: Koki Sanagi <sanagi.koki@jp.fujitsu.com>
Acked-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/igb/igb_ethtool.c')
-rw-r--r-- | drivers/net/ethernet/intel/igb/igb_ethtool.c | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c index e10821a0f249..faadf2340866 100644 --- a/drivers/net/ethernet/intel/igb/igb_ethtool.c +++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c | |||
@@ -335,7 +335,7 @@ static void igb_set_msglevel(struct net_device *netdev, u32 data) | |||
335 | 335 | ||
336 | static int igb_get_regs_len(struct net_device *netdev) | 336 | static int igb_get_regs_len(struct net_device *netdev) |
337 | { | 337 | { |
338 | #define IGB_REGS_LEN 551 | 338 | #define IGB_REGS_LEN 739 |
339 | return IGB_REGS_LEN * sizeof(u32); | 339 | return IGB_REGS_LEN * sizeof(u32); |
340 | } | 340 | } |
341 | 341 | ||
@@ -556,6 +556,42 @@ static void igb_get_regs(struct net_device *netdev, | |||
556 | regs_buff[552] = adapter->stats.b2ospc; | 556 | regs_buff[552] = adapter->stats.b2ospc; |
557 | regs_buff[553] = adapter->stats.o2bspc; | 557 | regs_buff[553] = adapter->stats.o2bspc; |
558 | regs_buff[554] = adapter->stats.b2ogprc; | 558 | regs_buff[554] = adapter->stats.b2ogprc; |
559 | |||
560 | if (hw->mac.type != e1000_82576) | ||
561 | return; | ||
562 | for (i = 0; i < 12; i++) | ||
563 | regs_buff[555 + i] = rd32(E1000_SRRCTL(i + 4)); | ||
564 | for (i = 0; i < 4; i++) | ||
565 | regs_buff[567 + i] = rd32(E1000_PSRTYPE(i + 4)); | ||
566 | for (i = 0; i < 12; i++) | ||
567 | regs_buff[571 + i] = rd32(E1000_RDBAL(i + 4)); | ||
568 | for (i = 0; i < 12; i++) | ||
569 | regs_buff[583 + i] = rd32(E1000_RDBAH(i + 4)); | ||
570 | for (i = 0; i < 12; i++) | ||
571 | regs_buff[595 + i] = rd32(E1000_RDLEN(i + 4)); | ||
572 | for (i = 0; i < 12; i++) | ||
573 | regs_buff[607 + i] = rd32(E1000_RDH(i + 4)); | ||
574 | for (i = 0; i < 12; i++) | ||
575 | regs_buff[619 + i] = rd32(E1000_RDT(i + 4)); | ||
576 | for (i = 0; i < 12; i++) | ||
577 | regs_buff[631 + i] = rd32(E1000_RXDCTL(i + 4)); | ||
578 | |||
579 | for (i = 0; i < 12; i++) | ||
580 | regs_buff[643 + i] = rd32(E1000_TDBAL(i + 4)); | ||
581 | for (i = 0; i < 12; i++) | ||
582 | regs_buff[655 + i] = rd32(E1000_TDBAH(i + 4)); | ||
583 | for (i = 0; i < 12; i++) | ||
584 | regs_buff[667 + i] = rd32(E1000_TDLEN(i + 4)); | ||
585 | for (i = 0; i < 12; i++) | ||
586 | regs_buff[679 + i] = rd32(E1000_TDH(i + 4)); | ||
587 | for (i = 0; i < 12; i++) | ||
588 | regs_buff[691 + i] = rd32(E1000_TDT(i + 4)); | ||
589 | for (i = 0; i < 12; i++) | ||
590 | regs_buff[703 + i] = rd32(E1000_TXDCTL(i + 4)); | ||
591 | for (i = 0; i < 12; i++) | ||
592 | regs_buff[715 + i] = rd32(E1000_TDWBAL(i + 4)); | ||
593 | for (i = 0; i < 12; i++) | ||
594 | regs_buff[727 + i] = rd32(E1000_TDWBAH(i + 4)); | ||
559 | } | 595 | } |
560 | 596 | ||
561 | static int igb_get_eeprom_len(struct net_device *netdev) | 597 | static int igb_get_eeprom_len(struct net_device *netdev) |