linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Dooks <ben.dooks@codethink.co.uk>
To: netdev@vger.kernel.org
Cc: oneukum@suse.com, davem@davemloft.net, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org, steve.glendinning@shawell.net,
	linux-kernel@lists.codethink.co.uk,
	Ben Dooks <ben.dooks@codethink.co.uk>
Subject: [PATCH 1/4] usbnet: smsc95xx: fix rx packet alignment
Date: Wed, 14 Nov 2018 11:50:19 +0000	[thread overview]
Message-ID: <20181114115022.9584-2-ben.dooks@codethink.co.uk> (raw)
In-Reply-To: <20181114115022.9584-1-ben.dooks@codethink.co.uk>

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@codethink.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


  reply	other threads:[~2018-11-14 11:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-14 11:50 SMSC95xx driver updates (round 1) Ben Dooks
2018-11-14 11:50 ` Ben Dooks [this message]
2018-11-14 11:50 ` [PATCH 2/4] usbnet: smsc95xx: simplify tx_fixup code Ben Dooks
2018-11-14 11:50 ` [PATCH 3/4] usbnet: smsc95xx: fix memcpy for accessing rx-data Ben Dooks
2018-11-14 11:50 ` [PATCH 4/4] usbnet: smsc95xx: check for csum being in last four bytes Ben Dooks
2018-11-14 15:59   ` Sergei Shtylyov
2018-11-14 11:58 ` SMSC95xx driver updates (round 1) Oliver Neukum
2018-11-15 18:06 ` Woojung.Huh
2018-11-16 10:49   ` Ben Dooks
2018-11-17  4:16 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181114115022.9584-2-ben.dooks@codethink.co.uk \
    --to=ben.dooks@codethink.co.uk \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@lists.codethink.co.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oneukum@suse.com \
    --cc=steve.glendinning@shawell.net \
    --subject='Re: [PATCH 1/4] usbnet: smsc95xx: fix rx packet alignment' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
on how to clone and mirror all data and code used for this inbox