Message ID | 1408372115-4570-14-git-send-email-kishon@ti.com |
---|---|
State | New |
Headers | show |
Hi, On Monday 18 August 2014 08:11 PM, Felipe Balbi wrote: > On Mon, Aug 18, 2014 at 07:58:35PM +0530, Kishon Vijay Abraham I wrote: >> Bounce buffer is used for transferring requests which is not maxpacket >> aligned. In the case of DFU the requests can be upto 4096 bytes. >> >> While the actual fix for this should be using two chained TRBs to handle >> the transfer, this can be used as a temporary fix. > > Did you manage to trigger this fault ? Was the size larger than 512 ? yeah.. transferring any kernel image resulted in a size larger than 512. > I'm inclined into getting a real fix instead of just patching around. > > That way, the kernel benefits too as we can port the same patch there. sure. Thanks Kishon
On Tue, Aug 19, 2014 at 09:45:11PM +0530, Kishon Vijay Abraham I wrote: > Hi, > > On Monday 18 August 2014 08:11 PM, Felipe Balbi wrote: > > On Mon, Aug 18, 2014 at 07:58:35PM +0530, Kishon Vijay Abraham I wrote: > >> Bounce buffer is used for transferring requests which is not maxpacket > >> aligned. In the case of DFU the requests can be upto 4096 bytes. > >> > >> While the actual fix for this should be using two chained TRBs to handle > >> the transfer, this can be used as a temporary fix. > > > > Did you manage to trigger this fault ? Was the size larger than 512 ? > > yeah.. transferring any kernel image resulted in a size larger than 512. but it's also larger than 4KiB :-)
Hi, On Tuesday 19 August 2014 09:57 PM, Felipe Balbi wrote: > On Tue, Aug 19, 2014 at 09:45:11PM +0530, Kishon Vijay Abraham I wrote: >> Hi, >> >> On Monday 18 August 2014 08:11 PM, Felipe Balbi wrote: >>> On Mon, Aug 18, 2014 at 07:58:35PM +0530, Kishon Vijay Abraham I wrote: >>>> Bounce buffer is used for transferring requests which is not maxpacket >>>> aligned. In the case of DFU the requests can be upto 4096 bytes. >>>> >>>> While the actual fix for this should be using two chained TRBs to handle >>>> the transfer, this can be used as a temporary fix. >>> >>> Did you manage to trigger this fault ? Was the size larger than 512 ? >> >> yeah.. transferring any kernel image resulted in a size larger than 512. > > but it's also larger than 4KiB :-) Yeah. But the DFU specifies the maximum transfer size in wTransferSize (DFU function descriptor) to the host which is 4096 bytes (DFU_USB_BUFSIZ). So the max size will be only 4KB. Thanks Kishon
On Fri, Aug 22, 2014 at 04:32:10PM +0530, Kishon Vijay Abraham I wrote: > Hi, > > On Tuesday 19 August 2014 09:57 PM, Felipe Balbi wrote: > > On Tue, Aug 19, 2014 at 09:45:11PM +0530, Kishon Vijay Abraham I wrote: > >> Hi, > >> > >> On Monday 18 August 2014 08:11 PM, Felipe Balbi wrote: > >>> On Mon, Aug 18, 2014 at 07:58:35PM +0530, Kishon Vijay Abraham I wrote: > >>>> Bounce buffer is used for transferring requests which is not maxpacket > >>>> aligned. In the case of DFU the requests can be upto 4096 bytes. > >>>> > >>>> While the actual fix for this should be using two chained TRBs to handle > >>>> the transfer, this can be used as a temporary fix. > >>> > >>> Did you manage to trigger this fault ? Was the size larger than 512 ? > >> > >> yeah.. transferring any kernel image resulted in a size larger than 512. > > > > but it's also larger than 4KiB :-) > > Yeah. But the DFU specifies the maximum transfer size in wTransferSize (DFU > function descriptor) to the host which is 4096 bytes (DFU_USB_BUFSIZ). > > So the max size will be only 4KB. ah, ok. Thanks for that detail.
diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index e9ea7ca..e9f43b4 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h @@ -24,7 +24,7 @@ #include <linux/usb/otg.h> /* Global constants */ -#define DWC3_EP0_BOUNCE_SIZE 512 +#define DWC3_EP0_BOUNCE_SIZE 4096 #define DWC3_ENDPOINTS_NUM 32 #define DWC3_XHCI_RESOURCES_NUM 2
Bounce buffer is used for transferring requests which is not maxpacket aligned. In the case of DFU the requests can be upto 4096 bytes. While the actual fix for this should be using two chained TRBs to handle the transfer, this can be used as a temporary fix. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> --- drivers/usb/dwc3/core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)