> This patch only modifies the hcd.c file, so only the ohci-hcd and
> ehci-hcd drivers will take ownership over a urb, but the other drivers
> still work right now.
That seems like the right way to go. Soonish, we'll expect
only the UHCI drivers to need converting ... :)
I still don't see a real benefit in this mechanism, but if it's
going to be done, then these were the two places to add
it in the "hcd.c" file. But the update to "hcd.c" is much
more involved than they need to be:
> --- a/drivers/usb/hcd.c Tue Jan 29 00:21:56 2002
> +++ b/drivers/usb/hcd.c Tue Jan 29 00:21:57 2002
> @@ -916,8 +922,9 @@
> /* may be called in any context with a valid urb->dev usecount */
> /* caller surrenders "ownership" of urb (and chain at urb->next). */
>
> -static int hcd_submit_urb (struct urb *urb)
> +static int hcd_submit_urb (struct urb *new_urb)
> {
> + struct urb *urb;
> int status;
> struct usb_hcd *hcd;
> struct hcd_dev *dev;
Errm -- why not just do urb = usb_get_urb ()? There's
no need to rename the parameter.
Just increment the counter as part of linking it onto the
device's urb list. No failure test is even needed, and all
the existing cleanup paths will handle decrementing that
counter appropriately. That'll be a much smaller/cleaner
patch ... :)
- Dave
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel