Re: [linux-usb-devel] Bug in devio.c

2003-01-16 Thread oliver stieber
On Thursday 16 Jan 2003 8:22 pm, Greg KH wrote: > On Thu, Jan 16, 2003 at 08:10:26PM +, oliver stieber wrote: > > Patch taking account of log2 intervals for iso and interrupt urbs. > Do you really want to fall through here? > > greg k-h oops I've put the blank line back in too. --- linux

Re: [linux-usb-devel] Bug in devio.c

2003-01-16 Thread Greg KH
On Thu, Jan 16, 2003 at 08:10:26PM +, oliver stieber wrote: > Patch taking account of log2 intervals for iso and interrupt urbs. > > > --- linux-2.5.54/drivers/usb/core/devio.c 2003-01-02 03:22:02.0 + > +++ /usr/src/linux/drivers/usb/core/devio.c 2003-01-16 20:04:52.

Re: [linux-usb-devel] Bug in devio.c

2003-01-16 Thread oliver stieber
Patch taking account of log2 intervals for iso and interrupt urbs. --- linux-2.5.54/drivers/usb/core/devio.c 2003-01-02 03:22:02.0 + +++ /usr/src/linux/drivers/usb/core/devio.c 2003-01-16 20:04:52.0 + @@ -854,13 +854,21 @@ return -EINVAL;

Re: [linux-usb-devel] Bug in devio.c

2003-01-15 Thread David Brownell
Wouldn't it make sense to have a conversion function in usb.c, something like: It hasn't been necessary so far, which is why I didn't bother defining one last summer when this came up. There aren't many ISO devices/driver; and ones using interrupt transfers can just as easily call usb_fill_int_u

Re: [linux-usb-devel] Bug in devio.c

2003-01-15 Thread oliver stieber
On Wednesday 15 Jan 2003 10:12 pm, Dan Streetman wrote: > On Wed, 15 Jan 2003, David Brownell wrote: > >> Hmm, so should the conversion from bInterval to ms-interval happen in > >> the driver, or in the core? It seems to me that it would be better to > >> handle that conversion in the core...? > >

Re: [linux-usb-devel] Bug in devio.c

2003-01-15 Thread Dan Streetman
On Wed, 15 Jan 2003, David Brownell wrote: > >> Hmm, so should the conversion from bInterval to ms-interval happen in the >> driver, or in the core? It seems to me that it would be better to handle >> that conversion in the core...? > >We had that discussion last summer, and the resolution >was

Re: [linux-usb-devel] Bug in devio.c

2003-01-15 Thread David Brownell
Hmm, so should the conversion from bInterval to ms-interval happen in the driver, or in the core? It seems to me that it would be better to handle that conversion in the core...? We had that discussion last summer, and the resolution was that fill_int_urb() does it ... ISO drivers don't have

Re: [linux-usb-devel] Bug in devio.c

2003-01-15 Thread oliverthered
On Wed, 2003-01-15 at 20:38, Dan Streetman wrote: > On Wed, 15 Jan 2003, oliverthered wrote: > > >Oh what fun.. > > yes, hurray for the usb spec writers... ;-) > > >I'll make a patch to fit the specification. > > let's agree on where to put it first; if it goes into the core (either > gene

Re: [linux-usb-devel] Bug in devio.c

2003-01-15 Thread Dan Streetman
On Wed, 15 Jan 2003, oliverthered wrote: >Oh what fun.. yes, hurray for the usb spec writers... ;-) >I'll make a patch to fit the specification. let's agree on where to put it first; if it goes into the core (either generic hcd, or uhci/ohci/ehci) then the conversion only has to be done

Re: [linux-usb-devel] Bug in devio.c

2003-01-15 Thread Dan Streetman
On Wed, 15 Jan 2003, David Brownell wrote: >oliverthered wrote: >> On Wed, 2003-01-15 at 17:42, David Brownell wrote: >> + if(!(ep_desc = usb_epnum_to_ep_desc(ps->dev, uurb.endpoint))) + return -ENOENT; + interval = ep_desc->bInterval; +

Re: [linux-usb-devel] Bug in devio.c

2003-01-15 Thread oliverthered
On Wed, 2003-01-15 at 19:38, David Brownell wrote: > oliverthered wrote: > > On Wed, 2003-01-15 at 17:42, David Brownell wrote: > > > >>>+ if(!(ep_desc = usb_epnum_to_ep_desc(ps->dev, uurb.endpoint))) > >>>+ return -ENOENT; > >>>+ interval = ep_desc->bInterval; >

Re: [linux-usb-devel] Bug in devio.c

2003-01-15 Thread oliverthered
On Wed, 2003-01-15 at 19:38, David Brownell wrote: > oliverthered wrote: > > On Wed, 2003-01-15 at 17:42, David Brownell wrote: > > > >>>+ if(!(ep_desc = usb_epnum_to_ep_desc(ps->dev, uurb.endpoint))) > >>>+ return -ENOENT; > >>>+ interval = ep_desc->bInterval; >

