All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [ethtool 1/3] ethtool: fix ixgbe 82598EB only registers
@ 2013-08-28  0:08 Jeff Kirsher
  2013-08-28  0:08 ` [ethtool 2/3] ethtool: don't display some registers on ixgbe X540 Jeff Kirsher
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Jeff Kirsher @ 2013-08-28  0:08 UTC (permalink / raw
  To: bhutchings; +Cc: Jacob Keller, netdev, gospo, sassmann, Jeff Kirsher

From: Jacob Keller <jacob.e.keller@intel.com>

This patch fixes ixgbe_reg_dump to only display registers specific to the
82598EB part, as these registers display 0xDEADBEEF otherwise, and clutter up
the register dump.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 ixgbe.c | 144 +++++++++++++++++++++++++++++++++-------------------------------
 1 file changed, 75 insertions(+), 69 deletions(-)

diff --git a/ixgbe.c b/ixgbe.c
index 9b005f2..89cb6be 100644
--- a/ixgbe.c
+++ b/ixgbe.c
@@ -342,9 +342,10 @@ ixgbe_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs)
 		"0x00000: MSIXT       (MSI-X Table)                    0x%08X\n",
 		regs_buff[26]);
 
-	fprintf(stdout,
-		"0x02000: MSIXPBA     (MSI-X Pending Bit Array)        0x%08X\n",
-		regs_buff[27]);
+	if (mac_type == ixgbe_mac_82598EB)
+		fprintf(stdout,
+			"0x02000: MSIXPBA     (MSI-X Pending Bit Array)        0x%08X\n",
+			regs_buff[27]);
 
 	fprintf(stdout,
 		"0x11068: PBACL       (MSI-X PBA Clear)                0x%08X\n",
@@ -436,9 +437,10 @@ ixgbe_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs)
 		"0x03000: RXCTRL      (Receive Control)                0x%08X\n",
 		regs_buff[478]);
 
-	fprintf(stdout,
-		"0x03D04: DROPEN      (Drop Enable Control)            0x%08X\n",
-		regs_buff[479]);
+	if (mac_type == ixgbe_mac_82598EB)
+		fprintf(stdout,
+			"0x03D04: DROPEN      (Drop Enable Control)            0x%08X\n",
+			regs_buff[479]);
 
 	/* Receive */
 	fprintf(stdout,
@@ -539,9 +541,10 @@ ixgbe_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs)
 		"0x%05X: DCA_TXCTRL%02d (Tx DCA Control %02d)             0x%08X\n",
 		0x07200 + (4 * i), i, i, regs_buff[794 + i]);
 
-	fprintf(stdout,
-		"0x0CB00: TIPG        (Transmit IPG Control)           0x%08X\n",
-		regs_buff[810]);
+	if (mac_type == ixgbe_mac_82598EB)
+		fprintf(stdout,
+			"0x0CB00: TIPG        (Transmit IPG Control)           0x%08X\n",
+			regs_buff[810]);
 
 	for (i = 0; i < 8; i++)
 		fprintf(stdout,
@@ -598,29 +601,31 @@ ixgbe_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs)
 		"0x0CD00: PDPMCS      (Pkt Data Plan Music ctrl Stat)  0x%08X\n",
 		regs_buff[831]);
 
-	fprintf(stdout,
-		"0x050A0: RUPPBMR     (Rx User Prior to Pkt Buff Map)  0x%08X\n",
-		regs_buff[832]);
-
-	for (i = 0; i < 8; i++)
-		fprintf(stdout,
-		"0x%05X: RT2CR%d      (Receive T2 Configure %d)         0x%08X\n",
-		0x03C20 + (4 * i), i, i, regs_buff[833 + i]);
-
-	for (i = 0; i < 8; i++)
-		fprintf(stdout,
-		"0x%05X: RT2SR%d      (Recieve T2 Status %d)            0x%08X\n",
-		0x03C40 + (4 * i), i, i, regs_buff[841 + i]);
-
-	for (i = 0; i < 8; i++)
-		fprintf(stdout,
-		"0x%05X: TDTQ2TCCR%d  (Tx Desc TQ2 TC Config %d)        0x%08X\n",
-		0x0602C + (0x40 * i), i, i, regs_buff[849 + i]);
-
-	for (i = 0; i < 8; i++)
+	if (mac_type == ixgbe_mac_82598EB) {
 		fprintf(stdout,
-		"0x%05X: TDTQ2TCSR%d  (Tx Desc TQ2 TC Status %d)        0x%08X\n",
-		0x0622C + (0x40 * i), i, i, regs_buff[857 + i]);
+			"0x050A0: RUPPBMR     (Rx User Prior to Pkt Buff Map)  0x%08X\n",
+			regs_buff[832]);
+
+		for (i = 0; i < 8; i++)
+			fprintf(stdout,
+				"0x%05X: RT2CR%d      (Receive T2 Configure %d)         0x%08X\n",
+				0x03C20 + (4 * i), i, i, regs_buff[833 + i]);
+
+		for (i = 0; i < 8; i++)
+			fprintf(stdout,
+				"0x%05X: RT2SR%d      (Recieve T2 Status %d)            0x%08X\n",
+				0x03C40 + (4 * i), i, i, regs_buff[841 + i]);
+
+		for (i = 0; i < 8; i++)
+			fprintf(stdout,
+				"0x%05X: TDTQ2TCCR%d  (Tx Desc TQ2 TC Config %d)        0x%08X\n",
+				0x0602C + (0x40 * i), i, i, regs_buff[849 + i]);
+
+		for (i = 0; i < 8; i++)
+			fprintf(stdout,
+				"0x%05X: TDTQ2TCSR%d  (Tx Desc TQ2 TC Status %d)        0x%08X\n",
+				0x0622C + (0x40 * i), i, i, regs_buff[857 + i]);
+	}
 
 	for (i = 0; i < 8; i++)
 		fprintf(stdout,
@@ -984,43 +989,42 @@ ixgbe_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs)
 		"0x042B0: ANLP2       (Auto Neg Lnk Part. Ctrl Word 2) 0x%08X\n",
 		regs_buff[1069]);
 
-	fprintf(stdout,
-		"0x04800: ATLASCTL    (Atlas Analog Configuration)     0x%08X\n",
-		regs_buff[1070]);
-
-	/* Diagnostic */
-	fprintf(stdout,
-		"0x02C20: RDSTATCTL   (Rx DMA Statistic Control)       0x%08X\n",
-		regs_buff[1071]);
+	if (mac_type == ixgbe_mac_82598EB) {
+		fprintf(stdout,
+			"0x04800: ATLASCTL    (Atlas Analog Configuration)     0x%08X\n",
+			regs_buff[1070]);
 
-	for (i = 0; i < 8; i++)
+		/* Diagnostic */
 		fprintf(stdout,
-		"0x%05X: RDSTAT%d     (Rx DMA Statistics %d)            0x%08X\n",
-		0x02C00 + (4 * i), i, i, regs_buff[1072 + i]);
+			"0x02C20: RDSTATCTL   (Rx DMA Statistic Control)       0x%08X\n",
+			regs_buff[1071]);
 
-	fprintf(stdout,
-		"0x02F08: RDHMPN      (Rx Desc Handler Mem Page num)   0x%08X\n",
-		regs_buff[1080]);
+		for (i = 0; i < 8; i++)
+			fprintf(stdout,
+				"0x%05X: RDSTAT%d     (Rx DMA Statistics %d)            0x%08X\n",
+				0x02C00 + (4 * i), i, i, regs_buff[1072 + i]);
 
-	fprintf(stdout,
-		"0x02F10: RIC_DW0     (Rx Desc Hand. Mem Read Data 0)  0x%08X\n",
-		regs_buff[1081]);
+		fprintf(stdout,
+			"0x02F08: RDHMPN      (Rx Desc Handler Mem Page num)   0x%08X\n",
+			regs_buff[1080]);
 
-	fprintf(stdout,
-		"0x02F14: RIC_DW1     (Rx Desc Hand. Mem Read Data 1)  0x%08X\n",
-		regs_buff[1082]);
+		fprintf(stdout,
+			"0x02F10: RIC_DW0     (Rx Desc Hand. Mem Read Data 0)  0x%08X\n",
+			regs_buff[1081]);
 
-	fprintf(stdout,
-		"0x02F18: RIC_DW2     (Rx Desc Hand. Mem Read Data 2)  0x%08X\n",
-		regs_buff[1083]);
+		fprintf(stdout,
+			"0x02F14: RIC_DW1     (Rx Desc Hand. Mem Read Data 1)  0x%08X\n",
+			regs_buff[1082]);
 
-	fprintf(stdout,
-		"0x02F1C: RIC_DW3     (Rx Desc Hand. Mem Read Data 3)  0x%08X\n",
-		regs_buff[1084]);
+		fprintf(stdout,
+			"0x02F18: RIC_DW2     (Rx Desc Hand. Mem Read Data 2)  0x%08X\n",
+			regs_buff[1083]);
+
+		fprintf(stdout,
+			"0x02F1C: RIC_DW3     (Rx Desc Hand. Mem Read Data 3)  0x%08X\n",
+			regs_buff[1084]);
+	}
 
-	fprintf(stdout,
-		"0x02F20: RDPROBE     (Rx Probe Mode Status)           0x%08X\n",
-		regs_buff[1085]);
 
 	fprintf(stdout,
 		"0x07C20: TDSTATCTL   (Tx DMA Statistic Control)       0x%08X\n",
@@ -1124,17 +1128,19 @@ ixgbe_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs)
 		"0x042CC: MDFTS       (MAC DFT Status)                 0x%08X\n",
 		regs_buff[1124]);
 
-	fprintf(stdout,
-		"0x1106C: PCIEECCCTL  (PCIe ECC Control)               0x%08X\n",
-		regs_buff[1125]);
+	if (mac_type == ixgbe_mac_82598EB) {
+		fprintf(stdout,
+			"0x1106C: PCIEECCCTL  (PCIe ECC Control)               0x%08X\n",
+			regs_buff[1125]);
 
-	fprintf(stdout,
-		"0x0C300: PBTXECC     (Packet Buffer Tx ECC)           0x%08X\n",
-		regs_buff[1126]);
+		fprintf(stdout,
+			"0x0C300: PBTXECC     (Packet Buffer Tx ECC)           0x%08X\n",
+			regs_buff[1126]);
 
-	fprintf(stdout,
-		"0x03300: PBRXECC     (Packet Buffer Rx ECC)           0x%08X\n",
-		regs_buff[1127]);
+		fprintf(stdout,
+			"0x03300: PBRXECC     (Packet Buffer Rx ECC)           0x%08X\n",
+			regs_buff[1127]);
+	}
 
 	return 0;
 }
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [ethtool  2/3] ethtool: don't display some registers on ixgbe X540
  2013-08-28  0:08 [ethtool 1/3] ethtool: fix ixgbe 82598EB only registers Jeff Kirsher
@ 2013-08-28  0:08 ` Jeff Kirsher
  2013-08-28  0:08 ` [ethtool 3/3] ethtool: add ixgbevf support for register dump Jeff Kirsher
  2013-08-29 20:51 ` [ethtool 1/3] ethtool: fix ixgbe 82598EB only registers Ben Hutchings
  2 siblings, 0 replies; 7+ messages in thread
