diff options
author | Paul Zimmerman <Paul.Zimmerman@synopsys.com> | 2012-02-15 21:56:56 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-03-02 05:12:01 -0500 |
commit | 1d046793958f128dd43d42a4a0dac48bf6914273 (patch) | |
tree | 202b0c160c1005e7c1a2733cf39f5762118de7ca /drivers/usb | |
parent | 2cd0e8512169b125fb0ff1f9ec3f8505eecb3012 (diff) |
usb: dwc3: clean up whitespace damage, typos, missing parens, etc.
trivial patch, no functional changes
Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/dwc3/core.c | 14 | ||||
-rw-r--r-- | drivers/usb/dwc3/core.h | 22 | ||||
-rw-r--r-- | drivers/usb/dwc3/dwc3-pci.c | 4 | ||||
-rw-r--r-- | drivers/usb/dwc3/ep0.c | 2 | ||||
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 51 |
5 files changed, 46 insertions, 47 deletions
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index a1576f00ead..33d98683201 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c | |||
@@ -167,11 +167,11 @@ static void dwc3_free_one_event_buffer(struct dwc3 *dwc, | |||
167 | } | 167 | } |
168 | 168 | ||
169 | /** | 169 | /** |
170 | * dwc3_alloc_one_event_buffer - Allocated one event buffer structure | 170 | * dwc3_alloc_one_event_buffer - Allocates one event buffer structure |
171 | * @dwc: Pointer to our controller context structure | 171 | * @dwc: Pointer to our controller context structure |
172 | * @length: size of the event buffer | 172 | * @length: size of the event buffer |
173 | * | 173 | * |
174 | * Returns a pointer to the allocated event buffer structure on succes | 174 | * Returns a pointer to the allocated event buffer structure on success |
175 | * otherwise ERR_PTR(errno). | 175 | * otherwise ERR_PTR(errno). |
176 | */ | 176 | */ |
177 | static struct dwc3_event_buffer *__devinit | 177 | static struct dwc3_event_buffer *__devinit |
@@ -215,10 +215,10 @@ static void dwc3_free_event_buffers(struct dwc3 *dwc) | |||
215 | 215 | ||
216 | /** | 216 | /** |
217 | * dwc3_alloc_event_buffers - Allocates @num event buffers of size @length | 217 | * dwc3_alloc_event_buffers - Allocates @num event buffers of size @length |
218 | * @dwc: Pointer to out controller context structure | 218 | * @dwc: pointer to our controller context structure |
219 | * @length: size of event buffer | 219 | * @length: size of event buffer |
220 | * | 220 | * |
221 | * Returns 0 on success otherwise negative errno. In error the case, dwc | 221 | * Returns 0 on success otherwise negative errno. In the error case, dwc |
222 | * may contain some buffers allocated but not all which were requested. | 222 | * may contain some buffers allocated but not all which were requested. |
223 | */ | 223 | */ |
224 | static int __devinit dwc3_alloc_event_buffers(struct dwc3 *dwc, unsigned length) | 224 | static int __devinit dwc3_alloc_event_buffers(struct dwc3 *dwc, unsigned length) |
@@ -251,7 +251,7 @@ static int __devinit dwc3_alloc_event_buffers(struct dwc3 *dwc, unsigned length) | |||
251 | 251 | ||
252 | /** | 252 | /** |
253 | * dwc3_event_buffers_setup - setup our allocated event buffers | 253 | * dwc3_event_buffers_setup - setup our allocated event buffers |
254 | * @dwc: Pointer to out controller context structure | 254 | * @dwc: pointer to our controller context structure |
255 | * | 255 | * |
256 | * Returns 0 on success otherwise negative errno. | 256 | * Returns 0 on success otherwise negative errno. |
257 | */ | 257 | */ |
@@ -363,9 +363,9 @@ static int __devinit dwc3_core_init(struct dwc3 *dwc) | |||
363 | 363 | ||
364 | /* | 364 | /* |
365 | * WORKAROUND: DWC3 revisions <1.90a have a bug | 365 | * WORKAROUND: DWC3 revisions <1.90a have a bug |
366 | * when The device fails to connect at SuperSpeed | 366 | * where the device can fail to connect at SuperSpeed |
367 | * and falls back to high-speed mode which causes | 367 | * and falls back to high-speed mode which causes |
368 | * the device to enter in a Connect/Disconnect loop | 368 | * the device to enter a Connect/Disconnect loop |
369 | */ | 369 | */ |
370 | if (dwc->revision < DWC3_REVISION_190A) | 370 | if (dwc->revision < DWC3_REVISION_190A) |
371 | reg |= DWC3_GCTL_U2RSTECN; | 371 | reg |= DWC3_GCTL_U2RSTECN; |
diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index 696b20a8b1f..81d1c0aeb6c 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h | |||
@@ -145,22 +145,22 @@ | |||
145 | /* Bit fields */ | 145 | /* Bit fields */ |
146 | 146 | ||
147 | /* Global Configuration Register */ | 147 | /* Global Configuration Register */ |
148 | #define DWC3_GCTL_PWRDNSCALE(n) (n << 19) | 148 | #define DWC3_GCTL_PWRDNSCALE(n) ((n) << 19) |
149 | #define DWC3_GCTL_U2RSTECN (1 << 16) | 149 | #define DWC3_GCTL_U2RSTECN (1 << 16) |
150 | #define DWC3_GCTL_RAMCLKSEL(x) ((x & DWC3_GCTL_CLK_MASK) << 6) | 150 | #define DWC3_GCTL_RAMCLKSEL(x) (((x) & DWC3_GCTL_CLK_MASK) << 6) |
151 | #define DWC3_GCTL_CLK_BUS (0) | 151 | #define DWC3_GCTL_CLK_BUS (0) |
152 | #define DWC3_GCTL_CLK_PIPE (1) | 152 | #define DWC3_GCTL_CLK_PIPE (1) |
153 | #define DWC3_GCTL_CLK_PIPEHALF (2) | 153 | #define DWC3_GCTL_CLK_PIPEHALF (2) |
154 | #define DWC3_GCTL_CLK_MASK (3) | 154 | #define DWC3_GCTL_CLK_MASK (3) |
155 | 155 | ||
156 | #define DWC3_GCTL_PRTCAP(n) (((n) & (3 << 12)) >> 12) | 156 | #define DWC3_GCTL_PRTCAP(n) (((n) & (3 << 12)) >> 12) |
157 | #define DWC3_GCTL_PRTCAPDIR(n) (n << 12) | 157 | #define DWC3_GCTL_PRTCAPDIR(n) ((n) << 12) |
158 | #define DWC3_GCTL_PRTCAP_HOST 1 | 158 | #define DWC3_GCTL_PRTCAP_HOST 1 |
159 | #define DWC3_GCTL_PRTCAP_DEVICE 2 | 159 | #define DWC3_GCTL_PRTCAP_DEVICE 2 |
160 | #define DWC3_GCTL_PRTCAP_OTG 3 | 160 | #define DWC3_GCTL_PRTCAP_OTG 3 |
161 | 161 | ||
162 | #define DWC3_GCTL_CORESOFTRESET (1 << 11) | 162 | #define DWC3_GCTL_CORESOFTRESET (1 << 11) |
163 | #define DWC3_GCTL_SCALEDOWN(n) (n << 4) | 163 | #define DWC3_GCTL_SCALEDOWN(n) ((n) << 4) |
164 | #define DWC3_GCTL_DISSCRAMBLE (1 << 3) | 164 | #define DWC3_GCTL_DISSCRAMBLE (1 << 3) |
165 | #define DWC3_GCTL_DSBLCLKGTNG (1 << 0) | 165 | #define DWC3_GCTL_DSBLCLKGTNG (1 << 0) |
166 | 166 | ||
@@ -177,7 +177,7 @@ | |||
177 | #define DWC3_GTXFIFOSIZ_TXFSTADDR(n) ((n) & 0xffff0000) | 177 | #define DWC3_GTXFIFOSIZ_TXFSTADDR(n) ((n) & 0xffff0000) |
178 | 178 | ||
179 | /* Global HWPARAMS1 Register */ | 179 | /* Global HWPARAMS1 Register */ |
180 | #define DWC3_GHWPARAMS1_EN_PWROPT(n) ((n & (3 << 24)) >> 24) | 180 | #define DWC3_GHWPARAMS1_EN_PWROPT(n) (((n) & (3 << 24)) >> 24) |
181 | #define DWC3_GHWPARAMS1_EN_PWROPT_NO 0 | 181 | #define DWC3_GHWPARAMS1_EN_PWROPT_NO 0 |
182 | #define DWC3_GHWPARAMS1_EN_PWROPT_CLK 1 | 182 | #define DWC3_GHWPARAMS1_EN_PWROPT_CLK 1 |
183 | 183 | ||
@@ -273,10 +273,10 @@ | |||
273 | 273 | ||
274 | /* Device Endpoint Command Register */ | 274 | /* Device Endpoint Command Register */ |
275 | #define DWC3_DEPCMD_PARAM_SHIFT 16 | 275 | #define DWC3_DEPCMD_PARAM_SHIFT 16 |
276 | #define DWC3_DEPCMD_PARAM(x) (x << DWC3_DEPCMD_PARAM_SHIFT) | 276 | #define DWC3_DEPCMD_PARAM(x) ((x) << DWC3_DEPCMD_PARAM_SHIFT) |
277 | #define DWC3_DEPCMD_GET_RSC_IDX(x) ((x >> DWC3_DEPCMD_PARAM_SHIFT) & 0x7f) | 277 | #define DWC3_DEPCMD_GET_RSC_IDX(x) (((x) >> DWC3_DEPCMD_PARAM_SHIFT) & 0x7f) |
278 | #define DWC3_DEPCMD_STATUS_MASK (0x0f << 12) | 278 | #define DWC3_DEPCMD_STATUS_MASK (0x0f << 12) |
279 | #define DWC3_DEPCMD_STATUS(x) ((x & DWC3_DEPCMD_STATUS_MASK) >> 12) | 279 | #define DWC3_DEPCMD_STATUS(x) (((x) & DWC3_DEPCMD_STATUS_MASK) >> 12) |
280 | #define DWC3_DEPCMD_HIPRI_FORCERM (1 << 11) | 280 | #define DWC3_DEPCMD_HIPRI_FORCERM (1 << 11) |
281 | #define DWC3_DEPCMD_CMDACT (1 << 10) | 281 | #define DWC3_DEPCMD_CMDACT (1 << 10) |
282 | #define DWC3_DEPCMD_CMDIOC (1 << 8) | 282 | #define DWC3_DEPCMD_CMDIOC (1 << 8) |
@@ -683,9 +683,9 @@ struct dwc3_event_depevt { | |||
683 | #define DEPEVT_STATUS_TRANSFER_ACTIVE (1 << 3) | 683 | #define DEPEVT_STATUS_TRANSFER_ACTIVE (1 << 3) |
684 | 684 | ||
685 | /* Within XferComplete */ | 685 | /* Within XferComplete */ |
686 | #define DEPEVT_STATUS_BUSERR (1 << 0) | 686 | #define DEPEVT_STATUS_BUSERR (1 << 0) |
687 | #define DEPEVT_STATUS_SHORT (1 << 1) | 687 | #define DEPEVT_STATUS_SHORT (1 << 1) |
688 | #define DEPEVT_STATUS_IOC (1 << 2) | 688 | #define DEPEVT_STATUS_IOC (1 << 2) |
689 | #define DEPEVT_STATUS_LST (1 << 3) | 689 | #define DEPEVT_STATUS_LST (1 << 3) |
690 | 690 | ||
691 | /* Stream event only */ | 691 | /* Stream event only */ |
diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c index 05d3a3efbc1..74bac06652c 100644 --- a/drivers/usb/dwc3/dwc3-pci.c +++ b/drivers/usb/dwc3/dwc3-pci.c | |||
@@ -69,7 +69,7 @@ static int __devinit dwc3_pci_probe(struct pci_dev *pci, | |||
69 | return -ENOMEM; | 69 | return -ENOMEM; |
70 | } | 70 | } |
71 | 71 | ||
72 | glue->dev = dev; | 72 | glue->dev = dev; |
73 | 73 | ||
74 | ret = pci_enable_device(pci); | 74 | ret = pci_enable_device(pci); |
75 | if (ret) { | 75 | if (ret) { |
@@ -114,7 +114,7 @@ static int __devinit dwc3_pci_probe(struct pci_dev *pci, | |||
114 | dwc3->dev.dma_mask = dev->dma_mask; | 114 | dwc3->dev.dma_mask = dev->dma_mask; |
115 | dwc3->dev.dma_parms = dev->dma_parms; | 115 | dwc3->dev.dma_parms = dev->dma_parms; |
116 | dwc3->dev.parent = dev; | 116 | dwc3->dev.parent = dev; |
117 | glue->dwc3 = dwc3; | 117 | glue->dwc3 = dwc3; |
118 | 118 | ||
119 | ret = platform_device_add(dwc3); | 119 | ret = platform_device_add(dwc3); |
120 | if (ret) { | 120 | if (ret) { |
diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c index 5a067090f27..4fa2c9873ea 100644 --- a/drivers/usb/dwc3/ep0.c +++ b/drivers/usb/dwc3/ep0.c | |||
@@ -374,7 +374,7 @@ static int dwc3_ep0_handle_feature(struct dwc3 *dwc, | |||
374 | case USB_RECIP_ENDPOINT: | 374 | case USB_RECIP_ENDPOINT: |
375 | switch (wValue) { | 375 | switch (wValue) { |
376 | case USB_ENDPOINT_HALT: | 376 | case USB_ENDPOINT_HALT: |
377 | dep = dwc3_wIndex_to_dep(dwc, wIndex); | 377 | dep = dwc3_wIndex_to_dep(dwc, wIndex); |
378 | if (!dep) | 378 | if (!dep) |
379 | return -EINVAL; | 379 | return -EINVAL; |
380 | ret = __dwc3_gadget_ep_set_halt(dep, set); | 380 | ret = __dwc3_gadget_ep_set_halt(dep, set); |
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index eeba2227c28..d121e73d89a 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c | |||
@@ -548,7 +548,7 @@ static int __dwc3_gadget_ep_enable(struct dwc3_ep *dep, | |||
548 | 548 | ||
549 | memset(&trb_link, 0, sizeof(trb_link)); | 549 | memset(&trb_link, 0, sizeof(trb_link)); |
550 | 550 | ||
551 | /* Link TRB for ISOC. The HWO but is never reset */ | 551 | /* Link TRB for ISOC. The HWO bit is never reset */ |
552 | trb_st_hw = &dep->trb_pool[0]; | 552 | trb_st_hw = &dep->trb_pool[0]; |
553 | 553 | ||
554 | trb_link = &dep->trb_pool[DWC3_TRB_NUM - 1]; | 554 | trb_link = &dep->trb_pool[DWC3_TRB_NUM - 1]; |
@@ -818,9 +818,9 @@ static void dwc3_prepare_one_trb(struct dwc3_ep *dep, | |||
818 | * @dep: endpoint for which requests are being prepared | 818 | * @dep: endpoint for which requests are being prepared |
819 | * @starting: true if the endpoint is idle and no requests are queued. | 819 | * @starting: true if the endpoint is idle and no requests are queued. |
820 | * | 820 | * |
821 | * The functions goes through the requests list and setups TRBs for the | 821 | * The function goes through the requests list and sets up TRBs for the |
822 | * transfers. The functions returns once there are not more TRBs available or | 822 | * transfers. The function returns once there are no more TRBs available or |
823 | * it run out of requests. | 823 | * it runs out of requests. |
824 | */ | 824 | */ |
825 | static void dwc3_prepare_trbs(struct dwc3_ep *dep, bool starting) | 825 | static void dwc3_prepare_trbs(struct dwc3_ep *dep, bool starting) |
826 | { | 826 | { |
@@ -834,8 +834,8 @@ static void dwc3_prepare_trbs(struct dwc3_ep *dep, bool starting) | |||
834 | trbs_left = (dep->busy_slot - dep->free_slot) & DWC3_TRB_MASK; | 834 | trbs_left = (dep->busy_slot - dep->free_slot) & DWC3_TRB_MASK; |
835 | 835 | ||
836 | /* | 836 | /* |
837 | * if busy & slot are equal than it is either full or empty. If we are | 837 | * If busy & slot are equal than it is either full or empty. If we are |
838 | * starting to proceed requests then we are empty. Otherwise we ar | 838 | * starting to process requests then we are empty. Otherwise we are |
839 | * full and don't do anything | 839 | * full and don't do anything |
840 | */ | 840 | */ |
841 | if (!trbs_left) { | 841 | if (!trbs_left) { |
@@ -846,7 +846,7 @@ static void dwc3_prepare_trbs(struct dwc3_ep *dep, bool starting) | |||
846 | * In case we start from scratch, we queue the ISOC requests | 846 | * In case we start from scratch, we queue the ISOC requests |
847 | * starting from slot 1. This is done because we use ring | 847 | * starting from slot 1. This is done because we use ring |
848 | * buffer and have no LST bit to stop us. Instead, we place | 848 | * buffer and have no LST bit to stop us. Instead, we place |
849 | * IOC bit TRB_NUM/4. We try to avoid to having an interrupt | 849 | * IOC bit every TRB_NUM/4. We try to avoid having an interrupt |
850 | * after the first request so we start at slot 1 and have | 850 | * after the first request so we start at slot 1 and have |
851 | * 7 requests proceed before we hit the first IOC. | 851 | * 7 requests proceed before we hit the first IOC. |
852 | * Other transfer types don't use the ring buffer and are | 852 | * Other transfer types don't use the ring buffer and are |
@@ -882,8 +882,8 @@ static void dwc3_prepare_trbs(struct dwc3_ep *dep, bool starting) | |||
882 | length = sg_dma_len(s); | 882 | length = sg_dma_len(s); |
883 | dma = sg_dma_address(s); | 883 | dma = sg_dma_address(s); |
884 | 884 | ||
885 | if (i == (request->num_mapped_sgs - 1) | 885 | if (i == (request->num_mapped_sgs - 1) || |
886 | || sg_is_last(s)) { | 886 | sg_is_last(s)) { |
887 | last_one = true; | 887 | last_one = true; |
888 | chain = false; | 888 | chain = false; |
889 | } | 889 | } |
@@ -951,8 +951,7 @@ static int __dwc3_gadget_kick_transfer(struct dwc3_ep *dep, u16 cmd_param, | |||
951 | dwc3_prepare_trbs(dep, start_new); | 951 | dwc3_prepare_trbs(dep, start_new); |
952 | 952 | ||
953 | /* | 953 | /* |
954 | * req points to the first request where HWO changed | 954 | * req points to the first request where HWO changed from 0 to 1 |
955 | * from 0 to 1 | ||
956 | */ | 955 | */ |
957 | req = next_request(&dep->req_queued); | 956 | req = next_request(&dep->req_queued); |
958 | } | 957 | } |
@@ -978,7 +977,7 @@ static int __dwc3_gadget_kick_transfer(struct dwc3_ep *dep, u16 cmd_param, | |||
978 | /* | 977 | /* |
979 | * FIXME we need to iterate over the list of requests | 978 | * FIXME we need to iterate over the list of requests |
980 | * here and stop, unmap, free and del each of the linked | 979 | * here and stop, unmap, free and del each of the linked |
981 | * requests instead of we do now. | 980 | * requests instead of what we do now. |
982 | */ | 981 | */ |
983 | dwc3_unmap_buffer_from_dma(req); | 982 | dwc3_unmap_buffer_from_dma(req); |
984 | list_del(&req->list); | 983 | list_del(&req->list); |
@@ -1011,7 +1010,7 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req) | |||
1011 | * particular token from the Host side. | 1010 | * particular token from the Host side. |
1012 | * | 1011 | * |
1013 | * This will also avoid Host cancelling URBs due to too | 1012 | * This will also avoid Host cancelling URBs due to too |
1014 | * many NACKs. | 1013 | * many NAKs. |
1015 | */ | 1014 | */ |
1016 | dwc3_map_buffer_to_dma(req); | 1015 | dwc3_map_buffer_to_dma(req); |
1017 | list_add_tail(&req->list, &dep->request_list); | 1016 | list_add_tail(&req->list, &dep->request_list); |
@@ -1034,10 +1033,10 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req) | |||
1034 | 1033 | ||
1035 | start_trans = 1; | 1034 | start_trans = 1; |
1036 | if (usb_endpoint_xfer_isoc(dep->desc) && | 1035 | if (usb_endpoint_xfer_isoc(dep->desc) && |
1037 | dep->flags & DWC3_EP_BUSY) | 1036 | (dep->flags & DWC3_EP_BUSY)) |
1038 | start_trans = 0; | 1037 | start_trans = 0; |
1039 | 1038 | ||
1040 | ret = __dwc3_gadget_kick_transfer(dep, 0, start_trans); | 1039 | ret = __dwc3_gadget_kick_transfer(dep, 0, start_trans); |
1041 | if (ret && ret != -EBUSY) { | 1040 | if (ret && ret != -EBUSY) { |
1042 | struct dwc3 *dwc = dep->dwc; | 1041 | struct dwc3 *dwc = dep->dwc; |
1043 | 1042 | ||
@@ -1291,10 +1290,10 @@ static int dwc3_gadget_wakeup(struct usb_gadget *g) | |||
1291 | reg &= ~DWC3_DCTL_ULSTCHNGREQ_MASK; | 1290 | reg &= ~DWC3_DCTL_ULSTCHNGREQ_MASK; |
1292 | dwc3_writel(dwc->regs, DWC3_DCTL, reg); | 1291 | dwc3_writel(dwc->regs, DWC3_DCTL, reg); |
1293 | 1292 | ||
1294 | /* pool until Link State change to ON */ | 1293 | /* poll until Link State changes to ON */ |
1295 | timeout = jiffies + msecs_to_jiffies(100); | 1294 | timeout = jiffies + msecs_to_jiffies(100); |
1296 | 1295 | ||
1297 | while (!(time_after(jiffies, timeout))) { | 1296 | while (!time_after(jiffies, timeout)) { |
1298 | reg = dwc3_readl(dwc->regs, DWC3_DSTS); | 1297 | reg = dwc3_readl(dwc->regs, DWC3_DSTS); |
1299 | 1298 | ||
1300 | /* in HS, means ON */ | 1299 | /* in HS, means ON */ |
@@ -1558,10 +1557,10 @@ static int dwc3_cleanup_done_reqs(struct dwc3 *dwc, struct dwc3_ep *dep, | |||
1558 | if ((trb->ctrl & DWC3_TRB_CTRL_HWO) && status != -ESHUTDOWN) | 1557 | if ((trb->ctrl & DWC3_TRB_CTRL_HWO) && status != -ESHUTDOWN) |
1559 | /* | 1558 | /* |
1560 | * We continue despite the error. There is not much we | 1559 | * We continue despite the error. There is not much we |
1561 | * can do. If we don't clean in up we loop for ever. If | 1560 | * can do. If we don't clean it up we loop forever. If |
1562 | * we skip the TRB than it gets overwritten reused after | 1561 | * we skip the TRB then it gets overwritten after a |
1563 | * a while since we use them in a ring buffer. a BUG() | 1562 | * while since we use them in a ring buffer. A BUG() |
1564 | * would help. Lets hope that if this occures, someone | 1563 | * would help. Lets hope that if this occurs, someone |
1565 | * fixes the root cause instead of looking away :) | 1564 | * fixes the root cause instead of looking away :) |
1566 | */ | 1565 | */ |
1567 | dev_err(dwc->dev, "%s's TRB (%p) still owned by HW\n", | 1566 | dev_err(dwc->dev, "%s's TRB (%p) still owned by HW\n", |
@@ -1614,7 +1613,7 @@ static void dwc3_endpoint_transfer_complete(struct dwc3 *dwc, | |||
1614 | if (event->status & DEPEVT_STATUS_BUSERR) | 1613 | if (event->status & DEPEVT_STATUS_BUSERR) |
1615 | status = -ECONNRESET; | 1614 | status = -ECONNRESET; |
1616 | 1615 | ||
1617 | clean_busy = dwc3_cleanup_done_reqs(dwc, dep, event, status); | 1616 | clean_busy = dwc3_cleanup_done_reqs(dwc, dep, event, status); |
1618 | if (clean_busy) { | 1617 | if (clean_busy) { |
1619 | dep->flags &= ~DWC3_EP_BUSY; | 1618 | dep->flags &= ~DWC3_EP_BUSY; |
1620 | dep->res_trans_idx = 0; | 1619 | dep->res_trans_idx = 0; |
@@ -1678,8 +1677,8 @@ static void dwc3_process_ep_cmd_complete(struct dwc3_ep *dep, | |||
1678 | struct dwc3_event_depevt mod_ev = *event; | 1677 | struct dwc3_event_depevt mod_ev = *event; |
1679 | 1678 | ||
1680 | /* | 1679 | /* |
1681 | * We were asked to remove one requests. It is possible that this | 1680 | * We were asked to remove one request. It is possible that this |
1682 | * request and a few other were started together and have the same | 1681 | * request and a few others were started together and have the same |
1683 | * transfer index. Since we stopped the complete endpoint we don't | 1682 | * transfer index. Since we stopped the complete endpoint we don't |
1684 | * know how many requests were already completed (and not yet) | 1683 | * know how many requests were already completed (and not yet) |
1685 | * reported and how could be done (later). We purge them all until | 1684 | * reported and how could be done (later). We purge them all until |
@@ -1688,7 +1687,7 @@ static void dwc3_process_ep_cmd_complete(struct dwc3_ep *dep, | |||
1688 | mod_ev.status = DEPEVT_STATUS_LST; | 1687 | mod_ev.status = DEPEVT_STATUS_LST; |
1689 | dwc3_cleanup_done_reqs(dwc, dep, &mod_ev, -ESHUTDOWN); | 1688 | dwc3_cleanup_done_reqs(dwc, dep, &mod_ev, -ESHUTDOWN); |
1690 | dep->flags &= ~DWC3_EP_BUSY; | 1689 | dep->flags &= ~DWC3_EP_BUSY; |
1691 | /* pending requets are ignored and are queued on XferNotReady */ | 1690 | /* pending requests are ignored and are queued on XferNotReady */ |
1692 | } | 1691 | } |
1693 | 1692 | ||
1694 | static void dwc3_ep_cmd_compl(struct dwc3_ep *dep, | 1693 | static void dwc3_ep_cmd_compl(struct dwc3_ep *dep, |
@@ -2285,7 +2284,7 @@ static irqreturn_t dwc3_interrupt(int irq, void *_dwc) | |||
2285 | 2284 | ||
2286 | /** | 2285 | /** |
2287 | * dwc3_gadget_init - Initializes gadget related registers | 2286 | * dwc3_gadget_init - Initializes gadget related registers |
2288 | * @dwc: Pointer to out controller context structure | 2287 | * @dwc: pointer to our controller context structure |
2289 | * | 2288 | * |
2290 | * Returns 0 on success otherwise negative errno. | 2289 | * Returns 0 on success otherwise negative errno. |
2291 | */ | 2290 | */ |