Patchwork [net-next-2.6,4/8] vxge: Fixed "ethtool -d" prints.

login
register
mail settings
Submitter Sreenivasa Honnur
Date March 29, 2010, 8:10 a.m.
Message ID <Pine.GSO.4.10.11003290409530.4435-100000@guinness>
Download mbox | patch
Permalink /patch/48815/
State Accepted
Delegated to: David Miller
Headers show

Comments

Sreenivasa Honnur - March 29, 2010, 8:10 a.m.
- Fixed "ethtool -d" prints
- reg_space pointer was getting over written, updating it correctly.

Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
---

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - March 29, 2010, 11:59 p.m.
From: Sreenivasa Honnur <Sreenivasa.Honnur@neterion.com>
Date: Mon, 29 Mar 2010 04:10:33 -0400 (EDT)

> - Fixed "ethtool -d" prints
> - reg_space pointer was getting over written, updating it correctly.
> 
> Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff -urpN patch3/drivers/net/vxge/vxge-ethtool.c patch4/drivers/net/vxge/vxge-ethtool.c
--- patch3/drivers/net/vxge/vxge-ethtool.c	2010-03-19 16:17:46.000000000 +0530
+++ patch4/drivers/net/vxge/vxge-ethtool.c	2010-03-19 16:22:15.000000000 +0530
@@ -108,7 +108,7 @@  static void vxge_ethtool_gregs(struct ne
 	int index, offset;
 	enum vxge_hw_status status;
 	u64 reg;
-	u8 *reg_space = (u8 *) space;
+	u64 *reg_space = (u64 *) space;
 	struct vxgedev *vdev = (struct vxgedev *)netdev_priv(dev);
 	struct __vxge_hw_device  *hldev = (struct __vxge_hw_device *)
 					pci_get_drvdata(vdev->pdev);
@@ -128,8 +128,7 @@  static void vxge_ethtool_gregs(struct ne
 						__func__, __LINE__);
 				return;
 			}
-
-			memcpy((reg_space + offset), &reg, 8);
+			*reg_space++ = reg;
 		}
 	}
 }