From: Jeff Kirsher @ 2013-08-28  0:08 UTC (permalink / raw
  To: bhutchings; +Cc: Jacob Keller, netdev, gospo, sassmann, Jeff Kirsher

From: Jacob Keller <jacob.e.keller@intel.com>

This patch modifies ixgbe_reg_dump to take into account registers removed in the
ixgbe X540 adapter. This adapter no longer has some of the registers, and thus
returns 0xDEADBEAF for the value. Rather than display this invalid register
value, modify ixgbe_reg_dump to only display these registers on older mac types.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 ixgbe.c | 154 ++++++++++++++++++++++++++++++++++------------------------------
 1 file changed, 82 insertions(+), 72 deletions(-)

diff --git a/ixgbe.c b/ixgbe.c
index 89cb6be..854e463 100644
--- a/ixgbe.c
+++ b/ixgbe.c
@@ -869,41 +869,43 @@ ixgbe_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs)
 		0x06034 + (0x40 * i), i, i, regs_buff[1022 + i]);
 
 	/* MAC */
-	fprintf(stdout,
-		"0x04200: PCS1GCFIG   (PCS_1G Gloabal Config 1)        0x%08X\n",
-		regs_buff[1038]);
+	if (mac_type < ixgbe_mac_X540) {
+		fprintf(stdout,
+			"0x04200: PCS1GCFIG   (PCS_1G Gloabal Config 1)        0x%08X\n",
+			regs_buff[1038]);
 
-	fprintf(stdout,
-		"0x04208: PCS1GLCTL   (PCS_1G Link Control)            0x%08X\n",
-		regs_buff[1039]);
+		fprintf(stdout,
+			"0x04208: PCS1GLCTL   (PCS_1G Link Control)            0x%08X\n",
+			regs_buff[1039]);
 
-	fprintf(stdout,
-		"0x0420C: PCS1GLSTA   (PCS_1G Link Status)             0x%08X\n",
-		regs_buff[1040]);
+		fprintf(stdout,
+			"0x0420C: PCS1GLSTA   (PCS_1G Link Status)             0x%08X\n",
+			regs_buff[1040]);
 
-	fprintf(stdout,
-		"0x04210: PCS1GDBG0   (PCS_1G Debug 0)                 0x%08X\n",
-		regs_buff[1041]);
+		fprintf(stdout,
+			"0x04210: PCS1GDBG0   (PCS_1G Debug 0)                 0x%08X\n",
+			regs_buff[1041]);
 
-	fprintf(stdout,
-		"0x04214: PCS1GDBG1   (PCS_1G Debug 1)                 0x%08X\n",
-		regs_buff[1042]);
+		fprintf(stdout,
+			"0x04214: PCS1GDBG1   (PCS_1G Debug 1)                 0x%08X\n",
+			regs_buff[1042]);
 
-	fprintf(stdout,
-		"0x04218: PCS1GANA    (PCS-1G Auto Neg. Adv.)          0x%08X\n",
-		regs_buff[1043]);
+		fprintf(stdout,
+			"0x04218: PCS1GANA    (PCS-1G Auto Neg. Adv.)          0x%08X\n",
+			regs_buff[1043]);
 
-	fprintf(stdout,
-		"0x0421C: PCS1GANLP   (PCS-1G AN LP Ability)           0x%08X\n",
-		regs_buff[1044]);
+		fprintf(stdout,
+			"0x0421C: PCS1GANLP   (PCS-1G AN LP Ability)           0x%08X\n",
+			regs_buff[1044]);
 
-	fprintf(stdout,
-		"0x04220: PCS1GANNP   (PCS_1G Auto Neg Next Page Tx)   0x%08X\n",
-		regs_buff[1045]);
+		fprintf(stdout,
+			"0x04220: PCS1GANNP   (PCS_1G Auto Neg Next Page Tx)   0x%08X\n",
+			regs_buff[1045]);
 
-	fprintf(stdout,
-		"0x04224: PCS1GANLPNP (PCS_1G Auto Neg LPs Next Page)  0x%08X\n",
-		regs_buff[1046]);
+		fprintf(stdout,
+			"0x04224: PCS1GANLPNP (PCS_1G Auto Neg LPs Next Page)  0x%08X\n",
+			regs_buff[1046]);
+	}
 
 	fprintf(stdout,
 		"0x04244: HLREG1      (Highlander Status 1)            0x%08X\n",
@@ -949,45 +951,47 @@ ixgbe_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs)
 		"0x0426C: TREG        (Test Register)                  0x%08X\n",
 		regs_buff[1058]);
 
