Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1087394imm; Tue, 2 Oct 2018 02:27:32 -0700 (PDT) X-Google-Smtp-Source: ACcGV62OKQVSCgysFpNR+l+G1d6aJBWKG73Ybko2DICgmIZl1MaEsrdkrTXTAv86YI9YApAaK5JB X-Received: by 2002:a63:8f09:: with SMTP id n9-v6mr13655037pgd.222.1538472452500; Tue, 02 Oct 2018 02:27:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538472452; cv=none; d=google.com; s=arc-20160816; b=gt7zNHTeiWlvet7Loq7yjMnu7mDkFMMyeFaWBUmMJD1RBKVJySmQsUtmLDTXF+3mk0 FmOzt0fGFz7ypH5Fk2oOlBW5yfdpnGVlPSGRGII8pHEGTnU9j29I9aLg8UCGNMbnemCq 3beYmmYf+KJ7dO7Y2ug+/G0GLPs5AOeTiuHOcVpGxMMT6i7d5f/xiFySzGVULZN55au+ MikZH85HqF3Wwbt9w/0L1ZH8M4LDx5RWoiEcr1XMk3e3ACldTRAUFsB5Hz2D4xD3lfwt 1wxEUfQSfXISDM9avAoUljDW4S6EZbBFeKL6TelPuPXp1TzhMdLLERiFGaSreLHjYebP Svmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=lGW5dwsi5jxOMPCjUQeG1dXLF0G9DVeJW3E0w7lAUlg=; b=mH0o4LwFNJ6nh3YnWvrm6q/ZuRdZJ3KwEuh/MeyqtCxZ1mm7FJy4oOWUh61FdgmWlS 1MuhwZcFF+YIvPEChRD1Mmk9qIDX3IbhcP3dPq85RKKpJ53JcJMjQsHzqKFT6MKzq5mL 4wTvt1hwQr/xJ1S1Cgl82Dre7FA03YwzK/QnBBrY9YqL0ckJPd/bblmofkgT8de4UVDt bKCqf4SC3gscuPrBu594fCSrcw9A0qKkxdSruRukCe6m+OxflIRAf+zz06c8ujE9t93f r/y26hhAdC3AS6kv/its7tT/soh6Y0/HfhWWQRXLm/BeL3sWhxDf/S/Fqxk9fVqYFxDR FKrA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=codethink.co.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d130-v6si14133830pgc.189.2018.10.02.02.27.17; Tue, 02 Oct 2018 02:27:32 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=codethink.co.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727467AbeJBQJN (ORCPT + 99 others); Tue, 2 Oct 2018 12:09:13 -0400 Received: from imap1.codethink.co.uk ([176.9.8.82]:50408 "EHLO imap1.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727188AbeJBQJM (ORCPT ); Tue, 2 Oct 2018 12:09:12 -0400 Received: from [148.252.241.226] (helo=rainbowdash) by imap1.codethink.co.uk with esmtpsa (Exim 4.84_2 #1 (Debian)) id 1g7Gx6-0002zc-En; Tue, 02 Oct 2018 10:26:48 +0100 Received: from ben by rainbowdash with local (Exim 4.91) (envelope-from ) id 1g7Gx6-0000Jk-6Z; Tue, 02 Oct 2018 10:26:48 +0100 From: Ben Dooks To: netdev@vger.kernel.org Cc: oneukum@suse.com, davem@davemloft.net, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kernel@lists.codethink.co.uk, Ben Dooks Subject: [PATCH 4/4] usbnet: smsc95xx: fix rx packet alignment Date: Tue, 2 Oct 2018 10:26:45 +0100 Message-Id: <20181002092645.1115-5-ben.dooks@codethink.co.uk> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181002092645.1115-1-ben.dooks@codethink.co.uk> References: <20181002092645.1115-1-ben.dooks@codethink.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The smsc95xx driver already takes into account the NET_IP_ALIGN parameter when setting up the receive packet data, which means we do not need to worry about aligning the packets in the usbnet driver. Adding the EVENT_NO_IP_ALIGN means that the IPv4 header is now passed to the ip_rcv() routine with the start on an aligned address. Tested on Raspberry Pi B3. Signed-off-by: Ben Dooks --- drivers/net/usb/smsc95xx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c index 46385a4b8b98..2b867523cd53 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c @@ -1296,6 +1296,7 @@ static int smsc95xx_bind(struct usbnet *dev, struct usb_interface *intf) dev->net->features |= NETIF_F_RXCSUM; dev->net->hw_features = NETIF_F_IP_CSUM | NETIF_F_RXCSUM; + set_bit(EVENT_NO_IP_ALIGN, &dev->flags); smsc95xx_init_mac_address(dev); -- 2.19.0