diff options
author | Felipe Balbi <felipe.balbi@linux.intel.com> | 2017-04-07 14:09:13 +0300 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2017-04-11 10:58:28 +0300 |
commit | 4199c5f8bccd7ff6923c32af0f8ef0224eeaa651 (patch) | |
tree | ece60264534a7fe2d384e42b05ba949fb2e309c4 /drivers/usb/dwc3/core.h | |
parent | d686a5ff6a2dd94cbe66b8cc71912c9324894c24 (diff) | |
download | linux-4199c5f8bccd7ff6923c32af0f8ef0224eeaa651.tar.gz linux-4199c5f8bccd7ff6923c32af0f8ef0224eeaa651.tar.bz2 linux-4199c5f8bccd7ff6923c32af0f8ef0224eeaa651.zip |
usb: dwc3: ep0: improve handling of unaligned OUT requests
Just like we did for all other endpoint types, let's rely on a chained
TRB pointing to ep0_bounce_addr in order to align transfer size. This
will make the code simpler.
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc3/core.h')
-rw-r--r-- | drivers/usb/dwc3/core.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index bbb7c3f6749e..8dc416daa85c 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h @@ -42,7 +42,7 @@ #define DWC3_PULL_UP_TIMEOUT 500 /* ms */ #define DWC3_ZLP_BUF_SIZE 1024 /* size of a superspeed bulk */ #define DWC3_BOUNCE_SIZE 1024 /* size of a superspeed bulk */ -#define DWC3_EP0_BOUNCE_SIZE 512 +#define DWC3_EP0_SETUP_SIZE 512 #define DWC3_ENDPOINTS_NUM 32 #define DWC3_XHCI_RESOURCES_NUM 2 @@ -761,12 +761,10 @@ struct dwc3_scratchpad_array { /** * struct dwc3 - representation of our controller * @ep0_trb: trb which is used for the ctrl_req - * @ep0_bounce: bounce buffer for ep0 * @zlp_buf: used when request->zero is set * @setup_buf: used while precessing STD USB requests * @ep0_trb: dma address of ep0_trb * @ep0_usb_req: dummy req used while handling STD USB requests - * @ep0_bounce_addr: dma address of ep0_bounce * @scratch_addr: dma address of scratchbuf * @ep0_in_setup: one control transfer is completed and enter setup phase * @lock: for synchronizing @@ -859,13 +857,11 @@ struct dwc3_scratchpad_array { struct dwc3 { struct dwc3_trb *ep0_trb; void *bounce; - void *ep0_bounce; void *zlp_buf; void *scratchbuf; u8 *setup_buf; dma_addr_t ep0_trb_addr; dma_addr_t bounce_addr; - dma_addr_t ep0_bounce_addr; dma_addr_t scratch_addr; struct dwc3_request ep0_usb_req; struct completion ep0_in_setup; |