Hello,
Again thnxs;
I did added printk() as you suggested; I know now exactly where the problem stems from;
it does not seems to me now a problem which comes from using big endian.


in sl811.c we have the method sl811_submit_urb(struct urb* urb) in which I fail.

The code in that method where the problem lies is:

if (usb_maxpacket(urb->dev, urb->pipe, usb_pipeout(urb->pipe)) > SL811_DATA_LIMIT)
{
printk(KERN_ERR "Packet size is big for SL811, should < %d!\n", SL811_DATA_LIMIT);
return -EINVAL;
}


and this is the error I get from the higher level USB fdriver which calls this method.

adding printk() showd that:

usb_maxpacket() return 292 where as SL811_DATA_LIMIT is 240.
usb_pipeout(urb->pipe) is 0

usb_maxpacket() is from usb.h :
it is the following macro
#define usb_maxpacket(dev, pipe, out)   (out \
                                ? (dev)->epmaxpacketout[usb_pipeendpoint(pipe)] \
                                : (dev)->epmaxpacketin [usb_pipeendpoint(pipe)] )
printk() showed that:
(dev)->epmaxpacketout[usb_pipeendpoint(pipe)] is 0
(dev)->epmaxpacketin [usb_pipeendpoint(pipe)]  is 292
urb->pipe is 164736.


now, in /proc/bus/usb/devices I have a line with the max packet size E: Ad=85(I) Atr=01(Isoc) MxPS= 292 Ivl=1ms

but there are more EndPoint lines.

As I understand (and I am quite a newbie in USB protocol), the problem is that
the sl811 host controller supports max packet size of 240, while I try
using urb with a bigger packet size.


Now, I did not see in my high level usb driver any parameter which sets the
packet size.

Is there a way to make tje packet size lower than 240? (SL811_DATA_LIMIT = 240)

Or is there a workaround?

regards,
sting









From: Alan Stern <[EMAIL PROTECTED]>
To: sting sting <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED]
Subject: Re: Re: [linux-usb-devel] Packet size too big error in usb host controller
Date: Thu, 3 Jun 2004 10:03:36 -0400 (EDT)


On Thu, 3 Jun 2004, sting sting wrote:

> Hello,
>
> Thanks a lot !
>
> I had checked /proc/bus/usb/devices in both an x86 RedHat Linux and
> with the platform with sl811 host controller; In both , maxpacket value is
> <=64
> for non isochronous endpoints (most of these are Int.)
>
> the usb device I use is not a mass storage device
> (but as I know this platform supports a USB disk; and
> from this probably stems the "Initializing USB Mass Storage..." message at
> boot).
>
> My platform is indded big endian ; it is PPC based platform;
> I assume that this is indeed the source of the problem ,
> and I am trying to figure out more details.
>
> what should I do ?
>
> regards,
> sting


You can start by turning on both USB debugging and usb-storage debugging
(assuming the problem originates from a call made by the usb-storage
driver) in your kernel's configuration.  Find out at what point the bad
maxpacket value is being generated, maybe by adding printk() statements at
appropriate places in the source code.  When you've located the site of
the bad maxpacket, figure out why it is wrong.

Alan Stern



-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus




-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to