On Thu, 3 Jun 2004, sting sting wrote:
> 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.
Looks like this test doesn't belong here. Each of sl811_submit_control(),
sl811_submit_bulk(), and sl811_submit_interrupt() contains its own tests.
Probably this test should be removed and sl811_submit_isochronous() should
test urb->iso_frame_desc[i].length against SL811_DATA_LIMIT.
> 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.
For iso transfers, your high level driver sets the packet size in
iso_frame_desc[i].length. For non-iso transfers, your driver does not set
the packet size.
The problem arises because the code you found is comparing
SL811_DATA_LIMIT to the maxpacket size, not the packet size. It's okay to
have packet sizes that are smaller than the max. That's why I said the
test should be removed.
> Is there a way to make tje packet size lower than 240? (SL811_DATA_LIMIT =
> 240)
Yes, just set urb->iso_frame_desc[i].length to a value <= 240.
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