[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181114115022.9584-2-ben.dooks@codethink.co.uk>
Date: Wed, 14 Nov 2018 11:50:19 +0000
From: Ben Dooks <ben.dooks@...ethink.co.uk>
To: netdev@...r.kernel.org
Cc: oneukum@...e.com, davem@...emloft.net, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org, steve.glendinning@...well.net,
linux-kernel@...ts.codethink.co.uk,
Ben Dooks <ben.dooks@...ethink.co.uk>
Subject: [PATCH 1/4] usbnet: smsc95xx: fix rx packet alignment
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 <ben.dooks@...ethink.co.uk>
---
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
Powered by blists - more mailing lists