vxge: Fixed "ethtool -d" prints.
authorSreenivasa Honnur <Sreenivasa.Honnur@neterion.com>
Sun, 28 Mar 2010 22:10:33 +0000 (22:10 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 29 Mar 2010 23:57:22 +0000 (16:57 -0700)
- 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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vxge/vxge-ethtool.c

index c6736b9726352b07044693af19c7d4545b249500..6faa39e9d7a605ca8c555e64c96e06e0a531f790 100644 (file)
@@ -108,7 +108,7 @@ static void vxge_ethtool_gregs(struct net_device *dev,
        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 net_device *dev,
                                                __func__, __LINE__);
                                return;
                        }
-
-                       memcpy((reg_space + offset), &reg, 8);
+                       *reg_space++ = reg;
                }
        }
 }