Re: [linux-usb-devel] Bug in devio.c

2003-01-15 Thread David Brownell
oliverthered wrote: On Wed, 2003-01-15 at 17:42, David Brownell wrote: + if(!(ep_desc = usb_epnum_to_ep_desc(ps->dev, uurb.endpoint))) + return -ENOENT; + interval = ep_desc->bInterval; + Shouldn't it be "interval = 1 << (ep_desc->bInterval -1);" instead? For iso, bInterval is always a l

Re: [linux-usb-devel] Bug in devio.c

2003-01-15 Thread oliverthered
On Wed, 2003-01-15 at 17:42, David Brownell wrote: > > + if(!(ep_desc = usb_epnum_to_ep_desc(ps->dev, uurb.endpoint))) > > + return -ENOENT; > > + interval = ep_desc->bInterval; > > + > > Shouldn't it be "interval = 1 << (ep_desc->bInterval -1);" in

Re: [linux-usb-devel] Bug in devio.c

2003-01-15 Thread David Brownell
+ if(!(ep_desc = usb_epnum_to_ep_desc(ps->dev, uurb.endpoint))) + return -ENOENT; + interval = ep_desc->bInterval; + Shouldn't it be "interval = 1 << (ep_desc->bInterval -1);" instead? For iso, bInterval is always a log2 encoding. ---

Re: [linux-usb-devel] Bug in devio.c

2003-01-15 Thread Dan Streetman
On Wed, 15 Jan 2003, oliverthered wrote: >Changes to usb_epnum_to_ep and usb_epnum_to_ep will break drivers that >require an alt_setting other than 0 but fail to call setinterface. drivers that attempt to use inactive alternate settings are broken; so hopefully there aren't any. -- Dan Stree

Re: [linux-usb-devel] Bug in devio.c

2003-01-15 Thread oliverthered
On Wed, 2003-01-15 at 08:58, Greg KH wrote: > On Wed, Jan 15, 2003 at 01:54:22AM +, oliverthered wrote: > > > > > > On Wed, 2003-01-15 at 01:33, Greg KH wrote: > > > On Tue, Jan 14, 2003 at 11:58:04PM +, oliverthered wrote: > > > > > > > > Any comments? > > > > > > Your patch is line wr

Re: [linux-usb-devel] Bug in devio.c

2003-01-15 Thread Greg KH
On Wed, Jan 15, 2003 at 01:54:22AM +, oliverthered wrote: > > > On Wed, 2003-01-15 at 01:33, Greg KH wrote: > > On Tue, Jan 14, 2003 at 11:58:04PM +, oliverthered wrote: > > > > > > Any comments? > > > > Your patch is line wrapped, mind fixing your mailer and trying again? > see attache

Re: [linux-usb-devel] Bug in devio.c

2003-01-14 Thread ddstreet
On Tue, 15 Jan 2003, oliverthered wrote: >checkintf claims the interface if it's not claimed, I'm not sure this is >the 'best' thing to do, that's a completely different discussion. > since you get into the problems of picking the >first interface where bEndpointAddress matches the request, whi

Re: [linux-usb-devel] Bug in devio.c

2003-01-14 Thread oliverthered
On Wed, 2003-01-15 at 01:33, Greg KH wrote: > On Tue, Jan 14, 2003 at 11:58:04PM +, oliverthered wrote: > > > > Any comments? > > Your patch is line wrapped, mind fixing your mailer and trying again? see attached. (If anyone knows how to turn line wrap off in evolution let me know.) --

Re: [linux-usb-devel] Bug in devio.c

2003-01-14 Thread oliverthered
On Wed, 2003-01-15 at 01:20, [EMAIL PROTECTED] wrote: > You are pointing out 2 valid bugs: > > -findintfep, findintfif, and usb_epnum_to_ep_desc incorrectly check > inactive alternate settings. > -proc_submiturb does not set the interval for ISO transfers. > > however findintfep should _not_ ch

Re: [linux-usb-devel] Bug in devio.c

2003-01-14 Thread Greg KH
On Tue, Jan 14, 2003 at 11:58:04PM +, oliverthered wrote: > > Any comments? Your patch is line wrapped, mind fixing your mailer and trying again? thanks, greg k-h --- This SF.NET email is sponsored by: Take your first step towards giving

Re: [linux-usb-devel] Bug in devio.c

2003-01-14 Thread ddstreet
You are pointing out 2 valid bugs: -findintfep, findintfif, and usb_epnum_to_ep_desc incorrectly check inactive alternate settings. -proc_submiturb does not set the interval for ISO transfers. however findintfep should _not_ check if the interface is claimed, as that's the job of checkintf. A