From: Moritz Fischer <mdf@kernel.org>
To: davem@davemloft.net
Cc: keescook@chromium.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, Moritz Fischer <mdf@kernel.org>
Subject: [PATCH] net: nixge: Add __packed attribute to DMA descriptor struct
Date: Tue, 19 Jun 2018 09:54:53 -0700 [thread overview]
Message-ID: <20180619165453.31894-1-mdf@kernel.org> (raw)
Add __packed attribute to DMA descriptor structure in order to
make sure that the DMA engine's alignemnt requirements are met.
Fixes commit 492caffa8a1a ("net: ethernet: nixge: Add support for
National Instruments XGE netdev")
Signed-off-by: Moritz Fischer <mdf@kernel.org>
---
Hi David,
this addresses an issue where padding occured breaking the alignment
in the array the descriptors are allocated in coherent memory.
This was discovered when we tried to bring up the driver via a PCIe
bridge on x86.
Thanks,
Moritz
---
drivers/net/ethernet/ni/nixge.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/ni/nixge.c b/drivers/net/ethernet/ni/nixge.c
index 09f674ec0f9e..fea0e994324b 100644
--- a/drivers/net/ethernet/ni/nixge.c
+++ b/drivers/net/ethernet/ni/nixge.c
@@ -122,7 +122,7 @@ struct nixge_hw_dma_bd {
u32 sw_id_offset;
u32 reserved5;
u32 reserved6;
-};
+} __packed;
struct nixge_tx_skb {
struct sk_buff *skb;
--
2.17.1
next reply other threads:[~2018-06-19 16:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-19 16:54 Moritz Fischer [this message]
2018-06-19 17:13 ` [PATCH] net: nixge: Add __packed attribute to DMA descriptor struct Florian Fainelli
2018-06-19 17:31 ` Moritz Fischer
2018-06-19 17:41 ` Florian Fainelli
2018-06-19 22:37 ` David Miller
2018-06-21 18:30 ` Moritz Fischer
2018-06-20 5:44 ` David Miller
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=20180619165453.31894-1-mdf@kernel.org \
--to=mdf@kernel.org \
--cc=davem@davemloft.net \
--cc=keescook@chromium.org \
--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 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).