Re: [PATCH 3/3] usb: clamp bInterval to allowed range

2013-07-01 Thread Greg KH
On Mon, Jul 01, 2013 at 07:12:07PM +0300, Felipe Balbi wrote: > On Mon, Jul 01, 2013 at 08:31:38AM -0700, Greg KH wrote: > > On Mon, Jul 01, 2013 at 05:24:18PM +0300, Felipe Balbi wrote: > > > Hi, > > > > > > On Mon, Jul 01, 2013 at 10:19:28AM -0400, Alan Stern wrote: > > > > > On Mon, Jul 01, 201

Re: [PATCH 3/3] usb: clamp bInterval to allowed range

2013-07-01 Thread Felipe Balbi
On Mon, Jul 01, 2013 at 08:31:38AM -0700, Greg KH wrote: > On Mon, Jul 01, 2013 at 05:24:18PM +0300, Felipe Balbi wrote: > > Hi, > > > > On Mon, Jul 01, 2013 at 10:19:28AM -0400, Alan Stern wrote: > > > > On Mon, Jul 01, 2013 at 09:56:37AM -0400, Alan Stern wrote: > > > > > On Mon, 1 Jul 2013, Fel

Re: [PATCH 3/3] usb: clamp bInterval to allowed range

2013-07-01 Thread Greg KH
On Mon, Jul 01, 2013 at 05:24:18PM +0300, Felipe Balbi wrote: > Hi, > > On Mon, Jul 01, 2013 at 10:19:28AM -0400, Alan Stern wrote: > > > On Mon, Jul 01, 2013 at 09:56:37AM -0400, Alan Stern wrote: > > > > On Mon, 1 Jul 2013, Felipe Balbi wrote: > > > > > > > > > bInterval must be within the rang

Re: [PATCH 3/3] usb: clamp bInterval to allowed range

2013-07-01 Thread Alan Stern
On Mon, 1 Jul 2013, Felipe Balbi wrote: > It makes sense to drop the Full/Low speed check, I'll do that and resend > :-) > > Should I add your Reviewed-by or Acked-by ? If you want to, sure... This isn't a big deal. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux

Re: [PATCH 3/3] usb: clamp bInterval to allowed range

2013-07-01 Thread Felipe Balbi
Hi, On Mon, Jul 01, 2013 at 10:19:28AM -0400, Alan Stern wrote: > > On Mon, Jul 01, 2013 at 09:56:37AM -0400, Alan Stern wrote: > > > On Mon, 1 Jul 2013, Felipe Balbi wrote: > > > > > > > bInterval must be within the range 1 - 16, > > > > > > That's true only for high speed and SuperSpeed. For

Re: [PATCH 3/3] usb: clamp bInterval to allowed range

2013-07-01 Thread Alan Stern
On Mon, 1 Jul 2013, Felipe Balbi wrote: > Hi, > > On Mon, Jul 01, 2013 at 09:56:37AM -0400, Alan Stern wrote: > > On Mon, 1 Jul 2013, Felipe Balbi wrote: > > > > > bInterval must be within the range 1 - 16, > > > > That's true only for high speed and SuperSpeed. For low speed and full > > spe

Re: [PATCH 3/3] usb: clamp bInterval to allowed range

2013-07-01 Thread Felipe Balbi
Hi, On Mon, Jul 01, 2013 at 09:56:37AM -0400, Alan Stern wrote: > On Mon, 1 Jul 2013, Felipe Balbi wrote: > > > bInterval must be within the range 1 - 16, > > That's true only for high speed and SuperSpeed. For low speed and full > speed, bInterval is allowed to range from 1 to 255. See p. 27

Re: [PATCH 3/3] usb: clamp bInterval to allowed range

2013-07-01 Thread Alan Stern
On Mon, 1 Jul 2013, Felipe Balbi wrote: > bInterval must be within the range 1 - 16, That's true only for high speed and SuperSpeed. For low speed and full speed, bInterval is allowed to range from 1 to 255. See p. 271 in the USB-2 spec. > in order to catch drivers passing a too > large bInt

Re: [PATCH 3/3] usb: clamp bInterval to allowed range

2013-07-01 Thread Felipe Balbi
Hi, On Mon, Jul 01, 2013 at 11:23:25AM +0300, Felipe Balbi wrote: > bInterval must be within the range 1 - 16, > in order to catch drivers passing a too > large bInterval (thus zeroing urb->interval), > let's clamp() the argument to the allowed > range. > > Signed-off-by: Felipe Balbi > --- > i