-	fprintf(stdout,
-		"0x04288: PCSS1       (XGXS Status 1)                  0x%08X\n",
-		regs_buff[1059]);
+	if (mac_type < ixgbe_mac_X540) {
+		fprintf(stdout,
+			"0x04288: PCSS1       (XGXS Status 1)                  0x%08X\n",
+			regs_buff[1059]);
 
-	fprintf(stdout,
-		"0x0428C: PCSS2       (XGXS Status 2)                  0x%08X\n",
-		regs_buff[1060]);
+		fprintf(stdout,
+			"0x0428C: PCSS2       (XGXS Status 2)                  0x%08X\n",
+			regs_buff[1060]);
 
-	fprintf(stdout,
-		"0x04290: XPCSS       (10GBASE-X PCS Status)           0x%08X\n",
-		regs_buff[1061]);
+		fprintf(stdout,
+			"0x04290: XPCSS       (10GBASE-X PCS Status)           0x%08X\n",
+			regs_buff[1061]);
 
-	fprintf(stdout,
-		"0x04298: SERDESC     (SERDES Interface Control)       0x%08X\n",
-		regs_buff[1062]);
+		fprintf(stdout,
+			"0x04298: SERDESC     (SERDES Interface Control)       0x%08X\n",
+			regs_buff[1062]);
 
-	fprintf(stdout,
-		"0x0429C: MACS        (FIFO Status/CNTL Report)        0x%08X\n",
-		regs_buff[1063]);
+		fprintf(stdout,
+			"0x0429C: MACS        (FIFO Status/CNTL Report)        0x%08X\n",
+			regs_buff[1063]);
 
-	fprintf(stdout,
-		"0x042A0: AUTOC       (Auto Negotiation Control)       0x%08X\n",
-		regs_buff[1064]);
+		fprintf(stdout,
+			"0x042A0: AUTOC       (Auto Negotiation Control)       0x%08X\n",
+			regs_buff[1064]);
 
-	fprintf(stdout,
-		"0x042A8: AUTOC2      (Auto Negotiation Control 2)     0x%08X\n",
-		regs_buff[1066]);
+		fprintf(stdout,
+			"0x042A8: AUTOC2      (Auto Negotiation Control 2)     0x%08X\n",
+			regs_buff[1066]);
 
-	fprintf(stdout,
-		"0x042AC: AUTOC3      (Auto Negotiation Control 3)     0x%08X\n",
-		regs_buff[1067]);
+		fprintf(stdout,
+			"0x042AC: AUTOC3      (Auto Negotiation Control 3)     0x%08X\n",
+			regs_buff[1067]);
 
-	fprintf(stdout,
-		"0x042B0: ANLP1       (Auto Neg Lnk Part. Ctrl Word 1) 0x%08X\n",
-		regs_buff[1068]);
+		fprintf(stdout,
+			"0x042B0: ANLP1       (Auto Neg Lnk Part. Ctrl Word 1) 0x%08X\n",
+			regs_buff[1068]);
 
-	fprintf(stdout,
-		"0x042B0: ANLP2       (Auto Neg Lnk Part. Ctrl Word 2) 0x%08X\n",
-		regs_buff[1069]);
+		fprintf(stdout,
+			"0x042B0: ANLP2       (Auto Neg Lnk Part. Ctrl Word 2) 0x%08X\n",
+			regs_buff[1069]);
+	}
 
 	if (mac_type == ixgbe_mac_82598EB) {
 		fprintf(stdout,
@@ -1025,6 +1029,10 @@ ixgbe_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs)
 			regs_buff[1084]);
 	}
 
