From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Jose Abreu <Jose.Abreu@synopsys.com>,
"David S . Miller" <davem@davemloft.net>,
Sasha Levin <sashal@kernel.org>,
netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH AUTOSEL 4.14 48/57] net: stmmac: RX buffer size must be 16 byte aligned
Date: Fri, 27 Dec 2019 13:02:13 -0500 [thread overview]
Message-ID: <20191227180222.7076-48-sashal@kernel.org> (raw)
In-Reply-To: <20191227180222.7076-1-sashal@kernel.org>
From: Jose Abreu <Jose.Abreu@synopsys.com>
[ Upstream commit 8d558f0294fe92e04af192e221d0d0f6a180ee7b ]
We need to align the RX buffer size to at least 16 byte so that IP
doesn't mis-behave. This is required by HW.
Changes from v2:
- Align UP and not DOWN (David)
Fixes: 7ac6653a085b ("stmmac: Move the STMicroelectronics driver")
Signed-off-by: Jose Abreu <Jose.Abreu@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 4ef923f1094a..e89466bd432d 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -51,7 +51,7 @@
#include <linux/of_mdio.h>
#include "dwmac1000.h"
-#define STMMAC_ALIGN(x) __ALIGN_KERNEL(x, SMP_CACHE_BYTES)
+#define STMMAC_ALIGN(x) ALIGN(ALIGN(x, SMP_CACHE_BYTES), 16)
#define TSO_MAX_BUFF_SIZE (SZ_16K - 1)
/* Module parameters */
--
2.20.1
next prev parent reply other threads:[~2019-12-27 18:04 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-27 18:01 [PATCH AUTOSEL 4.14 01/57] mwifiex: fix possible heap overflow in mwifiex_process_country_ie() Sasha Levin
2019-12-27 18:01 ` [PATCH AUTOSEL 4.14 03/57] netfilter: ctnetlink: netns exit must wait for callbacks Sasha Levin
2019-12-27 18:01 ` [PATCH AUTOSEL 4.14 04/57] mwifiex: Fix heap overflow in mmwifiex_process_tdls_action_frame() Sasha Levin
2019-12-27 18:01 ` [PATCH AUTOSEL 4.14 07/57] netfilter: nf_queue: enqueue skbs with NULL dst Sasha Levin
2019-12-27 18:01 ` [PATCH AUTOSEL 4.14 13/57] netfilter: nf_tables: validate NFT_SET_ELEM_INTERVAL_END Sasha Levin
2019-12-27 18:01 ` [PATCH AUTOSEL 4.14 14/57] netfilter: bridge: make sure to pull arp header in br_nf_forward_arp() Sasha Levin
2019-12-27 18:01 ` [PATCH AUTOSEL 4.14 17/57] af_packet: set defaule value for tmo Sasha Levin
2019-12-27 18:01 ` [PATCH AUTOSEL 4.14 18/57] fjes: fix missed check in fjes_acpi_add Sasha Levin
2019-12-27 18:01 ` [PATCH AUTOSEL 4.14 21/57] net: ena: fix napi handler misbehavior when the napi budget is zero Sasha Levin
2019-12-27 18:01 ` [PATCH AUTOSEL 4.14 22/57] bpf, mips: Limit to 33 tail calls Sasha Levin
2019-12-27 18:01 ` [PATCH AUTOSEL 4.14 24/57] samples: bpf: Replace symbol compare of trace_event Sasha Levin
2019-12-27 18:01 ` [PATCH AUTOSEL 4.14 25/57] samples: bpf: fix syscall_tp due to unused syscall Sasha Levin
2019-12-27 18:01 ` [PATCH AUTOSEL 4.14 27/57] net: usb: lan78xx: Fix suspend/resume PHY register access error Sasha Levin
2019-12-27 18:01 ` [PATCH AUTOSEL 4.14 28/57] qede: Fix multicast mac configuration Sasha Levin
2019-12-27 18:01 ` [PATCH AUTOSEL 4.14 30/57] 6pack,mkiss: fix possible deadlock Sasha Levin
2019-12-27 18:01 ` [PATCH AUTOSEL 4.14 31/57] bnx2x: Do not handle requests from VFs after parity Sasha Levin
2019-12-27 18:01 ` [PATCH AUTOSEL 4.14 32/57] bnx2x: Fix logic to get total no. of PFs per engine Sasha Levin
2019-12-27 18:01 ` [PATCH AUTOSEL 4.14 33/57] bonding: fix active-backup transition after link failure Sasha Levin
2019-12-27 18:01 ` [PATCH AUTOSEL 4.14 34/57] gtp: do not allow adding duplicate tid and ms_addr pdp context Sasha Levin
2019-12-27 18:02 ` [PATCH AUTOSEL 4.14 35/57] gtp: fix wrong condition in gtp_genl_dump_pdp() Sasha Levin
2019-12-27 18:02 ` [PATCH AUTOSEL 4.14 36/57] gtp: avoid zero size hashtable Sasha Levin
2019-12-27 18:02 ` [PATCH AUTOSEL 4.14 37/57] net: usb: lan78xx: Fix error message format specifier Sasha Levin
2019-12-27 18:02 ` [PATCH AUTOSEL 4.14 38/57] rfkill: Fix incorrect check to avoid NULL pointer dereference Sasha Levin
2019-12-27 18:02 ` [PATCH AUTOSEL 4.14 45/57] net: qlogic: Fix error paths in ql_alloc_large_buffers() Sasha Levin
2019-12-27 18:02 ` [PATCH AUTOSEL 4.14 46/57] net: nfc: nci: fix a possible sleep-in-atomic-context bug in nci_uart_tty_receive() Sasha Levin
2019-12-27 18:02 ` [PATCH AUTOSEL 4.14 47/57] net: stmmac: Do not accept invalid MTU values Sasha Levin
2019-12-27 18:02 ` Sasha Levin [this message]
2019-12-27 18:02 ` [PATCH AUTOSEL 4.14 49/57] net, sysctl: Fix compiler warning when only cBPF is present Sasha Levin
2019-12-27 18:02 ` [PATCH AUTOSEL 4.14 54/57] net: hisilicon: Fix a BUG trigered by wrong bytes_compl Sasha Levin
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=20191227180222.7076-48-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=Jose.Abreu@synopsys.com \
--cc=davem@davemloft.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=netdev@vger.kernel.org \
--cc=stable@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).