]> git.baikalelectronics.ru Git - kernel.git/commit
USB: ci13xxx_udc: fix logic to mark request dma addresses as invalid
authorMichael Grzeschik <m.grzeschik@pengutronix.de>
Mon, 10 Oct 2011 16:38:06 +0000 (18:38 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 14 Nov 2011 19:51:27 +0000 (11:51 -0800)
commit08a236a59b0d10c65b985c08807e9fd33b7232ac
treeb14aa643608ee6ff2aaa861791f05c009ba3983f
parent43a7ac7204e3671687128088e1e5bd5337fbcece
USB: ci13xxx_udc: fix logic to mark request dma addresses as invalid

The current driver sets the request's dma addr (mReq->req.dma) to 0 to
mark the DMA address as not valid. However some gadget drivers
(e.g. gadgetfs) set the request's dma addr to DMA_ADDR_INVALID to mark
the address as invalid. This leads to bogus data send because the
ci13xxx_udc driver assumes the request has already been mapped.

This patch fixes the problem, by using DMA_ADDR_INVALID instead of 0
to mark the request's DMA address as invalid.

Tested-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/ci13xxx_udc.c