All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: Hans-Christian Egtvedt <egtvedt@samfundet.no>,
	Ben Dooks <ben.dooks@codethink.co.uk>
Cc: <linux-kernel@lists.codethink.co.uk>,
	Linux Networking List <netdev@vger.kernel.org>,
	Arun Chandran <achandran@mvista.com>,
	"Haavard Skinnemoen" <hskinnemoen@gmail.com>,
	Linux Kernel List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] net: macb: fix endian code for avr32
Date: Wed, 18 Mar 2015 13:27:15 +0100	[thread overview]
Message-ID: <55096F23.10302@atmel.com> (raw)
In-Reply-To: <20150318122538.GA19497@samfundet.no>

Le 18/03/2015 13:25, Hans-Christian Egtvedt a écrit :
> Around Wed 18 Mar 2015 10:57:27 +0000 or thereabout, Ben Dooks wrote:
>> [note this has yet to be compile tested on avr32]
>>
> 
> Compiles fine without warnings.
> 
>> The changes to run the macb driver in 29af05aeb98e ("net: macb:
>> Add big endian CPU support") to support big endian operation on
>> ARM may not work on AVR32 which already is naturally big endian
>> architecture (and the driver already works here).
> 
> The 29af05aeb98e will brick the macb driver for AVR32, as readZ_relaxed
> translates to readZ calls, which turns into le_to_cpu reads.
> 
>> In this case  the readl/writel relaxed will do the opposite of __raw
>> accesors which arleady work. Add an indirection of cdneth_ prefixed
>> accesors which are changed as necessary. Also do not issue the DMA
>> descritpor endian fetch configuration for AVR32.
>>
>> From discussions with Arnd Bergman, the following fix changes the use
>> of readl_relaxed and writel_relaxed with a version that can be put
>> back to __raw_readl/__raw_writel for the CONFIG_AVR32 case (and also
>> remove the change to the DMA descriptor endian).
> 
> Thank you for spotting this.
> 
>> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
>> Reported-by: Arnd Bergmann <arnd@arndb.de>
> 
> Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>

Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

>> --
>> CC: Linux Networking List <netdev@vger.kernel.org>
>> CC: Arun Chandran <achandran@mvista.com>
>> CC: Haavard Skinnemoen <hskinnemoen@gmail.com>
>> CC: Hans-Christian Egtvedt <egtvedt@samfundet.no>
>> CC: Linux Kernel List <linux-kernel@vger.kernel.org>
>> CC: Nicolas Ferre <nicolas.ferre@atmel.com>
>> ---
>>  drivers/net/ethernet/cadence/macb.c | 14 +++++++-------
>>  drivers/net/ethernet/cadence/macb.h | 20 ++++++++++++++------
>>  2 files changed, 21 insertions(+), 13 deletions(-)
> 
> <snipp diff>
> 


-- 
Nicolas Ferre

  reply	other threads:[~2015-03-18 12:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-18 10:57 [PATCH] net: macb: fix endian code for avr32 Ben Dooks
2015-03-18 12:25 ` Hans-Christian Egtvedt
2015-03-18 12:27   ` Nicolas Ferre [this message]
2015-03-18 13:16 ` Arun Chandran
2015-03-18 13:20   ` Arun Chandran
2015-03-18 14:40 ` Michal Simek

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=55096F23.10302@atmel.com \
    --to=nicolas.ferre@atmel.com \
    --cc=achandran@mvista.com \
    --cc=ben.dooks@codethink.co.uk \
    --cc=egtvedt@samfundet.no \
    --cc=hskinnemoen@gmail.com \
    --cc=linux-kernel@lists.codethink.co.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.