usbnet.c (5bc65793cbf8da0d35f19ef025dda22887e79e80) | usbnet.c (3e323f3e86196eec18d6959585aa3188d060c43b) |
---|---|
1/* 2 * USB Network driver infrastructure 3 * Copyright (C) 2000-2005 by David Brownell 4 * Copyright (C) 2003-2005 David Hollis <dhollis@davehollis.com> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 939 unchanged lines hidden (view full) --- 948 entry->length = length; 949 950 usb_fill_bulk_urb (urb, dev->udev, dev->out, 951 skb->data, skb->len, tx_complete, skb); 952 953 /* don't assume the hardware handles USB_ZERO_PACKET 954 * NOTE: strictly conforming cdc-ether devices should expect 955 * the ZLP here, but ignore the one-byte packet. | 1/* 2 * USB Network driver infrastructure 3 * Copyright (C) 2000-2005 by David Brownell 4 * Copyright (C) 2003-2005 David Hollis <dhollis@davehollis.com> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 939 unchanged lines hidden (view full) --- 948 entry->length = length; 949 950 usb_fill_bulk_urb (urb, dev->udev, dev->out, 951 skb->data, skb->len, tx_complete, skb); 952 953 /* don't assume the hardware handles USB_ZERO_PACKET 954 * NOTE: strictly conforming cdc-ether devices should expect 955 * the ZLP here, but ignore the one-byte packet. |
956 * 957 * FIXME zero that byte, if it doesn't require a new skb. | |
958 */ | 956 */ |
959 if ((length % dev->maxpacket) == 0) | 957 if ((length % dev->maxpacket) == 0) { |
960 urb->transfer_buffer_length++; | 958 urb->transfer_buffer_length++; |
959 if (skb_tailroom(skb)) { 960 skb->data[skb->len] = 0; 961 __skb_put(skb, 1); 962 } 963 } |
|
961 962 spin_lock_irqsave (&dev->txq.lock, flags); 963 964 switch ((retval = usb_submit_urb (urb, GFP_ATOMIC))) { 965 case -EPIPE: 966 netif_stop_queue (net); 967 usbnet_defer_kevent (dev, EVENT_TX_HALT); 968 break; --- 341 unchanged lines hidden --- | 964 965 spin_lock_irqsave (&dev->txq.lock, flags); 966 967 switch ((retval = usb_submit_urb (urb, GFP_ATOMIC))) { 968 case -EPIPE: 969 netif_stop_queue (net); 970 usbnet_defer_kevent (dev, EVENT_TX_HALT); 971 break; --- 341 unchanged lines hidden --- |