diff options
Diffstat (limited to 'drivers/net/irda/irda-usb.c')
-rw-r--r-- | drivers/net/irda/irda-usb.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c index 46e0022d3258..6c766fdc51a6 100644 --- a/drivers/net/irda/irda-usb.c +++ b/drivers/net/irda/irda-usb.c | |||
@@ -267,7 +267,7 @@ static void irda_usb_change_speed_xbofs(struct irda_usb_cb *self) | |||
267 | frame, IRDA_USB_SPEED_MTU, | 267 | frame, IRDA_USB_SPEED_MTU, |
268 | speed_bulk_callback, self); | 268 | speed_bulk_callback, self); |
269 | urb->transfer_buffer_length = USB_IRDA_HEADER; | 269 | urb->transfer_buffer_length = USB_IRDA_HEADER; |
270 | urb->transfer_flags = URB_ASYNC_UNLINK; | 270 | urb->transfer_flags = 0; |
271 | 271 | ||
272 | /* Irq disabled -> GFP_ATOMIC */ | 272 | /* Irq disabled -> GFP_ATOMIC */ |
273 | if ((ret = usb_submit_urb(urb, GFP_ATOMIC))) { | 273 | if ((ret = usb_submit_urb(urb, GFP_ATOMIC))) { |
@@ -401,15 +401,12 @@ static int irda_usb_hard_xmit(struct sk_buff *skb, struct net_device *netdev) | |||
401 | skb->data, IRDA_SKB_MAX_MTU, | 401 | skb->data, IRDA_SKB_MAX_MTU, |
402 | write_bulk_callback, skb); | 402 | write_bulk_callback, skb); |
403 | urb->transfer_buffer_length = skb->len; | 403 | urb->transfer_buffer_length = skb->len; |
404 | /* Note : unlink *must* be Asynchronous because of the code in | ||
405 | * irda_usb_net_timeout() -> call in irq - Jean II */ | ||
406 | urb->transfer_flags = URB_ASYNC_UNLINK; | ||
407 | /* This flag (URB_ZERO_PACKET) indicates that what we send is not | 404 | /* This flag (URB_ZERO_PACKET) indicates that what we send is not |
408 | * a continuous stream of data but separate packets. | 405 | * a continuous stream of data but separate packets. |
409 | * In this case, the USB layer will insert an empty USB frame (TD) | 406 | * In this case, the USB layer will insert an empty USB frame (TD) |
410 | * after each of our packets that is exact multiple of the frame size. | 407 | * after each of our packets that is exact multiple of the frame size. |
411 | * This is how the dongle will detect the end of packet - Jean II */ | 408 | * This is how the dongle will detect the end of packet - Jean II */ |
412 | urb->transfer_flags |= URB_ZERO_PACKET; | 409 | urb->transfer_flags = URB_ZERO_PACKET; |
413 | 410 | ||
414 | /* Generate min turn time. FIXME: can we do better than this? */ | 411 | /* Generate min turn time. FIXME: can we do better than this? */ |
415 | /* Trying to a turnaround time at this level is trying to measure | 412 | /* Trying to a turnaround time at this level is trying to measure |
@@ -630,8 +627,6 @@ static void irda_usb_net_timeout(struct net_device *netdev) | |||
630 | * in completion handler, because urb->status will | 627 | * in completion handler, because urb->status will |
631 | * be -ENOENT. We will fix that at the next watchdog, | 628 | * be -ENOENT. We will fix that at the next watchdog, |
632 | * leaving more time to USB to recover... | 629 | * leaving more time to USB to recover... |
633 | * Also, we are in interrupt, so we need to have | ||
634 | * URB_ASYNC_UNLINK to work properly... | ||
635 | * Jean II */ | 630 | * Jean II */ |
636 | done = 1; | 631 | done = 1; |
637 | break; | 632 | break; |
@@ -1008,9 +1003,7 @@ static int irda_usb_net_close(struct net_device *netdev) | |||
1008 | } | 1003 | } |
1009 | } | 1004 | } |
1010 | /* Cancel Tx and speed URB - need to be synchronous to avoid races */ | 1005 | /* Cancel Tx and speed URB - need to be synchronous to avoid races */ |
1011 | self->tx_urb->transfer_flags &= ~URB_ASYNC_UNLINK; | ||
1012 | usb_kill_urb(self->tx_urb); | 1006 | usb_kill_urb(self->tx_urb); |
1013 | self->speed_urb->transfer_flags &= ~URB_ASYNC_UNLINK; | ||
1014 | usb_kill_urb(self->speed_urb); | 1007 | usb_kill_urb(self->speed_urb); |
1015 | 1008 | ||
1016 | /* Stop and remove instance of IrLAP */ | 1009 | /* Stop and remove instance of IrLAP */ |
@@ -1521,9 +1514,7 @@ static void irda_usb_disconnect(struct usb_interface *intf) | |||
1521 | usb_kill_urb(self->rx_urb[i]); | 1514 | usb_kill_urb(self->rx_urb[i]); |
1522 | /* Cancel Tx and speed URB. | 1515 | /* Cancel Tx and speed URB. |
1523 | * Toggle flags to make sure it's synchronous. */ | 1516 | * Toggle flags to make sure it's synchronous. */ |
1524 | self->tx_urb->transfer_flags &= ~URB_ASYNC_UNLINK; | ||
1525 | usb_kill_urb(self->tx_urb); | 1517 | usb_kill_urb(self->tx_urb); |
1526 | self->speed_urb->transfer_flags &= ~URB_ASYNC_UNLINK; | ||
1527 | usb_kill_urb(self->speed_urb); | 1518 | usb_kill_urb(self->speed_urb); |
1528 | } | 1519 | } |
1529 | 1520 | ||