Re: [PATCH] usb: dwc3: gadget: Properly initialize LINK TRB
On Tue, Oct 21, 2014 at 04:31:10PM -0700, Jack Pham wrote: On ISOC endpoints the last trb_pool entry used as a LINK TRB is not getting zeroed out correctly due to memset being called incorrectly and in the wrong place. If pool allocated from DMA was not zero-initialized to begin with this will result in the size and ctrl values being random garbage. Call memset correctly after assignment of the trb_link pointer. Fixes: f6bafc6a1c (usb: dwc3: convert TRBs into bitshifts) Signed-off-by: Jack Pham ja...@codeaurora.org Cc: sta...@vger.kernel.org you should add a # v3.4+ after stable email, I'll add that myself this time. -- balbi signature.asc Description: Digital signature
Re: [PATCH] usb: dwc3: gadget: Properly initialize LINK TRB
On Thu, Oct 23, 2014 at 09:10:03AM -0500, Felipe Balbi wrote: Fixes: f6bafc6a1c (usb: dwc3: convert TRBs into bitshifts) Signed-off-by: Jack Pham ja...@codeaurora.org Cc: sta...@vger.kernel.org you should add a # v3.4+ after stable email, I'll add that myself this time. Good to know for next time. Thanks Felipe! -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] usb: dwc3: gadget: Properly initialize LINK TRB
On Thu, Oct 23, 2014 at 09:36:14AM -0700, Jack Pham wrote: On Thu, Oct 23, 2014 at 09:10:03AM -0500, Felipe Balbi wrote: Fixes: f6bafc6a1c (usb: dwc3: convert TRBs into bitshifts) Signed-off-by: Jack Pham ja...@codeaurora.org Cc: sta...@vger.kernel.org you should add a # v3.4+ after stable email, I'll add that myself this time. Good to know for next time. Thanks Felipe! no problem ;-) -- balbi signature.asc Description: Digital signature
[PATCH] usb: dwc3: gadget: Properly initialize LINK TRB
On ISOC endpoints the last trb_pool entry used as a LINK TRB is not getting zeroed out correctly due to memset being called incorrectly and in the wrong place. If pool allocated from DMA was not zero-initialized to begin with this will result in the size and ctrl values being random garbage. Call memset correctly after assignment of the trb_link pointer. Fixes: f6bafc6a1c (usb: dwc3: convert TRBs into bitshifts) Signed-off-by: Jack Pham ja...@codeaurora.org Cc: sta...@vger.kernel.org --- drivers/usb/dwc3/gadget.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 3818b26..f231b51 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -525,12 +525,11 @@ static int __dwc3_gadget_ep_enable(struct dwc3_ep *dep, if (!usb_endpoint_xfer_isoc(desc)) return 0; - memset(trb_link, 0, sizeof(trb_link)); - /* Link TRB for ISOC. The HWO bit is never reset */ trb_st_hw = dep-trb_pool[0]; trb_link = dep-trb_pool[DWC3_TRB_NUM - 1]; + memset(trb_link, 0, sizeof(*trb_link)); trb_link-bpl = lower_32_bits(dwc3_trb_dma_offset(dep, trb_st_hw)); trb_link-bph = upper_32_bits(dwc3_trb_dma_offset(dep, trb_st_hw)); -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html