From: Vipin Kumar <vipin.kumar@st.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] drivers/net/designware - fix alignment of buffer descriptors
Date: Thu, 26 Sep 2013 09:39:52 +0530 [thread overview]
Message-ID: <5243B390.4010708@st.com> (raw)
In-Reply-To: <1380122868-5306-1-git-send-email-abrodkin@synopsys.com>
On 9/25/2013 8:57 PM, Alexey Brodkin wrote:
> It's important that buffer descriptors are aligned in accordance to GMAC
> data bus width (32/64/128-bit). It's safe to align to 128-bit (16-bytes)
> for every bus width type.
>
> If buffer descriptor is improperly aligned GMAC discards lower bits of
> provided address and as a result reads from improper location that
> doesn't match expected fields.
>
> Commit ef76025a99247cdb8f927a2c9f15400678dfb599 "net: Multiple
> updates/enhancements to designware.c" introduced another structure
> member "link_printed" right before buffer descriptors while "padding"
> member was left untouched. This together with alignment of structure
> itself to 16-byte boundary forces buffer descriptoprs always to be
> 4-byte aligned that causes driver complete disfunction if GMAC bus width
> is 64 or 128-bit.
>
I have also faced this problem before. May be a better solution is to
place all the struct and buffer declarations at the very start of
dw_eth_dev structure (off-course with a comment that these should not be
moved). It may avoid the problem in later modifications
Regards
Vipin
next prev parent reply other threads:[~2013-09-26 4:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-25 15:27 [U-Boot] [PATCH v2] drivers/net/designware - fix alignment of buffer descriptors Alexey Brodkin
2013-09-26 4:09 ` Vipin Kumar [this message]
2013-09-26 5:26 ` Mischa Jonker
2013-09-26 8:30 ` Alexey Brodkin
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=5243B390.4010708@st.com \
--to=vipin.kumar@st.com \
--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