Hello, Thnxs.
Clarification: Along all the way:
When I mention "actual_length" I mean urb->iso_frame_desc[n].actual_length. Likewise, "status" refer to "urb->iso_frame_desc[n].status".
I agree that I was not precise in this point.
By "After 31 interations," , I mean There is a loop in the pwc_isoc_handler() ; which is the completion callbak.
for (i = 0; i < urb->number_of_packets; i++)
{
fst = urb->iso_frame_desc[i].status;
flen = urb->iso_frame_desc[i].actual_length;We reach iterate in this loop 31 times ; (In fact , urb->number_of_packets is 10 as I said;
so it happens after 3 times we enter the completion callbak.
It seesm to me that the host controller is responsible for the -75 status (-EOVERFLOW).
I use usb-ohci (no patches) .
When looking at the code of usb-ohci I see:
urb->iso_frame_desc [td->index].actual_length = dlen; urb->iso_frame_desc [td->index].status = cc_to_error [cc];
And by adding printk() I saw that cc_to_error [cc] gets a value of EOVERFLOW.
I do not have any idea why it happens or if the host controller or the driver is the cause for it.
According to the error_codes.txt in Linux documentation :
-EOVERFLOW (*) The amount of data returned by the endpoint was
greater than either the max packet size of the
endpoint or the remaining buffer size. "Babble".Could it be that the endpoint returned a packert larger than max packet of that endpoint?
regards, John
From: Alan Stern <[EMAIL PROTECTED]>
To: John Que <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED]
Subject: Re: [linux-usb-devel] actual_length of iso_frame_desc is 0 in handler after usb_set_interface() call
Date: Wed, 14 Jul 2004 11:12:41 -0400 (EDT)
On Wed, 14 Jul 2004, John Que wrote:
> Hello,
>
> I am working with usb pwc webcam driver.
>
> I am trying to set alternate setting different than the
> default one.
>
> To achieve it,I had tried to call usb_set_interface()
> with altenate setting 1 (different than default.)
>
> The usb_set_interface() call succeeds (I can verify it by
> making another call to usb_set_interface() as was suggested bt
> Alan Stern in this forum ;
> see :
> http://marc.theaimsgroup.com/?l=linux-usb-devel&m=108860856823230&w=2).
>
>
>
> the result is :
> I do reach the pwc_isoc_handler (this is the completion
> callback).
>
> The problem is that it reaches pwc_isoc_handler in an endless loop ,
> instead of exiting after some iterations, as in the normal situation.
>
> When getting iso packets, the data is in urb->iso_frame_desc array.
>
> The actual_length field of iso_frame_desc denotes the length of the packet.
>
> By debugging I saw that it reaches the handler with
> actual_length=0 ; the status, however, is 0 (success).
>
> urb->number_of_packets is 10.
>
> After 31 interations, the actual_length is 3 , but the status is -75 ;
> (this status means EOVERFLOW ; Value too large for defined data type )
>
>
> (in the default case , the actual length is 291, 1 less than tha MxPS of
> the default
> alternate setting , which is 292).
>
> Any idea what the problem can be ?
Can you provide more information? It would help to know, for each entry in the iso_frame_desc array, the values of length, actual_length, and status.
In your message it's not clear when you mention "actual_length" whether you mean "urb->actual_length" or urb->iso_frame_desc[n].actual_length". Likewise, does "status" refer to "urb->status" or "urb->iso_frame_desc[n].status"? Try to be more precise in your writing.
Also, what do you mean by "After 31 iterations"? Does each iteration examine a different entry in the iso_frame_desc array? If so, and that array has only 10 entries, this doesn't make any sense. If not, then what is being iterated?
Alan Stern
_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail
------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
