summaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc2/hcd_ddma.c
diff options
context:
space:
mode:
authorVahram Aharonyan <vahrama@synopsys.com>2016-11-09 19:27:58 -0800
committerFelipe Balbi <felipe.balbi@linux.intel.com>2016-11-18 13:54:19 +0200
commit3a1ec35160c69af3d2a44b0cf4bd0dea1026cdd1 (patch)
tree9c2b033cf9828731f821894635dfa15fb56e8e98 /drivers/usb/dwc2/hcd_ddma.c
parent0f6b80c0dbba7e0a76b6761e0f78d064b2ac9c17 (diff)
downloadlinux-3a1ec35160c69af3d2a44b0cf4bd0dea1026cdd1.tar.gz
linux-3a1ec35160c69af3d2a44b0cf4bd0dea1026cdd1.tar.bz2
linux-3a1ec35160c69af3d2a44b0cf4bd0dea1026cdd1.zip
usb: dwc2: host: Rename MAX_DMA_DESC_SIZE to HOST_DMA_NBYTES_LIMIT
Rename MAX_DMA_DESC_SIZE to HOST_DMA_NBYTES_LIMIT as it stores value of host DMA descriptor transfer bytes' limit. Values are different in case of gadget DMA descriptors. Signed-off-by: Vahram Aharonyan <vahrama@synopsys.com> Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc2/hcd_ddma.c')
-rw-r--r--drivers/usb/dwc2/hcd_ddma.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/dwc2/hcd_ddma.c b/drivers/usb/dwc2/hcd_ddma.c
index 70851b99417f..cf0367768cb3 100644
--- a/drivers/usb/dwc2/hcd_ddma.c
+++ b/drivers/usb/dwc2/hcd_ddma.c
@@ -693,8 +693,8 @@ static void dwc2_fill_host_dma_desc(struct dwc2_hsotg *hsotg,
struct dwc2_dma_desc *dma_desc = &qh->desc_list[n_desc];
int len = chan->xfer_len;
- if (len > MAX_DMA_DESC_SIZE - (chan->max_packet - 1))
- len = MAX_DMA_DESC_SIZE - (chan->max_packet - 1);
+ if (len > HOST_DMA_NBYTES_LIMIT - (chan->max_packet - 1))
+ len = HOST_DMA_NBYTES_LIMIT - (chan->max_packet - 1);
if (chan->ep_is_in) {
int num_packets;