linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: peppe.cavallaro@st.com (Giuseppe CAVALLARO)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] stmmac: change dma descriptors to __le32
Date: Tue, 26 Jul 2016 14:13:45 +0200	[thread overview]
Message-ID: <e5229894-45fc-671e-641a-e41c7ab176d7@st.com> (raw)
In-Reply-To: <20160721182329.13478-3-michael.weiser@gmx.de>

On 7/21/2016 8:23 PM, Michael Weiser wrote:
> The stmmac driver does not take into account the processor may be big
> endian when writing the DMA descriptors. This causes the ethernet
> interface not to be initialised correctly when running a big-endian
> kernel. Change the descriptors for DMA to use __le32 and ensure they are
> suitably swapped before writing. Tested successfully on the
> Cubieboard2.

Thx for the effort on big endian platform.
>
> Signed-off-by: Michael Weiser <michael.weiser@gmx.de>
> Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
> Cc: Alexandre Torgue <alexandre.torgue@st.com>
> Cc: netdev at vger.kernel.org
> ---
...
>
> @@ -2880,14 +2876,17 @@ static void sysfs_display_ring(void *head, int size, int extend_desc,
>  			x = *(u64 *) ep;
>  			seq_printf(seq, "%d [0x%x]: 0x%x 0x%x 0x%x 0x%x\n",
>  				   i, (unsigned int)virt_to_phys(ep),
> -				   ep->basic.des0, ep->basic.des1,
> -				   ep->basic.des2, ep->basic.des3);
> -			ep++;
> +				   le32_to_cpu(ep->basic.des0),
> +				   le32_to_cpu(ep->basic.des1),
> +				   le32_to_cpu(ep->basic.des2),
> +				   le32_to_cpu(ep->basic.des3));
> +			ep++);


there is a build problem here.

Pls fix it.


Peppe

  reply	other threads:[~2016-07-26 12:13 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-21 18:23 [PATCH 0/3 v2] Fixes for running a big-endian kernel on Cubieboard2 Michael Weiser
2016-07-21 18:23 ` [PATCH 1/3] mmc: sunxi-mmc: change idma descriptor to __le32 Michael Weiser
2016-07-22  8:59   ` Maxime Ripard
2016-07-21 18:23 ` [PATCH 2/3] stmmac: change dma descriptors " Michael Weiser
2016-07-26 12:13   ` Giuseppe CAVALLARO [this message]
2016-07-29  7:53     ` Michael Weiser
2016-07-29  8:26       ` Giuseppe CAVALLARO
2016-07-21 18:23 ` [PATCH 3/3] ARM: sunxi: enable big-endian Michael Weiser
2016-07-22  9:01   ` Maxime Ripard
2016-07-22 13:56     ` Michael Weiser
2016-07-25 12:25       ` Maxime Ripard
2016-07-26 19:26         ` Michael Weiser
2016-07-27  1:55           ` Chen-Yu Tsai
2016-07-29  7:59             ` Michael Weiser
2016-07-29 16:39               ` Maxime Ripard
2016-07-29 18:55                 ` Michael Weiser
  -- strict thread matches above, loose matches on Subject: below --
2016-07-18 16:23 [PATCH 0/3] Fixes for running a big-endian kernel on Cubieboard2 Michael Weiser
2016-07-18 16:23 ` [PATCH 2/3] stmmac: change dma descriptors to __le32 Michael Weiser

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=e5229894-45fc-671e-641a-e41c7ab176d7@st.com \
    --to=peppe.cavallaro@st.com \
    --cc=linux-arm-kernel@lists.infradead.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 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).