linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* usb_fill_bulk_urb() broken for USB1.1?
@ 2007-06-26 14:20 Keith Chew
  2007-06-26 17:52 ` Chuck Ebbert
  0 siblings, 1 reply; 8+ messages in thread
From: Keith Chew @ 2007-06-26 14:20 UTC (permalink / raw)
  To: linux-kernel

Hi

We have been using a Zydas based WIFI drivers under kernel 2.6.16.18
with great success. Recently, when we upgraded to 2.6.20.1 (also
tested on 2.6.21.5), we found that during initialisation, these calls
works with USB2.0 but stopped working on USB1.1:

usb_fill_bulk_urb();
usb_submit_urb();

The error code returned is -22 (-EINVAL). In 2.6.16.18, it works for
both USB2.0 and 1.1.

When we change to use usb_fill_int_urb(), it then works for USB1.1,
but takes up to 15 seconds (usually less than 5 seconds) for the
driver to initialise. Also, usb_fill_int_urb() does not work for
USB2.0 (kernel panic).

Can anyone point us to the right direction on how to get
usb_fill_bulk_urb() working on USB1.1? We need this as not all of the
deployed machines have USB2.0 enabled.

Regards
Keith

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: usb_fill_bulk_urb() broken for USB1.1?
  2007-06-26 14:20 usb_fill_bulk_urb() broken for USB1.1? Keith Chew
@ 2007-06-26 17:52 ` Chuck Ebbert
  2007-06-26 19:30   ` Pete Zaitcev
                     ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Chuck Ebbert @ 2007-06-26 17:52 UTC (permalink / raw)
  To: Keith Chew; +Cc: linux-kernel, USB development list

On 06/26/2007 10:20 AM, Keith Chew wrote:

[cc: linux-usb-devel]

> We have been using a Zydas based WIFI drivers under kernel 2.6.16.18
> with great success. Recently, when we upgraded to 2.6.20.1 (also
> tested on 2.6.21.5), we found that during initialisation, these calls
> works with USB2.0 but stopped working on USB1.1:
> 
> usb_fill_bulk_urb();
> usb_submit_urb();
> 
> The error code returned is -22 (-EINVAL). In 2.6.16.18, it works for
> both USB2.0 and 1.1.
> 
> When we change to use usb_fill_int_urb(), it then works for USB1.1,
> but takes up to 15 seconds (usually less than 5 seconds) for the
> driver to initialise. Also, usb_fill_int_urb() does not work for
> USB2.0 (kernel panic).
> 
> Can anyone point us to the right direction on how to get
> usb_fill_bulk_urb() working on USB1.1? We need this as not all of the
> deployed machines have USB2.0 enabled.
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: usb_fill_bulk_urb() broken for USB1.1?
  2007-06-26 17:52 ` Chuck Ebbert
@ 2007-06-26 19:30   ` Pete Zaitcev
  2007-06-27  6:27   ` [linux-usb-devel] " Oliver Neukum
  2007-06-27  7:11   ` Greg KH
  2 siblings, 0 replies; 8+ messages in thread
From: Pete Zaitcev @ 2007-06-26 19:30 UTC (permalink / raw)
  To: Chuck Ebbert; +Cc: Keith Chew, linux-kernel, USB development list

On Tue, 26 Jun 2007 13:52:41 -0400, Chuck Ebbert <cebbert@redhat.com> wrote:
> On 06/26/2007 10:20 AM, Keith Chew wrote:

> [cc: linux-usb-devel]
> 
> > We have been using a Zydas based WIFI drivers under kernel 2.6.16.18
> > with great success. Recently, when we upgraded to 2.6.20.1 (also
> > tested on 2.6.21.5), we found that during initialisation, these calls
> > works with USB2.0 but stopped working on USB1.1:
> > 
> > usb_fill_bulk_urb();
> > usb_submit_urb();
> > 
> > The error code returned is -22 (-EINVAL). In 2.6.16.18, it works for
> > both USB2.0 and 1.1.

This looks like an attempt to submit a bulk URB to an interrupt endpoint,
with garbage interval or something of that nature.

I think it would be the best to talk to the driver author directly.

-- Pete

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-usb-devel] usb_fill_bulk_urb() broken for USB1.1?
  2007-06-26 17:52 ` Chuck Ebbert
  2007-06-26 19:30   ` Pete Zaitcev
@ 2007-06-27  6:27   ` Oliver Neukum
  2007-06-27  7:30     ` Keith Chew
  2007-06-27  7:11   ` Greg KH
  2 siblings, 1 reply; 8+ messages in thread
From: Oliver Neukum @ 2007-06-27  6:27 UTC (permalink / raw)
  To: linux-usb-devel; +Cc: Chuck Ebbert, Keith Chew, linux-kernel

Am Dienstag, 26. Juni 2007 schrieb Chuck Ebbert:
> On 06/26/2007 10:20 AM, Keith Chew wrote:
> 
> [cc: linux-usb-devel]
> 
> > We have been using a Zydas based WIFI drivers under kernel 2.6.16.18
> > with great success. Recently, when we upgraded to 2.6.20.1 (also
> > tested on 2.6.21.5), we found that during initialisation, these calls
> > works with USB2.0 but stopped working on USB1.1:
> > 
> > usb_fill_bulk_urb();
> > usb_submit_urb();

