diff options
| author | Gary King <gking@nvidia.com> | 2009-12-07 20:45:09 -0800 |
|---|---|---|
| committer | Gary King <gking@nvidia.com> | 2009-12-08 13:52:57 -0800 |
| commit | 6684ee87cd190812667b878f5997d1fcf9ed7753 (patch) | |
| tree | c62e5184502f913efafc0b8c91cceab8af4536db | |
| parent | 04962a30fa71607db6e1989e846c352d9e5fbe35 (diff) | |
usbnet: add FLAG_SEND_ZLP
some hardware requires transmitting zero-length packets and not the one-byte
packet that is currently being transmitted
| -rw-r--r-- | drivers/net/usb/usbnet.c | 2 | ||||
| -rw-r--r-- | include/linux/usb/usbnet.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index c32284ff3f54..fa080e191ddf 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c @@ -961,7 +961,7 @@ static int usbnet_start_xmit (struct sk_buff *skb, struct net_device *net) * NOTE: strictly conforming cdc-ether devices should expect * the ZLP here, but ignore the one-byte packet. */ - if ((length % dev->maxpacket) == 0) { + if (!(info->flags & FLAG_SEND_ZLP) &&(length % dev->maxpacket) == 0) { urb->transfer_buffer_length++; if (skb_tailroom(skb)) { skb->data[skb->len] = 0; diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index 7d3822243074..8c1e892f395d 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h @@ -87,6 +87,7 @@ struct driver_info { #define FLAG_FRAMING_AX 0x0040 /* AX88772/178 packets */ #define FLAG_WLAN 0x0080 /* use "wlan%d" names */ +#define FLAG_SEND_ZLP 0x0200 /* hw requires sending ZLPs */ /* init device ... can sleep, or cause probe() failure */ |
