Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3623820imu; Mon, 28 Jan 2019 08:02:12 -0800 (PST) X-Google-Smtp-Source: ALg8bN7MpNynnOV4nGqbuW2k7LKHo/HK5mIZtz5jbbjZL6jMvR1o9MRGndhcvrtSS9U+kPhNFNtE X-Received: by 2002:a17:902:9692:: with SMTP id n18mr22719716plp.333.1548691332043; Mon, 28 Jan 2019 08:02:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548691332; cv=none; d=google.com; s=arc-20160816; b=Hl3gP/lJjA0wOdQPiWE11ESyG8N+nRJHzbvwhKglPzAijozq0ZqjcxqdIaw5h4k281 J9BErteOp0z5l5cxLLrIkUgxguo85NTWZwCJh3hypb9s0CmF4pj5mw1ZZRg+vVtMA+cB MUNwlWUjl1uI+kuyxrW/ZzZmYCQOyCnfr0TwY21BwYkzzBFmyqnf7hPO3Zbh405TJWjx TXT88iQ+YlFKcH3cS3VMBNG5YrKhYQFBEBxFlAEihY9Uoc0sh3CBhYRHLYWme69ajQwz 0B6nUtRz/ncjK0mrO62niA2305iYJAdv1LjpmuvhUMVhuYH78apxfYrxwJmNTpuZgL9k dhSw== 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 :dkim-signature; bh=Vjcur3JQb368hywDOm6Yqob/Vq3DcvdTo3JfE5THP60=; b=FPbR5XhW1HIhirlZt/GIVOcTnVZqnqb8FXmhafTvrL2ZBSTjqfD3TNuIAJ2JgZk2fz MsJm05hJLHeqrfqXNIXnbSt3qvVOjnyAZiytk2du3xMzmX3coJOT4Mweh/NrOVbTZIL0 shuvYRWx661VyCVuZs+jhL95hDFIi7v/iIFfV8y9batL1Eab5FTcRX2a3yt49jJr6a9D FtVTzvAZzNNppvtM5er0eu7ZRtXYelEAMxLTbA4US7TogOgdI5n/ZylHHPHfXcoljDfh R1MGYrHCPtf67ZhxklIF7SPWtiozbaahRcCIM731QiHC7/S/GioZsDKRS+EZ38m4SBND zY7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=w8Dffjvf; 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 l8si32567384pgm.250.2019.01.28.08.01.56; Mon, 28 Jan 2019 08:02:11 -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=w8Dffjvf; 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 S1730414AbfA1QB0 (ORCPT + 99 others); Mon, 28 Jan 2019 11:01:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:46666 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728400AbfA1QBY (ORCPT ); Mon, 28 Jan 2019 11:01:24 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (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 28C7621852; Mon, 28 Jan 2019 16:01:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548691283; bh=iCCSXK/Lkk6+ccBTbCCmQn/WVVsaCZUwrXp2Z63VazE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=w8DffjvfOU4enS1JKTWfNM1YLIR6VQ/o+LMgmZAdDDSgA1O+Ig23CUribqgQ3WYwS MKfR/+dyCZWhmmt6c1X/K80Gz5iYAsa2zxM6rc317CbqDb8P3dXUSbpeqOCK3vJqWY 7CMDz77BWvPXwoEFMqa6vnVKfQlqCP54KG3il87A= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Ben Dooks , "David S . Miller" , Sasha Levin , netdev@vger.kernel.org, linux-usb@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 045/258] usbnet: smsc95xx: fix rx packet alignment Date: Mon, 28 Jan 2019 10:55:51 -0500 Message-Id: <20190128155924.51521-45-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190128155924.51521-1-sashal@kernel.org> References: <20190128155924.51521-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ben Dooks [ Upstream commit 810eeb1f41a9a272eedc94ca18c072e75678ede4 ] 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 Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- 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 f2d01cb6f958..6e971628bb50 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c @@ -1295,6 +1295,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