Hello. On 16-09-2010 10:56, Felipe Balbi wrote:
From: Ming Lei<tom.leiming@xxxxxxxxx>
DMA length should not go beyond the availabe space of request buffer, so fix it.
Signed-off-by: Ming Lei<tom.leiming@xxxxxxxxx> Cc: David Brownell<dbrownell@xxxxxxxxxxxxxxxxxxxxx> Cc: Anand Gadiyar<gadiyar@xxxxxx> Cc: Mike Frysinger<vapier@xxxxxxxxxx> Cc: Sergei Shtylyov<sshtylyov@xxxxxxxxxxxxx> Signed-off-by: Felipe Balbi<balbi@xxxxxx>
[...]
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index fa826f9..cacae96 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c @@ -300,6 +300,11 @@ static void txstate(struct musb *musb, struct musb_request *req) #ifndef CONFIG_MUSB_PIO_ONLY if (is_dma_capable()&& musb_ep->dma) { struct dma_controller *c = musb->dma_controller; + size_t request_size; + + /* setup DMA, then program endpoint CSR */ + request_size = min_t(size_t, request->length - request->actual, + musb_ep->dma->max_len);
I protest -- this breaks the CPPI case; request_size will always be 0. WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html