From: Ian Coolidge <iancoolidge@gmail.com>
To: Oliver Neukum <oliver@neukum.name>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Felipe Balbi <balbi@ti.com>,
linux-usb@vger.kernel.org, netdev@vger.kernel.org
Cc: Ian Coolidge <iancoolidge@gmail.com>
Subject: [PATCH 2/2] net: usb: cdc_eem: Fix rx skb allocation for 802.1Q VLANs
Date: Tue, 6 Nov 2012 13:00:11 -0800 [thread overview]
Message-ID: <1352235611-13066-3-git-send-email-iancoolidge@gmail.com> (raw)
In-Reply-To: <1352235611-13066-1-git-send-email-iancoolidge@gmail.com>
cdc_eem frames might need to contain 802.1Q VLAN Ethernet frames.
Provide this information as an override to usbnet->rx_urb_size
Signed-off-by: Ian Coolidge <iancoolidge@gmail.com>
---
drivers/net/usb/cdc_eem.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/net/usb/cdc_eem.c b/drivers/net/usb/cdc_eem.c
index 439690b..63c38dc 100644
--- a/drivers/net/usb/cdc_eem.c
+++ b/drivers/net/usb/cdc_eem.c
@@ -31,6 +31,7 @@
#include <linux/usb/cdc.h>
#include <linux/usb/usbnet.h>
#include <linux/gfp.h>
+#include <linux/if_vlan.h>
/*
@@ -94,6 +95,9 @@ static int eem_bind(struct usbnet *dev, struct usb_interface *intf)
dev->net->hard_header_len += EEM_HEAD + ETH_FCS_LEN;
+ /* octets we need to rx for a single ethernet frame */
+ dev->rx_urb_size = EEM_HEAD + ETH_FCS_LEN + VLAN_ETH_FRAME_LEN;
+
return 0;
}
--
1.7.6.5
next prev parent reply other threads:[~2012-11-06 20:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-06 21:00 [PATCH 0/2] Fix CDC_EEM with 802.1Q VLAN and 1500 MTU Ian Coolidge
2012-11-06 21:00 ` [PATCH 1/2] usb: gadget: g_ether: fix frame size check Ian Coolidge
2012-11-06 21:00 ` Ian Coolidge [this message]
[not found] ` <1352235611-13066-1-git-send-email-iancoolidge-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-11-07 21:56 ` [PATCH 0/2] Fix CDC_EEM with 802.1Q VLAN and 1500 MTU 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=1352235611-13066-3-git-send-email-iancoolidge@gmail.com \
--to=iancoolidge@gmail.com \
--cc=balbi@ti.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=oliver@neukum.name \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).