Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7260707imu; Wed, 14 Nov 2018 14:25:33 -0800 (PST) X-Google-Smtp-Source: AJdET5cJ608TwSZifUtr119YNrWqAyQL7YtK78p5afmqJvXOfEK4Tc15hJdSqugyM4Mt2U3wQ+uH X-Received: by 2002:a63:bd01:: with SMTP id a1-v6mr3473545pgf.58.1542234333342; Wed, 14 Nov 2018 14:25:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542234333; cv=none; d=google.com; s=arc-20160816; b=vKn3yXtjFfAOIEFJO5CfTZCktgRO7R3DG2nL3k9qjeI0VNu7Ho6+IVkiaDLjm5r370 ME76FSJ+mwbUXtSmP/zJ6O7rBqPUd7YjzrmAxuPApwhI4u1O7JxH+otgARxYEB/plUY/ cFE9yaLA2lbAkf3d9ndC7MsHpLZqbinutLAM9bSvsCK7nk8fd4OgOW2ZoCGoRmlEd4ug p2GeyoVCqE8WUOaTwyCyqA4GEWUSI9/CRZxVxvr/91yK5D58H6z+pbd30fqZ7p9pGI9X zRQbMZ3VDOTzvy+8gBUt5+WjlY6NN5Oe7PtRJdgynrCY9ZVMrTznaE9XmNBEBlAIxdD9 xI8g== 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; bh=PauqbMNqh/lVPGji52KBUcioHA6/X8jkBKBlnBdFB/A=; b=022goJWEReDdrklH+VscPS04IDKiykrFtITVTpnItTqXK5OMEk8fbBzC8LT98TmniT OWLauIOZy3rGSflzF0M2OUhnG667C8WYz6Y5dfVDv5GElVMfg8HAgCnN1c+zfP0AwE2Q rsdSx9jyj4S6rtVPqd9BE95uWehY3KY15PMonGA4IHRUhyCI2RCeM7QGJxw/kur2GWfY 6A/lwQQ1w4xO780w6syZRcinolOItGczAMIlZWafPmEFc4btFlZmRNCHRWFdpcnh53LF BouKBJTOENMM/XIF0OadqekaksK/cJbRRXMklXtddD6KLy5RAChZJAV0EnjsBy/A9YBm UhzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=U6+cEQCr; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 84-v6si27712234pfq.180.2018.11.14.14.25.18; Wed, 14 Nov 2018 14:25:33 -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=@kernel.org header.s=default header.b=U6+cEQCr; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729155AbeKOI12 (ORCPT + 99 others); Thu, 15 Nov 2018 03:27:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:34402 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729087AbeKOI11 (ORCPT ); Thu, 15 Nov 2018 03:27:27 -0500 Received: from sasha-vm.mshome.net (unknown [64.114.255.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 408ED22526; Wed, 14 Nov 2018 22:22:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542234144; bh=OYwdI72nSvEeMaRKCm8f623xRMFUREu5VxKiANAzODY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U6+cEQCrqbPEDgW5iXbzXT1qDPBjQtdgNnZgAdb8FN8vAOBHOJENB11aRsoUrIlVu VCL90/4q4XaYQ8Ef+zRzbOP/HK2EAPwzt0GnjrG7JlSyiWKf/ONv2DQO+TM90B+A+h 0tpp4vadb6PZHXUW5lrLpK8vyWC89RGNBd736aQk= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Stefan Wahren , "David S . Miller" , Sasha Levin Subject: [PATCH AUTOSEL 4.19 65/73] net: smsc95xx: Fix MTU range Date: Wed, 14 Nov 2018 17:21:59 -0500 Message-Id: <20181114222207.98701-65-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181114222207.98701-1-sashal@kernel.org> References: <20181114222207.98701-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stefan Wahren [ Upstream commit 85b18b0237ce9986a81a1b9534b5e2ee116f5504 ] The commit f77f0aee4da4 ("net: use core MTU range checking in USB NIC drivers") introduce a common MTU handling for usbnet. But it's missing the necessary changes for smsc95xx. So set the MTU range accordingly. This patch has been tested on a Raspberry Pi 3. Fixes: f77f0aee4da4 ("net: use core MTU range checking in USB NIC drivers") Signed-off-by: Stefan Wahren Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/usb/smsc95xx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c index 2d17f3b9bb16..f2d01cb6f958 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c @@ -1321,6 +1321,8 @@ static int smsc95xx_bind(struct usbnet *dev, struct usb_interface *intf) dev->net->ethtool_ops = &smsc95xx_ethtool_ops; dev->net->flags |= IFF_MULTICAST; dev->net->hard_header_len += SMSC95XX_TX_OVERHEAD_CSUM; + dev->net->min_mtu = ETH_MIN_MTU; + dev->net->max_mtu = ETH_DATA_LEN; dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len; pdata->dev = dev; -- 2.17.1