aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2012-06-06 05:04:13 -0400
committerFelipe Balbi <balbi@ti.com>2012-06-25 07:00:45 -0400
commitb4996a8631e80a2aaddb5c487ff6b9ad37315f70 (patch)
tree4001dfad7781a59cab6f11f947343dbbc6b36299 /drivers/usb/dwc3
parentb511e5e76bf488cd3eec1048483a3898393a4dca (diff)
usb: dwc3: rename res_trans_idx to resource_index
resource_index is more human readable. No functional changes. Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r--drivers/usb/dwc3/core.h4
-rw-r--r--drivers/usb/dwc3/ep0.c4
-rw-r--r--drivers/usb/dwc3/gadget.c16
3 files changed, 12 insertions, 12 deletions
diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
index d3e56cfb29c3..151eca876dfd 100644
--- a/drivers/usb/dwc3/core.h
+++ b/drivers/usb/dwc3/core.h
@@ -404,7 +404,7 @@ struct dwc3_event_buffer {
404 * @current_trb: index of current used trb 404 * @current_trb: index of current used trb
405 * @number: endpoint number (1 - 15) 405 * @number: endpoint number (1 - 15)
406 * @type: set to bmAttributes & USB_ENDPOINT_XFERTYPE_MASK 406 * @type: set to bmAttributes & USB_ENDPOINT_XFERTYPE_MASK
407 * @res_trans_idx: Resource transfer index 407 * @resource_index: Resource transfer index
408 * @current_uf: Current uf received through last event parameter 408 * @current_uf: Current uf received through last event parameter
409 * @interval: the intervall on which the ISOC transfer is started 409 * @interval: the intervall on which the ISOC transfer is started
410 * @name: a human readable name e.g. ep1out-bulk 410 * @name: a human readable name e.g. ep1out-bulk
@@ -438,7 +438,7 @@ struct dwc3_ep {
438 438
439 u8 number; 439 u8 number;
440 u8 type; 440 u8 type;
441 u8 res_trans_idx; 441 u8 resource_index;
442 u16 current_uf; 442 u16 current_uf;
443 u32 interval; 443 u32 interval;
444 444
diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c
index 90eb1ba65454..9a8f26cef0a1 100644
--- a/drivers/usb/dwc3/ep0.c
+++ b/drivers/usb/dwc3/ep0.c
@@ -113,7 +113,7 @@ static int dwc3_ep0_start_trans(struct dwc3 *dwc, u8 epnum, dma_addr_t buf_dma,
113 } 113 }
114 114
115 dep->flags |= DWC3_EP_BUSY; 115 dep->flags |= DWC3_EP_BUSY;
116 dep->res_trans_idx = dwc3_gadget_ep_get_transfer_index(dwc, 116 dep->resource_index = dwc3_gadget_ep_get_transfer_index(dwc,
117 dep->number); 117 dep->number);
118 118
119 dwc->ep0_next_event = DWC3_EP0_COMPLETE; 119 dwc->ep0_next_event = DWC3_EP0_COMPLETE;
@@ -757,7 +757,7 @@ static void dwc3_ep0_xfer_complete(struct dwc3 *dwc,
757 struct dwc3_ep *dep = dwc->eps[event->endpoint_number]; 757 struct dwc3_ep *dep = dwc->eps[event->endpoint_number];
758 758
759 dep->flags &= ~DWC3_EP_BUSY; 759 dep->flags &= ~DWC3_EP_BUSY;
760 dep->res_trans_idx = 0; 760 dep->resource_index = 0;
761 dwc->setup_packet_pending = false; 761 dwc->setup_packet_pending = false;
762 762
763 switch (dwc->ep0state) { 763 switch (dwc->ep0state) {
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 1c98aee051a5..1b5fbdd859c2 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -1010,9 +1010,9 @@ static int __dwc3_gadget_kick_transfer(struct dwc3_ep *dep, u16 cmd_param,
1010 dep->flags |= DWC3_EP_BUSY; 1010 dep->flags |= DWC3_EP_BUSY;
1011 1011
1012 if (start_new) { 1012 if (start_new) {
1013 dep->res_trans_idx = dwc3_gadget_ep_get_transfer_index(dwc, 1013 dep->resource_index = dwc3_gadget_ep_get_transfer_index(dwc,
1014 dep->number); 1014 dep->number);
1015 WARN_ON_ONCE(!dep->res_trans_idx); 1015 WARN_ON_ONCE(!dep->resource_index);
1016 } 1016 }
1017 1017
1018 return 0; 1018 return 0;
@@ -1105,8 +1105,8 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req)
1105 */ 1105 */
1106 if (usb_endpoint_xfer_isoc(dep->endpoint.desc) && 1106 if (usb_endpoint_xfer_isoc(dep->endpoint.desc) &&
1107 (dep->flags & DWC3_EP_BUSY)) { 1107 (dep->flags & DWC3_EP_BUSY)) {
1108 WARN_ON_ONCE(!dep->res_trans_idx); 1108 WARN_ON_ONCE(!dep->resource_index);
1109 ret = __dwc3_gadget_kick_transfer(dep, dep->res_trans_idx, 1109 ret = __dwc3_gadget_kick_transfer(dep, dep->resource_index,
1110 false); 1110 false);
1111 if (ret && ret != -EBUSY) { 1111 if (ret && ret != -EBUSY) {
1112 struct dwc3 *dwc = dep->dwc; 1112 struct dwc3 *dwc = dep->dwc;
@@ -1790,7 +1790,7 @@ static void dwc3_endpoint_interrupt(struct dwc3 *dwc,
1790 1790
1791 switch (event->endpoint_event) { 1791 switch (event->endpoint_event) {
1792 case DWC3_DEPEVT_XFERCOMPLETE: 1792 case DWC3_DEPEVT_XFERCOMPLETE:
1793 dep->res_trans_idx = 0; 1793 dep->resource_index = 0;
1794 1794
1795 if (usb_endpoint_xfer_isoc(dep->endpoint.desc)) { 1795 if (usb_endpoint_xfer_isoc(dep->endpoint.desc)) {
1796 dev_dbg(dwc->dev, "%s is an Isochronous endpoint\n", 1796 dev_dbg(dwc->dev, "%s is an Isochronous endpoint\n",
@@ -1876,16 +1876,16 @@ static void dwc3_stop_active_transfer(struct dwc3 *dwc, u32 epnum)
1876 1876
1877 dep = dwc->eps[epnum]; 1877 dep = dwc->eps[epnum];
1878 1878
1879 if (!dep->res_trans_idx) 1879 if (!dep->resource_index)
1880 return; 1880 return;
1881 1881
1882 cmd = DWC3_DEPCMD_ENDTRANSFER; 1882 cmd = DWC3_DEPCMD_ENDTRANSFER;
1883 cmd |= DWC3_DEPCMD_HIPRI_FORCERM | DWC3_DEPCMD_CMDIOC; 1883 cmd |= DWC3_DEPCMD_HIPRI_FORCERM | DWC3_DEPCMD_CMDIOC;
1884 cmd |= DWC3_DEPCMD_PARAM(dep->res_trans_idx); 1884 cmd |= DWC3_DEPCMD_PARAM(dep->resource_index);
1885 memset(&params, 0, sizeof(params)); 1885 memset(&params, 0, sizeof(params));
1886 ret = dwc3_send_gadget_ep_cmd(dwc, dep->number, cmd, &params); 1886 ret = dwc3_send_gadget_ep_cmd(dwc, dep->number, cmd, &params);
1887 WARN_ON_ONCE(ret); 1887 WARN_ON_ONCE(ret);
1888 dep->res_trans_idx = 0; 1888 dep->resource_index = 0;
1889} 1889}
1890 1890
1891static void dwc3_stop_active_transfers(struct dwc3 *dwc) 1891static void dwc3_stop_active_transfers(struct dwc3 *dwc)