Re: bug in handling of highspeed usb HID devices

From: Christian Krause
Date: Wed Oct 12 2005 - 16:42:39 EST


On Wed, 12 Oct 2005 21:10:53 +0000, kernel-stuff wrote:
>> Re-calculation in usb_fill_int_urb makes more sense, because it is the
>> most general approach. So it would make sense to remove it from
>> hid-core.c.

> Patch looks correct to me from a purely logical perspective. (IOW I
> read that file first time :)

> But since interval is passed as a parameter to the usb_fill_int_urb()
> function, I think it is more natural to remove the recalculation from
> usb_fill_int_urb() - If caller passes a parameter and has enough info
> to determine its value, it makes sense for the caller to pass in the
> right value and the callee to just take it as it is.

Yes, but in this case we have to check all callers of usb_fill_int_urb
to do the recalculation. E.g. in input/usbmouse.c
endpoint->bInterval is used directly as parameter to usb_fill_int_urb.

To avoid breaking things (my suggested patch has no impact on any other
usb driver) and to solve the problem shortly, I suggest to
use my patch and do some kind of refactoring later (You are right,
for a clean interface the interval parameter should have the same
meaning independend of the speed).

Best regards,

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at