+	if (mac_type < ixgbe_mac_X540)
+		fprintf(stdout,
+			"0x02F20: RDPROBE     (Rx Probe Mode Status)           0x%08X\n",
+			regs_buff[1085]);
 
 	fprintf(stdout,
 		"0x07C20: TDSTATCTL   (Tx DMA Statistic Control)       0x%08X\n",
@@ -1108,25 +1116,27 @@ ixgbe_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs)
 		"0x050A4: RFVAL       (Receive Filter Validation)      0x%08X\n",
 		regs_buff[1119]);
 
-	fprintf(stdout,
-		"0x042B8: MDFTC1      (MAC DFT Control 1)              0x%08X\n",
-		regs_buff[1120]);
+	if (mac_type < ixgbe_mac_X540) {
+		fprintf(stdout,
+			"0x042B8: MDFTC1      (MAC DFT Control 1)              0x%08X\n",
+			regs_buff[1120]);
 
-	fprintf(stdout,
-		"0x042C0: MDFTC2      (MAC DFT Control 2)              0x%08X\n",
-		regs_buff[1121]);
+		fprintf(stdout,
+			"0x042C0: MDFTC2      (MAC DFT Control 2)              0x%08X\n",
+			regs_buff[1121]);
 
-	fprintf(stdout,
-		"0x042C4: MDFTFIFO1   (MAC DFT FIFO 1)                 0x%08X\n",
-		regs_buff[1122]);
+		fprintf(stdout,
+			"0x042C4: MDFTFIFO1   (MAC DFT FIFO 1)                 0x%08X\n",
+			regs_buff[1122]);
 
-	fprintf(stdout,
-		"0x042C8: MDFTFIFO2   (MAC DFT FIFO 2)                 0x%08X\n",
-		regs_buff[1123]);
+		fprintf(stdout,
+			"0x042C8: MDFTFIFO2   (MAC DFT FIFO 2)                 0x%08X\n",
+			regs_buff[1123]);
 
-	fprintf(stdout,
-		"0x042CC: MDFTS       (MAC DFT Status)                 0x%08X\n",
-		regs_buff[1124]);
+		fprintf(stdout,
+			"0x042CC: MDFTS       (MAC DFT Status)                 0x%08X\n",
+			regs_buff[1124]);
+	}
 
 	if (mac_type == ixgbe_mac_82598EB) {
 		fprintf(stdout,
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [ethtool  3/3] ethtool: add ixgbevf support for register dump
  2013-08-28  0:08 [ethtool 1/3] ethtool: fix ixgbe 82598EB only registers Jeff Kirsher
  2013-08-28  0:08 ` [ethtool 2/3] ethtool: don't display some registers on ixgbe X540 Jeff Kirsher
@ 2013-08-28  0:08 ` Jeff Kirsher
  2013-08-29 20:57   ` Ben Hutchings
  2013-08-29 20:51 ` [ethtool 1/3] ethtool: fix ixgbe 82598EB only registers Ben Hutchings
  2 siblings, 1 reply; 7+ messages in thread
From: Jeff Kirsher @ 2013-08-28  0:08 UTC (permalink / raw
  To: bhutchings; +Cc: Jacob Keller, netdev, gospo, sassmann, Jeff Kirsher

From: Jacob Keller <jacob.e.keller@intel.com>

This patch adds support for the ixgbevf driver, which previously was printing
out as hex dump, and in the driver via printk. This patch corrects the
implementation to have a new ixgbevf_reg_dump function that will format the
register output in a more human readable format.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 Makefile.am |   2 +-
 ethtool.c   |   1 +
 internal.h  |   2 +
 ixgbevf.c   | 180 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 184 insertions(+), 1 deletion(-)
 create mode 100644 ixgbevf.c

diff --git a/Makefile.am b/Makefile.am
index ba1faa6..db89d94 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -10,7 +10,7 @@ ethtool_SOURCES = ethtool.c ethtool-copy.h internal.h net_tstamp-copy.h \
 		  fec_8xx.c ibm_emac.c ixgb.c ixgbe.c natsemi.c	\
 		  pcnet32.c realtek.c tg3.c marvell.c vioc.c	\
 		  smsc911x.c at76c50x-usb.c sfc.c stmmac.c	\
-		  rxclass.c sfpid.c sfpdiag.c
+		  rxclass.c sfpid.c sfpdiag.c ixgbevf.c
 
 TESTS = test-cmdline test-features
 check_PROGRAMS = test-cmdline test-features
diff --git a/ethtool.c b/ethtool.c
index 3544f0e..dcdc0a9 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -875,6 +875,7 @@ static const struct {
 	{ "igb", igb_dump_regs },
 	{ "ixgb", ixgb_dump_regs },
 	{ "ixgbe", ixgbe_dump_regs },
+	{ "ixgbevf", ixgbevf_dump_regs },
 	{ "natsemi", natsemi_dump_regs },
 	{ "e100", e100_dump_regs },
 	{ "amd8111e", amd8111e_dump_regs },
diff --git a/internal.h b/internal.h
index e977a81..86a64f2 100644
--- a/internal.h
+++ b/internal.h
@@ -213,6 +213,8 @@ int ixgb_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs);
 
 int ixgbe_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs);
 
+int ixgbevf_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs);
+
 /* Broadcom Tigon3 Ethernet controller */
 int tg3_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs);
 
