mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christian Krause <chkr@plauener.de>
To: kernel-stuff@comcast.net
Cc: linux-kernel@vger.kernel.org
Subject: Re: bug in handling of highspeed usb HID devices
Date: Wed, 12 Oct 2005 23:42:17 +0200	[thread overview]
Message-ID: <m3zmpev2di.fsf@gondor.middle-earth.priv> (raw)
In-Reply-To: <101220052110.3094.434D7BDD0001F67000000C1622007621949D0E050B9A9D0E99@comcast.net> (kernel-stuff@comcast.net's message of "Wed, 12 Oct 2005 21:10:53 +0000")

Hi,

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,
Christian



  reply	other threads:[~2005-10-12 21:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-12 21:10 kernel-stuff
2005-10-12 21:42 ` Christian Krause [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-10-14 15:21 kernel-stuff
2005-10-14  2:10 Parag Warudkar
2005-10-14  3:31 ` Greg KH
2005-10-13 20:11 Parag Warudkar
2005-10-13 20:25 ` Andrew Morton
2005-10-12 23:32 Parag Warudkar
2005-10-13 18:05 ` Christian Krause
2005-10-12 19:55 Christian Krause
2005-10-13 22:48 ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3zmpev2di.fsf@gondor.middle-earth.priv \
    --to=chkr@plauener.de \
    --cc=kernel-stuff@comcast.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®