diff options
author | Felipe Balbi <felipe.balbi@linux.intel.com> | 2017-04-07 16:34:38 +0300 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2017-04-11 10:58:29 +0300 |
commit | d6e5a549cc4dba504a62855d9613836f76950790 (patch) | |
tree | 1804ea4768e2e880ae475f31ba3bf8b26c3c7dc3 /drivers/usb/dwc3/core.h | |
parent | 4199c5f8bccd7ff6923c32af0f8ef0224eeaa651 (diff) | |
download | linux-d6e5a549cc4dba504a62855d9613836f76950790.tar.bz2 |
usb: dwc3: simplify ZLP handling
It's much simpler to just add one extra TRB chained to previous TRB to
handle ZLP. This helps us reduce pointless allocations and simplifies
the code a little bit.
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 | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index 8dc416daa85c..d3b824912120 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h @@ -40,7 +40,6 @@ /* Global constants */ #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_SETUP_SIZE 512 #define DWC3_ENDPOINTS_NUM 32 @@ -748,6 +747,7 @@ struct dwc3_request { unsigned direction:1; unsigned mapped:1; unsigned started:1; + unsigned zero:1; }; /* @@ -761,7 +761,6 @@ struct dwc3_scratchpad_array { /** * struct dwc3 - representation of our controller * @ep0_trb: trb which is used for the ctrl_req - * @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 @@ -857,7 +856,6 @@ struct dwc3_scratchpad_array { struct dwc3 { struct dwc3_trb *ep0_trb; void *bounce; - void *zlp_buf; void *scratchbuf; u8 *setup_buf; dma_addr_t ep0_trb_addr; |