From 54a0ae4b108e7599b9969e12b7e62e924147a209 Mon Sep 17 00:00:00 2001 From: Venkat Moganty Date: Fri, 22 Jan 2010 10:26:45 +0530 Subject: fsl_udc_core: Fix USB chapter9 compliance tests. In udc driver ch9getstatus() function is not mapping the status buffer's virtual address to hardware for transfering the status data over dma. On USB bus get status information is not going properly to the host. Hence, few chapter9 tests are failing. Fixed this by maping the status buffer address to the dmable address. With this fix USB chapter9 (usb command verifier) tests are passing. Bug 633510: Chapter 9 USB Compliance tests are failed. Tested on whistler/android/usb1 port in device mode. Change-Id: Id4ab22950d2e3a75690aa8bafd8d21619190aecb --- drivers/usb/gadget/fsl_udc_core.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'drivers/usb') diff --git a/drivers/usb/gadget/fsl_udc_core.c b/drivers/usb/gadget/fsl_udc_core.c index ea973e1e5509..af03b80569a8 100755 --- a/drivers/usb/gadget/fsl_udc_core.c +++ b/drivers/usb/gadget/fsl_udc_core.c @@ -1304,6 +1304,23 @@ static void ch9getstatus(struct fsl_udc *udc, u8 request_type, u16 value, req->req.complete = NULL; req->dtd_count = 0; + /* map virtual address to hardware */ + if (req->req.dma == DMA_ADDR_INVALID) { + req->req.dma = dma_map_single(ep->udc->gadget.dev.parent, + req->req.buf, + req->req.length, ep_is_in(ep) + ? DMA_TO_DEVICE + : DMA_FROM_DEVICE); + req->mapped = 1; + } else { + dma_sync_single_for_device(ep->udc->gadget.dev.parent, + req->req.dma, req->req.length, + ep_is_in(ep) + ? DMA_TO_DEVICE + : DMA_FROM_DEVICE); + req->mapped = 0; + } + /* prime the data phase */ if ((fsl_req_to_dtd(req) == 0)) fsl_queue_td(ep, req); -- cgit v1.2.3