Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5794277ybl; Tue, 10 Dec 2019 11:35:02 -0800 (PST) X-Google-Smtp-Source: APXvYqynCrhnosA52jIU41yWuV95u2VI4EvI7K2lQV6y+dLJq7epCBaUke3cc2/Te/EijIJWtJ0B X-Received: by 2002:aca:c692:: with SMTP id w140mr451766oif.139.1576006502086; Tue, 10 Dec 2019 11:35:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576006502; cv=none; d=google.com; s=arc-20160816; b=d1yZhqxpcmcX0jdX02CRMldSGX+ghgCORUZwL6VD39rQ9j5imSnEMw+gHSTb31BgAe yXPaR5uVZNRAEX5agZ3yjACJQeaWUMoHHO6FxDW9IkY3CudoJ1NrpDa6MsMJEjd0y8Gb RikMDceS28sD3JKDyH76O/vQ1dsu2Kh12/fpcAMSLdsbQlR9XBuyKqGwy/pienmPP6hD 1ORdyeGUnG8v933Ua6tgUEvOqbR5KC34jrH2iXhmhIr6tQCC5cO1YjffjsI+WAPhMtJV Vsmf4MhGLe9GDGPMzX4AwYSDQtyMwcjRSzmFUzMyUcfvn00jDfwNK4EebDeqWES7HJPl 4zPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=5ahd9a1W6FDkrH31StntQP05iI8vd3GH2Ozbs6B9bUI=; b=lTvNKDJvQObls5LPXeDisw3Sv/wCzy7VZ86KubrRVMpLiQO712rh3DgiWABABPSUGZ b1xVZNrernRyvSEUCmuC5UXKj3zs2RIGByTShBY22CpmS6btFLoG69N4Ow7Ddavlbn61 ywL/KsuiDdOkUGqfDznbk9da6tFrAGwC8z63F71Zmw3ZSa14qgrzYBe3bi8V0hw/Hm9m A3AcUsAZQyjD7JQkvrqyIVQBTaXloMHDBCLBTbYF1YOj9bhJDsUcBCsrjTH9v/tEgtwv oLVZvudPr8+QILYCOfay9Y1hNQTc6JlY4Xys+QFoTBHQNI0tOgH/SeeIoYO+Mei3162h rnWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=CCRc7j1F; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g9si2354374otq.68.2019.12.10.11.34.39; Tue, 10 Dec 2019 11:35:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=CCRc7j1F; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726892AbfLJTeK (ORCPT + 99 others); Tue, 10 Dec 2019 14:34:10 -0500 Received: from sv2-smtprelay2.synopsys.com ([149.117.73.133]:51242 "EHLO smtprelay-out1.synopsys.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726362AbfLJTeI (ORCPT ); Tue, 10 Dec 2019 14:34:08 -0500 Received: from mailhost.synopsys.com (mdc-mailhost1.synopsys.com [10.225.0.209]) (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 7930742D2F; Tue, 10 Dec 2019 19:34:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1576006447; bh=ApVBmx2KWyDu+9JlAqCGu/P/oYZTvPOSvPl95YD+VN4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:In-Reply-To: References:From; b=CCRc7j1FOrPu3OM+KY7AEdB+FVdDf9Wzn/tsLVfW1KojAcO1MJQ0k8hzczXx6SEHI oQ/X0Gwa5u7Iq4xJePmrepC4jc4h6mbYe5TzfpayGh0A1Ckkmqbt3MZZCNPqPU+ddC V3zT3d+utGuAKHKc0ukT8RMccpSCN5leqBsfroAsxSmoikbpgpWOcAPCyIZzrruE20 pJR5Z626I44Rvs60mNFc5IHEho+MFlDRH51eMtofZv03dQhbO5AwwCV4fOum1td9QB XPYKlluJQZydwuziTQ3+NQc6FGved5uTICuvrDz/OknIkFm1AW5FbuGIiYuZUXrwzV R0fC8F95vxq5w== Received: from de02dwia024.internal.synopsys.com (de02dwia024.internal.synopsys.com [10.225.19.81]) by mailhost.synopsys.com (Postfix) with ESMTP id 2F616A00A7; Tue, 10 Dec 2019 19:34:06 +0000 (UTC) From: Jose Abreu To: netdev@vger.kernel.org Cc: Joao Pinto , 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 8/8] net: stmmac: Enable 16KB buffer size Date: Tue, 10 Dec 2019 20:34:00 +0100 Message-Id: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org XGMAC supports maximum MTU that can go to 16KB. Lets add this check in the calculation of RX buffer size. 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index eb31d7fb321c..082eeff9f54b 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -1109,7 +1109,9 @@ static int stmmac_set_bfsize(int mtu, int bufsize) { int ret = bufsize; - if (mtu >= BUF_SIZE_4KiB) + if (mtu >= BUF_SIZE_8KiB) + ret = BUF_SIZE_16KiB; + else if (mtu >= BUF_SIZE_4KiB) ret = BUF_SIZE_8KiB; else if (mtu >= BUF_SIZE_2KiB) ret = BUF_SIZE_4KiB; -- 2.7.4