diff --git a/ixgbevf.c b/ixgbevf.c
new file mode 100644
index 0000000..dae1178
--- /dev/null
+++ b/ixgbevf.c
@@ -0,0 +1,180 @@
+/* Copyright (c) 2007 Intel Corporation */
+#include <stdio.h>
+#include "internal.h"
+
+int
+ixgbevf_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs)
+{
+	u32 *regs_buff = (u32 *)regs->data;
+	u8 version = (u8)(regs->version >> 24);
+	u8 i;
+
+	if (version == 0)
+		return -1;
+
+	fprintf(stdout,
+		"0x00000: VFCTRL      (VF Control Register) (Write Only) N/A\n");
+
+	fprintf(stdout,
+		"0x00008: VFSTATUS    (VF Status Register)               0x%08X\n",
+		regs_buff[1]);
+
+	fprintf(stdout,
+		"0x00010: VFLINKS     (VF Link Status Register)          0x%08X\n",
+		regs_buff[2]);
+
+	fprintf(stdout,
+		"0x03190: VFRXMEMWRAP (Rx Packet Buffer Flush Detect)    0x%08X\n",
+		regs_buff[3]);
+
+	fprintf(stdout,
+		"0x00048: VFFRTIMER   (VF Free Running Timer)            0x%08X\n",
+		regs_buff[4]);
+
+	fprintf(stdout,
+		"0x00100: VFEICR      (VF Extended Interrupt Cause)      0x%08X\n",
+		regs_buff[5]);
+
+	fprintf(stdout,
+		"0x00104: VFEICS      (VF Extended Interrupt Cause Set)  0x%08X\n",
+		regs_buff[6]);
+
+	fprintf(stdout,
+		"0x00108: VFEIMS      (VF Extended Interrupt Mask Set)   0x%08X\n",
+		regs_buff[7]);
+
+	fprintf(stdout,
+		"0x0010C: VFEIMC      (VF Extended Interrupt Mask Clear) 0x%08X\n",
+		regs_buff[8]);
+
+	fprintf(stdout,
+		"0x00110: VFEIAC      (VF Extended Interrupt Auto Clear) 0x%08X\n",
+		regs_buff[9]);
+
+	fprintf(stdout,
+		"0x00114: VFEIAM      (VF Extended Interrupt Auto Mask)  0x%08X\n",
+		regs_buff[10]);
+
+	fprintf(stdout,
+		"0x00820: VFEITR(0)   (VF Extended Interrupt Throttle)   0x%08X\n",
+		regs_buff[11]);
+
+	fprintf(stdout,
+		"0x00120: VFIVAR(0)   (VF Interrupt Vector Allocation)   0x%08X\n",
+		regs_buff[12]);
+
+	fprintf(stdout,
+		"0x00140: VFIVAR_MISC (VF Interrupt Vector Misc)         0x%08X\n",
+		regs_buff[13]);
+
+	fprintf(stdout,
+		"0x00104: VFPSRTYPE   (VF Replication Packet Split Type) 0x%08X\n",
+		regs_buff[28]);
+
+	for (i = 0; i < 2; i++)
+		fprintf(stdout,
+			"0x%05x: VFRDBAL(%d)  (VF Rx Desc. Base Addr Low %d)      0x%08X\n",
+			0x1000 + 0x40*i,
+			i, i,
+			regs_buff[14+i]);
+
+	for (i = 0; i < 2; i++)
+		fprintf(stdout,
+			"0x%05x: VFRDBAH(%d)  (VF Rx Desc. Base Addr High %d)     0x%08X\n",
+			0x1004 + 0x40*i,
+			i, i,
+			regs_buff[16+i]);
+
+	for (i = 0; i < 2; i++)
+		fprintf(stdout,
+			"0x%05x: VFRDLEN(%d)  (VF Rx Desc. Length %d)             0x%08X\n",
+			0x1008 + 0x40*i,
+			i, i,
+			regs_buff[18+i]);
+
+	for (i = 0; i < 2; i++)
+		fprintf(stdout,
+			"0x%05x: VFRDH(%d)    (VF Rx Desc. Head %d)               0x%08X\n",
+			0x1010 + 0x40*i,
+			i, i,
+			regs_buff[20+i]);
+
+	for (i = 0; i < 2; i++)
+		fprintf(stdout,
+			"0x%05x: VFRDT(%d)    (VF Rx Desc. Tail %d)               0x%08X\n",
+			0x1018 + 0x40*i,
+			i, i,
+			regs_buff[22+i]);
+
+	for (i = 0; i < 2; i++)
+		fprintf(stdout,
+			"0x%05x: VFRDT(%d)    (VF Rx Desc. Control %d),           0x%08X\n",
+			0x1028 + 0x40*i,
+			i, i,
+			regs_buff[24+i]);
+
+	for (i = 0; i < 2; i++)
+		fprintf(stdout,
+			"0x%05x: VFSRRCTL(%d) (VF Split Rx Control %d)            0x%08X\n",
+			0x1014 + 0x40*i,
+			i, i,
+			regs_buff[26+i]);
+
+	for (i = 0; i < 2; i++)
+		fprintf(stdout,
+			"0x%05x: VFTDBAL(%d)  (VF Tx Desc. Base Addr Low %d)      0x%08X\n",
+			0x2000 + 0x40*i,
+			i, i,
+			regs_buff[29+i]);
+
+	for (i = 0; i < 2; i++)
+		fprintf(stdout,
+			"0x%05x: VFTDBAH(%d)  (VF Tx Desc. Base Addr High %d)     0x%08X\n",
+			0x2004 + 0x40*i,
+			i, i,
+			regs_buff[31+i]);
+
+	for (i = 0; i < 2; i++)
+		fprintf(stdout,
+			"0x%05x: VFTDLEN(%d)  (VF Tx Desc. Length %d)             0x%08X\n",
+			0x2008 + 0x40*i,
+			i, i,
+			regs_buff[33+i]);
+
+	for (i = 0; i < 2; i++)
+		fprintf(stdout,
+			"0x%05x: VFTDH(%d)    (VF Tx Desc. Head %d)               0x%08X\n",
+			0x2010 + 0x40*i,
+			i, i,
+			regs_buff[35+i]);
+
+	for (i = 0; i < 2; i++)
+		fprintf(stdout,
+			"0x%05x: VFTDT(%d)    (VF Tx Desc. Tail %d)               0x%08X\n",
+			0x2018 + 0x40*i,
+			i, i,
+			regs_buff[37+i]);
+
+	for (i = 0; i < 2; i++)
+		fprintf(stdout,
+			"0x%05x: VFTDT(%d)    (VF Tx Desc. Control %d)            0x%08X\n",
+			0x2028 + 0x40*i,
+			i, i,
+			regs_buff[39+i]);
+
+	for (i = 0; i < 2; i++)
+		fprintf(stdout,
+			"0x%05x: VFTDWBAL(%d) (VF Tx Desc. Write Back Addr Lo %d) 0x%08X\n",
+			0x2038 + 0x40*i,
+			i, i,
+			regs_buff[41+i]);
+
+	for (i = 0; i < 2; i++)
+		fprintf(stdout,
+			"0x%05x: VFTDWBAH(%d) (VF Tx Desc. Write Back Addr Hi %d) 0x%08X\n",
+			0x203C + 0x40*i,
+			i, i,
+			regs_buff[43+i]);
+
+	return 0;
+}
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [ethtool 1/3] ethtool: fix ixgbe 82598EB only registers
  2013-08-28  0:08 [ethtool 1/3] ethtool: fix ixgbe 82598EB only registers Jeff Kirsher
  2013-08-28  0:08 ` [ethtool 2/3] ethtool: don't display some registers on ixgbe X540 Jeff Kirsher
  2013-08-28  0:08 ` [ethtool 3/3] ethtool: add ixgbevf support for register dump Jeff Kirsher