What do you use as arguments for usb_fill_bulk_urb() ? One of the sanity tests
in usb_submit_urb() is triggered.

	Regards
		Oliver



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-usb-devel] usb_fill_bulk_urb() broken for USB1.1?
  2007-06-26 17:52 ` Chuck Ebbert
  2007-06-26 19:30   ` Pete Zaitcev
  2007-06-27  6:27   ` [linux-usb-devel] " Oliver Neukum
@ 2007-06-27  7:11   ` Greg KH
  2 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2007-06-27  7:11 UTC (permalink / raw)
  To: Chuck Ebbert; +Cc: Keith Chew, linux-kernel, USB development list

On Tue, Jun 26, 2007 at 01:52:41PM -0400, Chuck Ebbert wrote:
> On 06/26/2007 10:20 AM, Keith Chew wrote:
> 
> [cc: linux-usb-devel]
> 
> > We have been using a Zydas based WIFI drivers under kernel 2.6.16.18
> > with great success. Recently, when we upgraded to 2.6.20.1 (also
> > tested on 2.6.21.5), we found that during initialisation, these calls
> > works with USB2.0 but stopped working on USB1.1:
> > 
> > usb_fill_bulk_urb();
> > usb_submit_urb();
> > 
> > The error code returned is -22 (-EINVAL). In 2.6.16.18, it works for
> > both USB2.0 and 1.1.
> > 
> > When we change to use usb_fill_int_urb(), it then works for USB1.1,
> > but takes up to 15 seconds (usually less than 5 seconds) for the
> > driver to initialise. Also, usb_fill_int_urb() does not work for
> > USB2.0 (kernel panic).
> > 
> > Can anyone point us to the right direction on how to get
> > usb_fill_bulk_urb() working on USB1.1? We need this as not all of the
> > deployed machines have USB2.0 enabled.

Do you have a pointer to where this code is so that we can see if the
driver is doing something "odd"?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-usb-devel] usb_fill_bulk_urb() broken for USB1.1?
  2007-06-27  6:27   ` [linux-usb-devel] " Oliver Neukum
@ 2007-06-27  7:30     ` Keith Chew
  2007-06-27  7:35       ` Oliver Neukum
  0 siblings, 1 reply; 8+ messages in thread
From: Keith Chew @ 2007-06-27  7:30 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: linux-usb-devel, Chuck Ebbert, linux-kernel

Hi Oliver

>
> What do you use as arguments for usb_fill_bulk_urb() ? One of the sanity tests
> in usb_submit_urb() is triggered.
>

Usage:

	usb_fill_bulk_urb(macp->intr_urb, macp->usb,
		usb_rcvbulkpipe(macp->usb, EP_INT_IN),
		macp->IntEPBuffer, MAX_EPINT_BUFFER,
		zd1211_intr_cb, macp);

where

#define EP_INT_IN			0x03
#define MAX_EPINT_BUFFER	64

Here are the relevant structure definitions:

	struct usb_device	*usb;
	struct urb		*intr_urb;
	u8			*IntEPBuffer;

I can post the full structure if required.

Regards
Keith

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-usb-devel] usb_fill_bulk_urb() broken for USB1.1?
  2007-06-27  7:30     ` Keith Chew
@ 2007-06-27  7:35       ` Oliver Neukum
  2007-06-27 22:54         ` Keith Chew
  0 siblings, 1 reply; 8+ messages in thread
From: Oliver Neukum @ 2007-06-27  7:35 UTC (permalink / raw)
  To: Keith Chew; +Cc: linux-usb-devel, Chuck Ebbert, linux-kernel

Am Mittwoch, 27. Juni 2007 schrieb Keith Chew:
> Hi Oliver
> 
> >
> > What do you use as arguments for usb_fill_bulk_urb() ? One of the sanity tests
> > in usb_submit_urb() is triggered.
> >
> 
> Usage:
> 
> 	usb_fill_bulk_urb(macp->intr_urb, macp->usb,
> 		usb_rcvbulkpipe(macp->usb, EP_INT_IN),
> 		macp->IntEPBuffer, MAX_EPINT_BUFFER,
> 		zd1211_intr_cb, macp);

See Pete's post.

You are initialising an interrupt urb with an initializer for
a bulk urb. The behavior is undefined. In older kernels
by random chance a sensible interval was set.

You need to use the correct initializer and the correct interval,
which usually can be read from the device's descriptors.

	Regards
		Oliver


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-usb-devel] usb_fill_bulk_urb() broken for USB1.1?
  2007-06-27  7:35       ` Oliver Neukum
@ 2007-06-27 22:54         ` Keith Chew
  0 siblings, 0 replies; 8+ messages in thread
From: Keith Chew @ 2007-06-27 22:54 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: linux-usb-devel, Chuck Ebbert, linux-kernel

Hi Oliver

> You are initialising an interrupt urb with an initializer for
> a bulk urb. The behavior is undefined. In older kernels
> by random chance a sensible interval was set.
>
> You need to use the correct initializer and the correct interval,
> which usually can be read from the device's descriptors.
>

Thank you very much for all your help. Will correct the code and
report back very soon.

Regards
Keith

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-06-27 22:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-26 14:20 usb_fill_bulk_urb() broken for USB1.1? Keith Chew
2007-06-26 17:52 ` Chuck Ebbert
2007-06-26 19:30   ` Pete Zaitcev
2007-06-27  6:27   ` [linux-usb-devel] " Oliver Neukum
2007-06-27  7:30     ` Keith Chew
2007-06-27  7:35       ` Oliver Neukum
2007-06-27 22:54         ` Keith Chew
2007-06-27  7:11   ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).