lkml.org 
[lkml]   [2015]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] net: fec: add support of ethtool get_regs
On Sat, May 09, 2015 at 10:52:08PM +0200, Philippe Reynes wrote:
> +static void fec_enet_get_regs(struct net_device *ndev,
> + struct ethtool_regs *regs, void *regbuf)
> +{
> + struct fec_enet_private *fep = netdev_priv(ndev);
> +
> + memcpy_fromio(regbuf, fep->hwp, regs->len);

Using memcpy_fromio() to copy device registers is not a good idea -
it can use a variable access size which can cause bus faults.

--
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.


\
 
 \ /
  Last update: 2015-05-09 23:21    [W:0.056 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site