Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp494608imm; Fri, 12 Oct 2018 01:36:58 -0700 (PDT) X-Google-Smtp-Source: ACcGV62wIEB89Yo3ds7QP+YuVe6Ob8v5boF8/Ch2QvY8jeb4Vk4zw3IEMPWzvLpXO8go5szVRt60 X-Received: by 2002:a17:902:8eca:: with SMTP id x10-v6mr4980394plo.336.1539333418614; Fri, 12 Oct 2018 01:36:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539333418; cv=none; d=google.com; s=arc-20160816; b=P6WZXkfPmNJjeH0tZYemOXHacmwCH3zUHYHm2a1ieuqK+6dycG+8WOUz4LPjQ/pmv6 qm7iSE/iieNlMkP+Pwy7KD1uwwaRAVCFLrP8ZZ5avzERDCuWN7cEs/WO8syUEKgm5LwS eI83POx5RRvDcpI5t1sG1ABbioussuNSa+1KdPlnwPJSSJ7MeKrqAEcq9z1MvVITVY5g a8fAqw7QZLtAxTOo3/GxwVlmvxwqraPqoFdM6Y6spceW7o4SVFaTy7ZPDGt1SfzUAFXm K+wyl4SvqvHHgcdccetaLqCNpaBgGwfBEC/O0LWb79elrwQHSmSWy68lwdaDPVxtErTJ WzsA== 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=ktAnC3rMj1kzk8m7VHhs2tQmSuwORVPEsODVsDeiri4=; b=GAE3JYZIB0VEvXAqwykBV/DsScX4dn/0tuSTW0Ll8hArtQCQaU8MJesH6GxOMAHZHC +fNCngCWAyHt6qnfpX3QI3IT5xgfYn5D8kVn7wmaiU+fCtur7rPWtdn6ETQQAEjuNVDh JEfzmaM8ihZdX8A4Kh9d2gfGGDf+oeCxcMfApeYeWmETcCYsSbispN05vd9o8icFjiWZ Jd85Li7fIxSDmuioIrEasAXKfTCZiTmHotRVowGLFNbL+u6+lro17ktdVbAORnKmrNuK /2FH4raDieEcPq8JRUI4FYkLrLu2QMmHMtEo8roXQA4F1vPyL89/8U5wH3GjLNTMo3Vo TVZg== 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 g11-v6si629446plq.5.2018.10.12.01.36.44; Fri, 12 Oct 2018 01:36:58 -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 S1728004AbeJLQFd (ORCPT + 99 others); Fri, 12 Oct 2018 12:05:33 -0400 Received: from imap1.codethink.co.uk ([176.9.8.82]:48202 "EHLO imap1.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727370AbeJLQFc (ORCPT ); Fri, 12 Oct 2018 12:05:32 -0400 Received: from [148.252.241.226] (helo=rainbowdash) by imap1.codethink.co.uk with esmtpsa (Exim 4.84_2 #1 (Debian)) id 1gAstc-0005TX-FL; Fri, 12 Oct 2018 09:34:08 +0100 Received: from ben by rainbowdash with local (Exim 4.91) (envelope-from ) id 1gAstc-00052V-3S; Fri, 12 Oct 2018 09:34:08 +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 1/8] usbnet: smsc95xx: fix rx packet alignment Date: Fri, 12 Oct 2018 09:33:58 +0100 Message-Id: <20181012083405.19246-2-ben.dooks@codethink.co.uk> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181012083405.19246-1-ben.dooks@codethink.co.uk> References: <20181012083405.19246-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 06b4d290784d..401ec9feb495 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c @@ -1292,6 +1292,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.1