ChangeSet 1.2000.12.14, 2004/10/22 11:08:25-07:00, [EMAIL PROTECTED]

[PATCH] kaweth: full conversion to usb_unlink_urb

kaweth used its own synchronisation superseded by usb_unlink_urb().

Signed-off-by: Oliver Neukum <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>


 drivers/usb/net/kaweth.c |   13 +++----------
 1 files changed, 3 insertions(+), 10 deletions(-)


diff -Nru a/drivers/usb/net/kaweth.c b/drivers/usb/net/kaweth.c
--- a/drivers/usb/net/kaweth.c  2004-10-22 16:11:43 -07:00
+++ b/drivers/usb/net/kaweth.c  2004-10-22 16:11:43 -07:00
@@ -729,7 +729,8 @@
        struct sk_buff *skb = kaweth->tx_skb;
 
        if (unlikely(urb->status != 0))
-               kaweth_dbg("%s: TX status %d.", kaweth->net->name, urb->status);
+               if (urb->status != -ENOENT)
+                       kaweth_dbg("%s: TX status %d.", kaweth->net->name, 
urb->status);
 
        netif_wake_queue(kaweth->net);
        dev_kfree_skb_irq(skb);
@@ -1137,15 +1138,7 @@
        kaweth->removed = 1;
        usb_kill_urb(kaweth->irq_urb);
        usb_kill_urb(kaweth->rx_urb);
-
-       /* we need to wait for the urb to be cancelled, if it is active */
-       spin_lock(&kaweth->device_lock);
-       if (usb_unlink_urb(kaweth->tx_urb) == -EINPROGRESS) {
-               spin_unlock(&kaweth->device_lock);
-               wait_event(kaweth->term_wait, kaweth->end);
-       } else {
-               spin_unlock(&kaweth->device_lock);
-       }
+       usb_kill_urb(kaweth->tx_urb);
 
        kaweth_dbg("Unregistering net device");
        unregister_netdev(netdev);



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to