From patchwork Wed Jul 4 18:33:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 141086 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1097913ljj; Wed, 4 Jul 2018 11:37:36 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd2TXTBW0znYhLvyvQA+vfy5nzfq9QzdR1ZMO6MXJwJbv2Jrnmf2nlS+UR4AYpE+zGIpsYh X-Received: by 2002:a17:902:aa01:: with SMTP id be1-v6mr3139187plb.296.1530729456434; Wed, 04 Jul 2018 11:37:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530729456; cv=none; d=google.com; s=arc-20160816; b=e1HsbuCjUpkv1q9GNqva27r3xy3M0cwBJbU7dpBXHpFi3QPS2yj8TTpAbBmvM6WbhL z4OIeAYbt4qtIfPa3DgX8OkFIsbVZYaccqfJqmNrBgCJUwHsUHOlD1+I4teibtxEl6Io z6IlWQ6vXZixQ8Itnt8hHBzH7fFysjBG3XQv/WwdlBLgKmYQzzvMy84HieW+gV8wl8ic nygDV6kiQMN3iDEwlsQTnvcPV09X7Nax1BJpGK263tNxh8gtGbXvR/QxYntTTvFzXHaO GX0/7cuACHWG4sZjIDy5ezx4r+OVnMOgInjy8c2tmCtzmi7Kwrw9Aye83vGksMKy3ZGw 8ICg== 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=SFI/TsSbDoXWcl6b/PQ9+szdoyT9QL5JKDZYcE5EdYY=; b=Hpfx9X6Ps3/HBvs6yb1kauKC3i6IW+gGi5/wzQP38qF1jCHdsUbIhx4GOhEHLuWQiO ZmFVBrIV05kK5OYtopTF1HvFnYj9OwyhvIThH4OQvRSeY2YS8SUj2ndU9d+Zgv8uvKIW H2dJgG13G+AYpVHUSY3q6AFAlsQs4FUWP7ul8F4Bml5raeyYXO0FzIWfDHG6zD7iYe/1 eLDU1ECWWQOFPLLYA+4JDHd6nSKE0PcBlck/mFyJ16Gl6XZkl/hehDPtJGzCiC7cOEEK DERcNsnQOLxmJ5oJ6vRcoFCOEehTW78S3JITjv+TmxLtFKaWJcaA3sAPC4+PB/eujurK cWsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WirJQwes; 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 d6-v6si3961989pgh.569.2018.07.04.11.37.36; Wed, 04 Jul 2018 11:37:36 -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=WirJQwes; 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 S1752942AbeGDShe (ORCPT + 10 others); Wed, 4 Jul 2018 14:37:34 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:40901 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752815AbeGDShc (ORCPT ); Wed, 4 Jul 2018 14:37:32 -0400 Received: by mail-lj1-f196.google.com with SMTP id a6-v6so4924841ljj.7 for ; Wed, 04 Jul 2018 11:37:32 -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=SFI/TsSbDoXWcl6b/PQ9+szdoyT9QL5JKDZYcE5EdYY=; b=WirJQweszjD6+YhOUv1Zsmgebgsx5Vr0oyRJLO955qQQV3xImPOYJe2/itgcVd3Y7e +vvWwZKctFn2t8KjOiuiOmfeiH9WRimmqh8Nf0K6quGms97EfTNfmShuo8IXXizPM14+ HXlOaNww+8w5IK+f9sBKv2hJgu9KZH91C764w= 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=SFI/TsSbDoXWcl6b/PQ9+szdoyT9QL5JKDZYcE5EdYY=; b=K/6W1z+HGDrt/nFN3Has5zWlsYSh6tzUypejVg3OIO2D1YAHhQqTHUmyFoWM2vZ57z 7TYrKnGnHa4J4Khgs+TAXhs1hvHqg9eB8ttv0lHbaHZQQrHn30JkFwjnHqzN3TVPB7/Z VRXnXQD7nWIlrorbfr+DuJeiyehgySM+eQhGhPXsgfdYkzTYyjc6j1mBVCcgcTdlAEZC dwYRnD4Lr3KlJIDllkly2BW5AF5+gdfx6k1D9f8Tw3BscfUR6w90TgpTc69+DBwtifQK xVqKmIvSyvjZ9LzxNzIf10Dkwl5FQyzEBWIyls6Hnv5uv+6Cv4mtY2Mv1Nrn/TN7Ev6M HOCw== X-Gm-Message-State: APt69E0r5R9iEQNjaGooHxYKCeKTexB/nbERd19Y+Ckfi+1PJuxUrjf0 ua1KQkxnq3//IyjSiTYBQM0/qXzE3bI= X-Received: by 2002:a2e:1609:: with SMTP id w9-v6mr2137650ljd.120.1530729450895; Wed, 04 Jul 2018 11:37:30 -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 g2-v6sm681094ljj.53.2018.07.04.11.37.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 04 Jul 2018 11:37:29 -0700 (PDT) From: Linus Walleij To: netdev@vger.kernel.org, "David S . Miller" , =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= Cc: Janos Laube , Paulius Zaleckas , linux-arm-kernel@lists.infradead.org, Hans Ulli Kroll , Florian Fainelli , Linus Walleij Subject: [PATCH net-next 5/5 v2] net: gemini: Indicate that we can handle jumboframes Date: Wed, 4 Jul 2018 20:33:24 +0200 Message-Id: <20180704183324.10605-5-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180704183324.10605-1-linus.walleij@linaro.org> References: <20180704183324.10605-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 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 diff --git a/drivers/net/ethernet/cortina/gemini.c b/drivers/net/ethernet/cortina/gemini.c index 4e341570047f..af38f9869734 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,