Thanks for the inputs. 
Also under test case 14, there is a statment in the
test driver in function ctrl_out which says

 if (length > 0xffff || vary >= length)
        return -EINVAL;

This condition satisfies for vary >= length, as we are
passing vary=0x200 and length=0x200 from the test
program testusb.c.
Whats the hasrm in vary being equal to length. If this
condition in the driver is true, what values of vary
and length shoul we pass from the test program for
test case 14.

thanking u in advance

regards

-Nitin

--- Alan Stern <[EMAIL PROTECTED]> wrote:

> On Fri, 14 Oct 2005, Nitin Mahajan wrote:
> 
> > The reason for this I have found out as follows.
> > When we call 
> > usb_buffer_free (udev, sizeof (struct
> > usb_ctrlrequest),
> >                     urb [i]->setup_packet,
> >                     urb [i]->setup_dma);
> > in function test_ctrl_queue in usbtest.c, the
> value of
> > urb[i]->setup_dma is different from the
> correspoding
> > value when this dma buffer was allocated.
> > This value has got changed due to call to
> > dma_map_single, but a correspoding
> dma_unmap_single
> > has not happened when we are attempting to free.
> Thus
> > the error message from dma_pool_free.
> > Could anyone please tell me what would be a
> correct
> > way from the usb driver(usbtest.c) to trigger an
> > approprite dma_unmap_single or this is a
> shortcoming
> > in some part of USB host side stack.
> 
> It looks like a line of code got left out by
> mistake.  This patch should 
> fix the problem by preventing the call to
> dma_map_single.  Let me know if 
> it works.
> 
> Alan Stern
> 
> 
> Index: usb-2.6/drivers/usb/misc/usbtest.c
>
===================================================================
> --- usb-2.6.orig/drivers/usb/misc/usbtest.c
> +++ usb-2.6/drivers/usb/misc/usbtest.c
> @@ -983,6 +983,7 @@ test_ctrl_queue (struct
> usbtest_dev *dev
>               reqp->number = i % NUM_SUBCASES;
>               reqp->expected = expected;
>               u->setup_packet = (char *) &reqp->setup;
> +             u->transfer_flags |= URB_NO_SETUP_DMA_MAP;
>  
>               u->context = &context;
>               u->complete = ctrl_complete;
> 
> 


Send instant messages to your online friends http://uk.messenger.yahoo.com 


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to