@ 2013-08-29 20:51 ` Ben Hutchings
  2013-09-12 15:45   ` Ben Hutchings
  2 siblings, 1 reply; 7+ messages in thread
From: Ben Hutchings @ 2013-08-29 20:51 UTC (permalink / raw
  To: Jeff Kirsher; +Cc: Jacob Keller, netdev, gospo, sassmann

On Tue, 2013-08-27 at 17:08 -0700, Jeff Kirsher wrote:
> From: Jacob Keller <jacob.e.keller@intel.com>
> 
> This patch fixes ixgbe_reg_dump to only display registers specific to the
> 82598EB part, as these registers display 0xDEADBEEF otherwise, and clutter up
> the register dump.
> 
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> ---
>  ixgbe.c | 144 +++++++++++++++++++++++++++++++++-------------------------------
>  1 file changed, 75 insertions(+), 69 deletions(-)
> 
> diff --git a/ixgbe.c b/ixgbe.c
> index 9b005f2..89cb6be 100644
> --- a/ixgbe.c
> +++ b/ixgbe.c
[...]
> -	fprintf(stdout,
> -		"0x02F20: RDPROBE     (Rx Probe Mode Status)           0x%08X\n",
> -		regs_buff[1085]);
[...]

It looks like this removal really belongs to the next patch, which adds
it back with the mac_type < ixgbe_mac_X540 condition.

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ethtool  3/3] ethtool: add ixgbevf support for register dump
  2013-08-28  0:08 ` [ethtool 3/3] ethtool: add ixgbevf support for register dump Jeff Kirsher
@ 2013-08-29 20:57   ` Ben Hutchings
  0 siblings, 0 replies; 7+ messages in thread
