diff mbox

[ethtool] ethtool: Correct register dump offsets for Intel 82575 chipsets.

Message ID 1324636371-5402-1-git-send-email-jeffrey.t.kirsher@intel.com
State Not Applicable, archived
Delegated to: David Miller
Headers show

Commit Message

Kirsher, Jeffrey T Dec. 23, 2011, 10:32 a.m. UTC
From: Matthew Vick <matthew.vick@intel.com>

When support was added to dump the registers on 82575 chipset devices,
six register offsets (receive/transmit desc length, head, and tail)
were incorrectly mapped. This patch remaps the offsets to the correct
registers.

Signed-off-by: Matthew Vick <matthew.vick@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 igb.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

Comments

Kirsher, Jeffrey T Jan. 12, 2012, 1:11 p.m. UTC | #1
On Fri, 2011-12-23 at 02:32 -0800, Kirsher, Jeffrey T wrote:
> From: Matthew Vick <matthew.vick@intel.com>
> 
> When support was added to dump the registers on 82575 chipset devices,
> six register offsets (receive/transmit desc length, head, and tail)
> were incorrectly mapped. This patch remaps the offsets to the correct
> registers.
> 
> Signed-off-by: Matthew Vick <matthew.vick@intel.com>
> Tested-by: Aaron Brown <aaron.f.brown@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> ---
>  igb.c |   12 ++++++------
>  1 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/igb.c b/igb.c
> index ec35d36..e0ccef9 100644
> --- a/igb.c
> +++ b/igb.c
> @@ -200,13 +200,13 @@ igb_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs)
>         /* Receive descriptor registers */
>         fprintf(stdout,
>                 "0x02808: RDLEN  (Receive desc length)                 0x%08X\n",
> -               regs_buff[142]);
> +               regs_buff[137]);
>         fprintf(stdout,
>                 "0x02810: RDH    (Receive desc head)                   0x%08X\n",
> -               regs_buff[146]);
> +               regs_buff[141]);
>         fprintf(stdout,
>                 "0x02818: RDT    (Receive desc tail)                   0x%08X\n",
> -               regs_buff[150]);
> +               regs_buff[145]);
> 
>         /* Transmit control register */
>         reg = regs_buff[38];
> @@ -226,13 +226,13 @@ igb_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs)
>         /* Transmit descriptor registers */
>         fprintf(stdout,
>                 "0x03808: TDLEN       (Transmit desc length)           0x%08X\n",
> -               regs_buff[214]);
> +               regs_buff[219]);
>         fprintf(stdout,
>                 "0x03810: TDH         (Transmit desc head)             0x%08X\n",
> -               regs_buff[218]);
> +               regs_buff[223]);
>         fprintf(stdout,
>                 "0x03818: TDT         (Transmit desc tail)             0x%08X\n",
> -               regs_buff[222]);
> +               regs_buff[227]);
> 
> 
>         fprintf(stdout,
> --
> 1.7.7.4
> 

Ben, what is the status of this patch?
Ben Hutchings Jan. 12, 2012, 2:08 p.m. UTC | #2
On Thu, 2012-01-12 at 05:11 -0800, Jeff Kirsher wrote:
> On Fri, 2011-12-23 at 02:32 -0800, Kirsher, Jeffrey T wrote:
> > From: Matthew Vick <matthew.vick@intel.com>
> > 
> > When support was added to dump the registers on 82575 chipset devices,
> > six register offsets (receive/transmit desc length, head, and tail)
> > were incorrectly mapped. This patch remaps the offsets to the correct
> > registers.
[...]
> Ben, what is the status of this patch?

The status is 'arrived just as I went on vacation, and forgotten'.

I'll be sure to apply this before releasing ethtool 3.2.

Ben.
Kirsher, Jeffrey T Jan. 12, 2012, 2:35 p.m. UTC | #3
On Thu, 2012-01-12 at 14:08 +0000, Ben Hutchings wrote:
> On Thu, 2012-01-12 at 05:11 -0800, Jeff Kirsher wrote:
> > On Fri, 2011-12-23 at 02:32 -0800, Kirsher, Jeffrey T wrote:
> > > From: Matthew Vick <matthew.vick@intel.com>
> > > 
> > > When support was added to dump the registers on 82575 chipset devices,
> > > six register offsets (receive/transmit desc length, head, and tail)
> > > were incorrectly mapped. This patch remaps the offsets to the correct
> > > registers.
> [...]
> > Ben, what is the status of this patch?
> 
> The status is 'arrived just as I went on vacation, and forgotten'.

:)

> 
> I'll be sure to apply this before releasing ethtool 3.2.

Thanks Ben!
diff mbox

Patch

diff --git a/igb.c b/igb.c
index ec35d36..e0ccef9 100644
--- a/igb.c
+++ b/igb.c
@@ -200,13 +200,13 @@  igb_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs)
 	/* Receive descriptor registers */
 	fprintf(stdout,
 		"0x02808: RDLEN  (Receive desc length)                 0x%08X\n",
-		regs_buff[142]);
+		regs_buff[137]);
 	fprintf(stdout,
 		"0x02810: RDH    (Receive desc head)                   0x%08X\n",
-		regs_buff[146]);
+		regs_buff[141]);
 	fprintf(stdout,
 		"0x02818: RDT    (Receive desc tail)                   0x%08X\n",
-		regs_buff[150]);
+		regs_buff[145]);
 
 	/* Transmit control register */
 	reg = regs_buff[38];
@@ -226,13 +226,13 @@  igb_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs)
 	/* Transmit descriptor registers */
 	fprintf(stdout,
 		"0x03808: TDLEN       (Transmit desc length)           0x%08X\n",
-		regs_buff[214]);
+		regs_buff[219]);
 	fprintf(stdout,
 		"0x03810: TDH         (Transmit desc head)             0x%08X\n",
-		regs_buff[218]);
+		regs_buff[223]);
 	fprintf(stdout,
 		"0x03818: TDT         (Transmit desc tail)             0x%08X\n",
-		regs_buff[222]);
+		regs_buff[227]);
 
 
 	fprintf(stdout,