Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752066AbbEIWQc (ORCPT ); Sat, 9 May 2015 18:16:32 -0400 Received: from mail-wi0-f173.google.com ([209.85.212.173]:32852 "EHLO mail-wi0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751165AbbEIWQa (ORCPT ); Sat, 9 May 2015 18:16:30 -0400 Message-ID: <554E8735.302@gmail.com> Date: Sun, 10 May 2015 00:16:21 +0200 From: Philippe Reynes User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.5) Gecko/20120623 Thunderbird/10.0.5 MIME-Version: 1.0 To: Fabio Estevam CC: Russell King - ARM Linux , "David S. Miller" , Duan Fugang-B38611 , Frank Li , =?UTF-8?B?TG90aGFyIFdhw59tYW5u?= , "netdev@vger.kernel.org" , linux-kernel Subject: Re: [PATCH] net: fec: add support of ethtool get_regs References: <1431204728-16754-1-git-send-email-tremyfr@gmail.com> <20150509211746.GY2067@n2100.arm.linux.org.uk> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 882 Lines: 29 Hi Fabio, On 09/05/15 23:59, Fabio Estevam wrote: > Philippe, > > On Sat, May 9, 2015 at 6:17 PM, Russell King - ARM Linux > wrote: > >> Using memcpy_fromio() to copy device registers is not a good idea - >> it can use a variable access size which can cause bus faults. > > An example on how memcpy_fromio() can be avoided in get_regs: > drivers/net/ethernet/samsung/sxgbe/sxgbe_ethtool.c Thanks for pointing me this example. I've already send a patch, and I've used drivers/net/ethernet/freescale/gianfar_ethtool.c as example. I hope it's a good example too. > Regards, > > Fabio Estevam Regards, Philippe -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/