From: Ben Hutchings @ 2013-08-29 20:57 UTC (permalink / raw
  To: Jeff Kirsher; +Cc: Jacob Keller, netdev, gospo, sassmann

On Tue, 2013-08-27 at 17:08 -0700, Jeff Kirsher wrote:
> From: Jacob Keller <jacob.e.keller@intel.com>
> 
> This patch adds support for the ixgbevf driver, which previously was printing
> out as hex dump, and in the driver via printk. This patch corrects the
> implementation to have a new ixgbevf_reg_dump function that will format the
> register output in a more human readable format.
> 
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Tested-by: Stephen Ko <stephen.s.ko@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

Applied, but:

[...]
> --- /dev/null
> +++ b/ixgbevf.c
> @@ -0,0 +1,180 @@
> +/* Copyright (c) 2007 Intel Corporation */
[...]

I'm not sure whether to believe this date...

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ethtool 1/3] ethtool: fix ixgbe 82598EB only registers
  2013-08-29 20:51 ` [ethtool 1/3] ethtool: fix ixgbe 82598EB only registers Ben Hutchings
@ 2013-09-12 15:45   ` Ben Hutchings
  2013-09-12 16:33     ` Keller, Jacob E
  0 siblings, 1 reply; 7+ messages in thread
From: Ben Hutchings @ 2013-09-12 15:45 UTC (permalink / raw
  To: Jeff Kirsher; +Cc: Jacob Keller, netdev, gospo, sassmann

On Thu, 2013-08-29 at 21:51 +0100, Ben Hutchings wrote:
> On Tue, 2013-08-27 at 17:08 -0700, Jeff Kirsher wrote:
> > From: Jacob Keller <jacob.e.keller@intel.com>
> > 
> > This patch fixes ixgbe_reg_dump to only display registers specific to the
> > 82598EB part, as these registers display 0xDEADBEEF otherwise, and clutter up
> > the register dump.
> > 
> > Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> > Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
> > Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> > ---
> >  ixgbe.c | 144 +++++++++++++++++++++++++++++++++-------------------------------
> >  1 file changed, 75 insertions(+), 69 deletions(-)
> > 
> > diff --git a/ixgbe.c b/ixgbe.c
> > index 9b005f2..89cb6be 100644
> > --- a/ixgbe.c
> > +++ b/ixgbe.c
> [...]
> > -	fprintf(stdout,
> > -		"0x02F20: RDPROBE     (Rx Probe Mode Status)           0x%08X\n",
> > -		regs_buff[1085]);
> [...]
> 
> It looks like this removal really belongs to the next patch, which adds
> it back with the mac_type < ixgbe_mac_X540 condition.

Well, I've applied the two patches with this bit fixed up.

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ethtool 1/3] ethtool: fix ixgbe 82598EB only registers
  2013-09-12 15:45   ` Ben Hutchings
