OSDN Git Service

dwc3: gadget: Initialized USB TRBs pool memory with zero
authorMayank Rana <mrana@codeaurora.org>
Tue, 19 May 2015 01:27:53 +0000 (18:27 -0700)
committerDavid Keitel <dkeitel@codeaurora.org>
Tue, 22 Mar 2016 18:06:51 +0000 (11:06 -0700)
commit32db5976ed6874e03420c77c739f0be89c1bd461
tree5da637f89405a0673ddfa761a6a4ee4e1126c2b5
parent865addc7d416be1d8387a78df26ff4ca5b3a4d80
dwc3: gadget: Initialized USB TRBs pool memory with zero

dma_coherent_alloc() API doesn't guaranteed that allocated memory
is initialized with zero. It is observed in some cases where there
is stale data seen with allocated memory for TRB pool and providing
this TRB with USB controller results into different memory access
issues. Fix this issue by using dma_zalloc_coherent() API which
allocates memory and initialized it with zero.

Change-Id: I160e319aace262958a11ba5196f53ec21b98977f
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
drivers/usb/dwc3/gadget.c