netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Philippe Reynes <tremyfr@gmail.com>
Cc: davem@davemloft.net, B38611@freescale.com,
	Frank.Li@freescale.com, LW@KARO-electronics.de,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: fec: add support of ethtool get_regs
Date: Sat, 9 May 2015 22:17:46 +0100	[thread overview]
Message-ID: <20150509211746.GY2067@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1431204728-16754-1-git-send-email-tremyfr@gmail.com>

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.

  reply	other threads:[~2015-05-09 21:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-09 20:52 [PATCH] net: fec: add support of ethtool get_regs Philippe Reynes
2015-05-09 21:17 ` Russell King - ARM Linux [this message]
2015-05-09 21:31   ` David Miller
2015-05-09 21:59   ` Fabio Estevam
2015-05-09 22:16     ` Philippe Reynes
2015-05-10  1:01       ` David Miller
2015-05-10 21:43         ` Philippe Reynes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150509211746.GY2067@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=B38611@freescale.com \
    --cc=Frank.Li@freescale.com \
    --cc=LW@KARO-electronics.de \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tremyfr@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).