From patchwork Wed Jul 11 19:32:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 141770 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp676061ljj; Wed, 11 Jul 2018 12:36:23 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdyfTvUFuHO543B1xARljgyxh9B5Q25QvGch1nxZng4kAOX3XodWvoCZyYazj9ya5Nk+BF0 X-Received: by 2002:a17:902:4d:: with SMTP id 71-v6mr29969743pla.317.1531337783215; Wed, 11 Jul 2018 12:36:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531337783; cv=none; d=google.com; s=arc-20160816; b=QaxPrVz1+cckK1U1NLIzDSgXrriELS9+TmhGdpYJIoyHZUR+C3XTnE64b0c/yam5E+ USfW40SN0AUiFPUsY5nBG0Q0Idt8+ntuS/q3xbwf3+sD047UH69agY2sscFNH/3BBKsS Fg30XnET6maO5huylNaCE7SXN3ZIAaTsQq4xS+SOsDaMixNMewJ01KHy1OTh+THeh5/q gYuhrAruWIXCJdmcGq0cRq9OcB0J4o29Rz3wnhySvkmsOafdtbtR0sMmyxNiyZDLl7IC e1YtK9sIzP6MJjLj4g1Z4VIgumuZfUrWUTw/rSarLADy44xR1Al3bcOKlDGlD0a712Hu aS1w== 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:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=DX3mhXvM3mnS/LvEcn2vPGDW+AztgpDhIezs1Gc0iZo=; b=pSF7bOgr/XfR0XI5OcHlyYnlMV8z0bTssPowasScvlpWP5eRFtHK3jrdUByIqTqm0X 6sxAahH9AiEO1eRi2VEv/qUX9tD9h68w1Izugy0oqPQEgvSyO0b/4f2Imnir0SEDjoF+ j79cifilWU5Y9IkhoiHnswuKxj1BG6q9byKf1/jHSYzUTcfhiWcDO7ZncdCCGa9iXfQj qs6ddCG7tob6FwK03eSCMxj3mp5jjeWgxV1JJafxQ/zq37+kBOr3UXQAn1sHlhTO8eBa 5EBRaKXzJw9zODVshnGd9PTlhuCTNFENTag884/DkJfWkbE34cBo47nhVP6l5c0wVsCP OK5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LsWJzot5; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 85-v6si21344993pfm.264.2018.07.11.12.36.23; Wed, 11 Jul 2018 12:36:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-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=@linaro.org header.s=google header.b=LsWJzot5; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388445AbeGKTmJ (ORCPT + 10 others); Wed, 11 Jul 2018 15:42:09 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:35957 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726783AbeGKTmJ (ORCPT ); Wed, 11 Jul 2018 15:42:09 -0400 Received: by mail-lj1-f194.google.com with SMTP id u7-v6so17614549lji.3 for ; Wed, 11 Jul 2018 12:36:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=DX3mhXvM3mnS/LvEcn2vPGDW+AztgpDhIezs1Gc0iZo=; b=LsWJzot53MSwwOO7Q5DirsjaydOaQrxEIR6tRWb+r12fRJeJjYxJ0FIOeNme4tOzCu D2qGiXcePqkzHkLBwexuknlDdRG5pKpYNyg+aIQ5pmA6WfX6mYvRPVpNX+cIQJ059xV6 ZcZtIcuspBbcolfr2el8F4s6qjsEtJYnVyO/Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=DX3mhXvM3mnS/LvEcn2vPGDW+AztgpDhIezs1Gc0iZo=; b=fvckUkeHg5nXfTGcZirJFT25AVWBdLy6fnIheXTUtVTc1LPvxxS+ImUaGOU0J3IboM tFQX5mlFPtH3JWLTYWgRGzB03WZSXb/bsMXnZ3zNiuX77qbq8wtGufmUn5hmgUSj9KP+ g9N9bc74s/T4wGxI7HCfggJeKuItjTL9hBfVlq6sjyG/9/5GzBU11WuVI6d8p7YL1z4M ZhoP4XPLVN2TVg5vQ8243x9fO+g5K6M3ho8miRus6b6mBOzfExliyGtXm6weCorEfAUh KMsJFMIwNdi+MZIq6+bLcXvKv7TJqmvhNryC3+sYXpyXawbHR350vuCHdG3iD+5VpULF tD2g== X-Gm-Message-State: APt69E0MiHh8JEtHdRVFFZ2uzlJ/4VfwcHRXCoJF9DocmZLoeFixmn4X 9QbAgm/Tb0i4fW5o5HYXEBqSDHILAH0= X-Received: by 2002:a2e:9095:: with SMTP id l21-v6mr8014758ljg.15.1531337778827; Wed, 11 Jul 2018 12:36:18 -0700 (PDT) Received: from localhost.localdomain (c-ae7b71d5.014-348-6c756e10.bbcust.telenor.se. [213.113.123.174]) by smtp.gmail.com with ESMTPSA id y5-v6sm5502299lfc.58.2018.07.11.12.36.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Jul 2018 12:36:17 -0700 (PDT) From: Linus Walleij To: netdev@vger.kernel.org, "David S . Miller" Cc: Hans Ulli Kroll , Florian Fainelli , =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= , Andrew Lunn , Linus Walleij Subject: [PATCH net-next 5/5 v3] net: gemini: Indicate that we can handle jumboframes Date: Wed, 11 Jul 2018 21:32:45 +0200 Message-Id: <20180711193245.21980-5-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180711193245.21980-1-linus.walleij@linaro.org> References: <20180711193245.21980-1-linus.walleij@linaro.org> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The hardware supposedly handles frames up to 10236 bytes and implements .ndo_change_mtu() so accept 10236 minus the ethernet header for a VLAN tagged frame on the netdevices. Use ETH_MIN_MTU as minimum MTU. Signed-off-by: Linus Walleij --- ChangeLog v2->v3: - No changes, just resending with the rest. ChangeLog v1->v2: - Change the min MTU from 256 (vendor code) to ETH_MIN_MTU which makes more sense. --- drivers/net/ethernet/cortina/gemini.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.17.1 Reviewed-by: Andrew Lunn diff --git a/drivers/net/ethernet/cortina/gemini.c b/drivers/net/ethernet/cortina/gemini.c index 0f1d26441177..22f495b490d4 100644 --- a/drivers/net/ethernet/cortina/gemini.c +++ b/drivers/net/ethernet/cortina/gemini.c @@ -2476,6 +2476,11 @@ static int gemini_ethernet_port_probe(struct platform_device *pdev) netdev->hw_features = GMAC_OFFLOAD_FEATURES; netdev->features |= GMAC_OFFLOAD_FEATURES | NETIF_F_GRO; + /* We can handle jumbo frames up to 10236 bytes so, let's accept + * payloads of 10236 bytes minus VLAN and ethernet header + */ + netdev->min_mtu = ETH_MIN_MTU; + netdev->max_mtu = 10236 - VLAN_ETH_HLEN; port->freeq_refill = 0; netif_napi_add(netdev, &port->napi, gmac_napi_poll,