@ 2013-09-12 16:33     ` Keller, Jacob E
  0 siblings, 0 replies; 7+ messages in thread
From: Keller, Jacob E @ 2013-09-12 16:33 UTC (permalink / raw
  To: Ben Hutchings
  Cc: Kirsher, Jeffrey T, netdev@vger.kernel.org, gospo@redhat.com,
	sassmann@redhat.com

On Thu, 2013-09-12 at 16:45 +0100, Ben Hutchings wrote:
> On Thu, 2013-08-29 at 21:51 +0100, Ben Hutchings wrote:
> > On Tue, 2013-08-27 at 17:08 -0700, Jeff Kirsher wrote:
> > > From: Jacob Keller <jacob.e.keller@intel.com>
> > > 
> > > This patch fixes ixgbe_reg_dump to only display registers specific to the
> > > 82598EB part, as these registers display 0xDEADBEEF otherwise, and clutter up
> > > the register dump.
> > > 
> > > Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> > > Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
> > > Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> > > ---
> > >  ixgbe.c | 144 +++++++++++++++++++++++++++++++++-------------------------------
> > >  1 file changed, 75 insertions(+), 69 deletions(-)
> > > 
> > > diff --git a/ixgbe.c b/ixgbe.c
> > > index 9b005f2..89cb6be 100644
> > > --- a/ixgbe.c
> > > +++ b/ixgbe.c
> > [...]
> > > -	fprintf(stdout,
> > > -		"0x02F20: RDPROBE     (Rx Probe Mode Status)           0x%08X\n",
> > > -		regs_buff[1085]);
> > [...]
> > 
> > It looks like this removal really belongs to the next patch, which adds
> > it back with the mac_type < ixgbe_mac_X540 condition.
> 
> Well, I've applied the two patches with this bit fixed up.
> 
> Ben.
> 

Thanks, Ben.

Regards,
Jake

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-09-12 16:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-28  0:08 [ethtool 1/3] ethtool: fix ixgbe 82598EB only registers Jeff Kirsher
2013-08-28  0:08 ` [ethtool 2/3] ethtool: don't display some registers on ixgbe X540 Jeff Kirsher
2013-08-28  0:08 ` [ethtool 3/3] ethtool: add ixgbevf support for register dump Jeff Kirsher
2013-08-29 20:57   ` Ben Hutchings
2013-08-29 20:51 ` [ethtool 1/3] ethtool: fix ixgbe 82598EB only registers Ben Hutchings
2013-09-12 15:45   ` Ben Hutchings
2013-09-12 16:33     ` Keller, Jacob E

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.