Re: [PATCH] Re: 2.6.9-rc1-mm4, visor.c, Badness in usb_unlink_urb

From: Borislav Petkov
Date: Fri Sep 10 2004 - 13:25:53 EST


Hi Greg,
I'll be happy to tackle the other drivers. Question: Does usb_unlink_urb have
to be replaced only for synchronious unlinking and if so, is the wrapping
function responsible for checking the URB_ASYNC_UNLINK transfer flag? Here's
a patch:

Signed-off-by: Borislav Petkov <petkov@xxxxxxxxxxxxxxx>

--- linux-2.6.9-rc1-mm/drivers/usb/class/audio.c.orig 2004-09-10 20:05:17.000000000 +0200
+++ linux-2.6.9-rc1-mm/drivers/usb/class/audio.c 2004-09-10 20:23:12.000000000 +0200
@@ -635,13 +635,13 @@ static void usbin_stop(struct usb_audiod
spin_unlock_irqrestore(&as->lock, flags);
if (notkilled && signal_pending(current)) {
if (i & FLG_URB0RUNNING)
- usb_unlink_urb(u->durb[0].urb);
+ usb_kill_urb(u->durb[0].urb);
if (i & FLG_URB1RUNNING)
- usb_unlink_urb(u->durb[1].urb);
+ usb_kill_urb(u->durb[1].urb);
if (i & FLG_SYNC0RUNNING)
- usb_unlink_urb(u->surb[0].urb);
+ usb_kill_urb(u->surb[0].urb);
if (i & FLG_SYNC1RUNNING)
- usb_unlink_urb(u->surb[1].urb);
+ usb_kill_urb(u->surb[1].urb);
notkilled = 0;
}
}
@@ -1114,13 +1114,13 @@ static void usbout_stop(struct usb_audio
spin_unlock_irqrestore(&as->lock, flags);
if (notkilled && signal_pending(current)) {
if (i & FLG_URB0RUNNING)
- usb_unlink_urb(u->durb[0].urb);
+ usb_kill_urb(u->durb[0].urb);
if (i & FLG_URB1RUNNING)
- usb_unlink_urb(u->durb[1].urb);
+ usb_kill_urb(u->durb[1].urb);
if (i & FLG_SYNC0RUNNING)
- usb_unlink_urb(u->surb[0].urb);
+ usb_kill_urb(u->surb[0].urb);
if (i & FLG_SYNC1RUNNING)
- usb_unlink_urb(u->surb[1].urb);
+ usb_kill_urb(u->surb[1].urb);
notkilled = 0;
}
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/