From: Ian Campbell <ijc+uboot@hellion.org.uk>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/4] net: sun8i_emac: Fix DMA alignment issues with the rx / tx buffers
Date: Wed, 27 Jul 2016 19:20:58 +0100 [thread overview]
Message-ID: <1469643658.10653.60.camel@hellion.org.uk> (raw)
In-Reply-To: <1469635835-2063-1-git-send-email-hdegoede@redhat.com>
On Wed, 2016-07-27 at 18:10 +0200, Hans de Goede wrote:
> This fixes the following CACHE warnings when using sun8i_emac:
>
> => dhcp
> BOOTP broadcast 1
> BOOTP broadcast 2
> CACHE: Misaligned operation at range [7bf594a8, 7bf59628]
> BOOTP broadcast 3
> CACHE: Misaligned operation at range [7bf59c90, 7bf59e10]
> CACHE: Misaligned operation at range [7bf5a478, 7bf5a5f8]
> DHCP client bound to address 10.42.43.80 (1009 ms)
>
> Cc: Chen-Yu Tsai <wens@csie.org>
> Cc: Corentin LABBE <clabbe.montjoie@gmail.com>
> Cc: Amit Singh Tomar <amittomer25@gmail.com>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
> ?drivers/net/sun8i_emac.c | 7 ++++---
> ?1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c
> index 7c088c3..877859c 100644
> --- a/drivers/net/sun8i_emac.c
> +++ b/drivers/net/sun8i_emac.c
> @@ -32,7 +32,8 @@
> ?
> ?#define CONFIG_TX_DESCR_NUM 32
> ?#define CONFIG_RX_DESCR_NUM 32
> -#define CONFIG_ETH_BUFSIZE 2024
> +#define CONFIG_ETH_BUFSIZE 2048
> +#define CONFIG_ETH_RXSIZE 2024 /* Note most fit in ETH_BUFSIZE */
s/most/must/?
A comment (perhaps in the commit message rather than the code) as to
how/why RXSIZE and BUFSIZE interact to affect the alignment in the
desired fasion would be useful, since it is non-obvious to me at
least.?
I was about to speculate on the difference of 14 bytes relating to the
Ethernet frame header, but then I realised it's 24 not 14 and deleted
those paragraphs, which I think underscores the need for a comment ;-)
Ian.
prev parent reply other threads:[~2016-07-27 18:20 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-27 16:10 [U-Boot] [PATCH 1/4] net: sun8i_emac: Fix DMA alignment issues with the rx / tx buffers Hans de Goede
2016-07-27 16:10 ` [U-Boot] [PATCH 2/4] sunxi: Ensure that the NIC specific bytes of the mac are not all 0 Hans de Goede
2016-07-27 18:24 ` Ian Campbell
2016-07-27 16:10 ` [U-Boot] [PATCH 3/4] sun8i: On H3 Use word 1 instead of word 3 from the SID Hans de Goede
2016-07-27 18:25 ` Ian Campbell
2016-07-27 19:14 ` Siarhei Siamashka
2016-07-28 3:13 ` Chen-Yu Tsai
2016-07-28 18:35 ` Hans de Goede
2016-07-29 11:12 ` Siarhei Siamashka
2016-07-29 9:35 ` Hans de Goede
2016-07-27 16:10 ` [U-Boot] [PATCH 4/4] sunxi: Re-enable h3 emac support Hans de Goede
2016-07-27 18:25 ` Ian Campbell
2016-07-28 18:01 ` Jagan Teki
2016-07-27 17:11 ` [U-Boot] [PATCH 1/4] net: sun8i_emac: Fix DMA alignment issues with the rx / tx buffers Amit Tomer
2016-07-28 18:37 ` Hans de Goede
2016-07-27 18:20 ` Ian Campbell [this message]
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=1469643658.10653.60.camel@hellion.org.uk \
--to=ijc+uboot@hellion.org.uk \
--cc=u-boot@lists.denx.de \
/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