From patchwork Thu Nov 8 19:38:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 10674933 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 11556109C for ; Thu, 8 Nov 2018 19:39:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 02ADB2E1EE for ; Thu, 8 Nov 2018 19:39:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EAFD82E36A; Thu, 8 Nov 2018 19:39:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 62ACF2E1EE for ; Thu, 8 Nov 2018 19:39:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726843AbeKIFQB (ORCPT ); Fri, 9 Nov 2018 00:16:01 -0500 Received: from mout.kundenserver.de ([212.227.17.24]:44133 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725739AbeKIFQB (ORCPT ); Fri, 9 Nov 2018 00:16:01 -0500 Received: from localhost.localdomain ([37.4.249.153]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MY6TD-1g0Jem1frB-00YRl7; Thu, 08 Nov 2018 20:38:57 +0100 From: Stefan Wahren To: "David S. Miller" , Steve Glendinning Cc: UNGLinuxDriver@microchip.com, Raghuram Chary J , netdev@vger.kernel.org, linux-usb@vger.kernel.org, Stefan Wahren Subject: [PATCH] net: smsc95xx: Fix MTU range Date: Thu, 8 Nov 2018 20:38:26 +0100 Message-Id: <1541705906-2662-1-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 X-Provags-ID: V03:K1:oQ/rckY9mNY+TtCbW4YR7ojC1anLso0H9G8M4v22RW8e3Ldb85l E2dLKqBCduEhLfXz8uPs6wnJdmNWPJJVnM2fEvX//vXhmA1LLIptHcLR6O2Fir3wKhOVEZG Ipa+UCqrK0d4Dq/BwiP0n3Bw4jN2JR4R1FE3Kz4c8HWiNKQMiZxWICfZWWJ/H47HT1Hw1xP EmD2n8nEtyAkwOKKwLB7A== X-UI-Out-Filterresults: notjunk:1;V01:K0:Y78XdPk1bzI=:HE8TpIScmsVhuCUyHD7Y2m nL3WtOmGRLwMLdJlY4WN7FTdofJRbQBlRR8B2uisNCRBB0ffB8CrZIdbWnbwZESJHMDfR81GB +Hwu+npNsrcQs3L6R73wYTpPs+uaAVnVh/Lml8OrqKB79JOP5Ogj3SAU9m6XzXsmee87Zv+OQ GwlA+Nov6I+Ss0yxGshsVY01WxY6TO85LJp5uI3Y5lZVBrwp2/9S3tNx16nzzLH2fN+DSQak7 hE1WuTdjI8iEF1QGHPcuAhsZHCY59VHxPvBCyKCIf5kSY3soRiKjK17Qdn3wJjifujJeq7lUe XID5G2U1Sn8M1K3IudoWazv6mDwDNDp2qwVXUa/o1rAzqSalEBFLn0alYYlYnvF1tGutLTTKk 7wCDrErKIWejIG9Ed0QvP7GCTJDC7lu6N0JrMBPgsjlbvgOpEPfsr+676rIBw36Z935lrHB9R 8fD6FsAiYJRK1E+N1HcBsytyH8NVtLtUCnHC814nvdUahKVcLdsCMLXQ2LudSCvsDeCQiGRjP 6L9SQIZKq7wdlyz8GB8kQTZqUZOi44b5FtKxhPOzWo0vRDXOUcKpTOpZ0UHu4jLhZGbu8Z/Mr 3m28O9S4TEYlSo6mmYwe8f9BD0V/D3dc0c9+E6QuLY1oK+E0H/u0njZ26yswDrb4T6qGmmbve gVGZzhVtAalHGJx21hYMKcxbw+T7UnKwtzoSPzW7EBvdF1MxOrb7FDk/gzI5LCNg8DrB5g6+b N6e1XEoB6xNj95QN/TREUaQCAfj9SbwYphvmrl14zB4SKA93GyiW4kOWOhmKKZZCl6s59YYZ5 feAj/B++HNmoe44kqM5ApyuKf00OA== Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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 262e7a3..5974478 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;