From patchwork Tue Dec 17 11:42:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jose Abreu X-Patchwork-Id: 1211298 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=synopsys.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=synopsys.com header.i=@synopsys.com header.b="iFvfqZE+"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 47cbqN2JPmz9s4Y for ; Tue, 17 Dec 2019 22:42:55 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727598AbfLQLmy (ORCPT ); Tue, 17 Dec 2019 06:42:54 -0500 Received: from smtprelay-out1.synopsys.com ([149.117.87.133]:36486 "EHLO smtprelay-out1.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726275AbfLQLmx (ORCPT ); Tue, 17 Dec 2019 06:42:53 -0500 Received: from mailhost.synopsys.com (mdc-mailhost2.synopsys.com [10.225.0.210]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id 5F029C00CC; Tue, 17 Dec 2019 11:42:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1576582973; bh=4HnZAoZdscSffoLRQAaVEBPU8XsY4emx6y4nwnhMNOU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:In-Reply-To: References:From; b=iFvfqZE+ri6Zxkv0ZNvJVIK7B8BqwBjDU0xdO8thZMK4mzGk/WVw5vnpyxplnzQfZ XOQPBZibCT3cfUSLr4zWGLVM6GoCmDIddsgaN6rgT9gxYTW4T/w8AQ2ChgxWDUM5At NCERTO4bAybLoR8/L/dBeXIVZ3a4OJ3u6JC88yZQEX9P/PDmVeE8yTDlIWvOiYfhWS KvY25GMfYlTcISHJ3ODEoWvJn0vwZof1BXPZ7zKqFrUCMLeRJurnDOtsj9ACEmQ5Ik Tj44Qq2pBZ0VI6obs8udowrWyoNJniIOTY0NiK6bcynwHUGpxXTq6jD3JktvL/skaZ 0wCchpWovsRWQ== Received: from de02dwia024.internal.synopsys.com (de02dwia024.internal.synopsys.com [10.225.19.81]) by mailhost.synopsys.com (Postfix) with ESMTP id 045F9A00A7; Tue, 17 Dec 2019 11:42:51 +0000 (UTC) From: Jose Abreu To: netdev@vger.kernel.org Cc: Joao Pinto , Jakub Kicinski , Jose Abreu , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Maxime Coquelin , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH net v2 6/8] net: stmmac: RX buffer size must be 16 byte aligned Date: Tue, 17 Dec 2019 12:42:36 +0100 Message-Id: <8d7b87265a2727a28896203f5569d7039c2c34c8.1576581853.git.Jose.Abreu@synopsys.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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. Fixes: 7ac6653a085b ("stmmac: Move the STMicroelectronics driver") Signed-off-by: Jose Abreu --- Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Jose Abreu Cc: "David S. Miller" Cc: Maxime Coquelin Cc: netdev@vger.kernel.org Cc: linux-stm32@st-md-mailman.stormreply.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.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 8c191e4d35d0..eb31d7fb321c 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -46,7 +46,7 @@ #include "dwxgmac2.h" #include "hwif.h" -#define STMMAC_ALIGN(x) __ALIGN_KERNEL(x, SMP_CACHE_BYTES) +#define STMMAC_ALIGN(x) ALIGN_DOWN(ALIGN_DOWN(x, SMP_CACHE_BYTES), 16) #define TSO_MAX_BUFF_SIZE (SZ_16K - 1) /* Module parameters */