aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/xhci.c')
-rw-r--r--drivers/usb/host/xhci.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 1e3f39cfff28..e2827655a525 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -1273,7 +1273,7 @@ static int xhci_check_maxpacket(struct xhci_hcd *xhci, unsigned int slot_id,
1273 return -ENOMEM; 1273 return -ENOMEM;
1274 1274
1275 command->in_ctx = xhci->devs[slot_id]->in_ctx; 1275 command->in_ctx = xhci->devs[slot_id]->in_ctx;
1276 ctrl_ctx = xhci_get_input_control_ctx(xhci, command->in_ctx); 1276 ctrl_ctx = xhci_get_input_control_ctx(command->in_ctx);
1277 if (!ctrl_ctx) { 1277 if (!ctrl_ctx) {
1278 xhci_warn(xhci, "%s: Could not get input context, bad type.\n", 1278 xhci_warn(xhci, "%s: Could not get input context, bad type.\n",
1279 __func__); 1279 __func__);
@@ -1371,7 +1371,7 @@ int xhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags)
1371 ret = xhci_check_maxpacket(xhci, slot_id, 1371 ret = xhci_check_maxpacket(xhci, slot_id,
1372 ep_index, urb); 1372 ep_index, urb);
1373 if (ret < 0) { 1373 if (ret < 0) {
1374 xhci_urb_free_priv(xhci, urb_priv); 1374 xhci_urb_free_priv(urb_priv);
1375 urb->hcpriv = NULL; 1375 urb->hcpriv = NULL;
1376 return ret; 1376 return ret;
1377 } 1377 }
@@ -1437,7 +1437,7 @@ dying:
1437 urb->ep->desc.bEndpointAddress, urb); 1437 urb->ep->desc.bEndpointAddress, urb);
1438 ret = -ESHUTDOWN; 1438 ret = -ESHUTDOWN;
1439free_priv: 1439free_priv:
1440 xhci_urb_free_priv(xhci, urb_priv); 1440 xhci_urb_free_priv(urb_priv);
1441 urb->hcpriv = NULL; 1441 urb->hcpriv = NULL;
1442 spin_unlock_irqrestore(&xhci->lock, flags); 1442 spin_unlock_irqrestore(&xhci->lock, flags);
1443 return ret; 1443 return ret;
@@ -1550,7 +1550,7 @@ int xhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
1550 usb_hcd_unlink_urb_from_ep(hcd, urb); 1550 usb_hcd_unlink_urb_from_ep(hcd, urb);
1551 spin_unlock_irqrestore(&xhci->lock, flags); 1551 spin_unlock_irqrestore(&xhci->lock, flags);
1552 usb_hcd_giveback_urb(hcd, urb, -ESHUTDOWN); 1552 usb_hcd_giveback_urb(hcd, urb, -ESHUTDOWN);
1553 xhci_urb_free_priv(xhci, urb_priv); 1553 xhci_urb_free_priv(urb_priv);
1554 return ret; 1554 return ret;
1555 } 1555 }
1556 if ((xhci->xhc_state & XHCI_STATE_DYING) || 1556 if ((xhci->xhc_state & XHCI_STATE_DYING) ||
@@ -1657,7 +1657,7 @@ int xhci_drop_endpoint(struct usb_hcd *hcd, struct usb_device *udev,
1657 1657
1658 in_ctx = xhci->devs[udev->slot_id]->in_ctx; 1658 in_ctx = xhci->devs[udev->slot_id]->in_ctx;
1659 out_ctx = xhci->devs[udev->slot_id]->out_ctx; 1659 out_ctx = xhci->devs[udev->slot_id]->out_ctx;
1660 ctrl_ctx = xhci_get_input_control_ctx(xhci, in_ctx); 1660 ctrl_ctx = xhci_get_input_control_ctx(in_ctx);
1661 if (!ctrl_ctx) { 1661 if (!ctrl_ctx) {
1662 xhci_warn(xhci, "%s: Could not get input context, bad type.\n", 1662 xhci_warn(xhci, "%s: Could not get input context, bad type.\n",
1663 __func__); 1663 __func__);
@@ -1742,7 +1742,7 @@ int xhci_add_endpoint(struct usb_hcd *hcd, struct usb_device *udev,
1742 1742
1743 virt_dev = xhci->devs[udev->slot_id]; 1743 virt_dev = xhci->devs[udev->slot_id];
1744 in_ctx = virt_dev->in_ctx; 1744 in_ctx = virt_dev->in_ctx;
1745 ctrl_ctx = xhci_get_input_control_ctx(xhci, in_ctx); 1745 ctrl_ctx = xhci_get_input_control_ctx(in_ctx);
1746 if (!ctrl_ctx) { 1746 if (!ctrl_ctx) {
1747 xhci_warn(xhci, "%s: Could not get input context, bad type.\n", 1747 xhci_warn(xhci, "%s: Could not get input context, bad type.\n",
1748 __func__); 1748 __func__);
@@ -1810,7 +1810,7 @@ static void xhci_zero_in_ctx(struct xhci_hcd *xhci, struct xhci_virt_device *vir
1810 struct xhci_slot_ctx *slot_ctx; 1810 struct xhci_slot_ctx *slot_ctx;
1811 int i; 1811 int i;
1812 1812
1813 ctrl_ctx = xhci_get_input_control_ctx(xhci, virt_dev->in_ctx); 1813 ctrl_ctx = xhci_get_input_control_ctx(virt_dev->in_ctx);
1814 if (!ctrl_ctx) { 1814 if (!ctrl_ctx) {
1815 xhci_warn(xhci, "%s: Could not get input context, bad type.\n", 1815 xhci_warn(xhci, "%s: Could not get input context, bad type.\n",
1816 __func__); 1816 __func__);
@@ -2536,7 +2536,7 @@ static int xhci_reserve_bandwidth(struct xhci_hcd *xhci,
2536 if (virt_dev->tt_info) 2536 if (virt_dev->tt_info)
2537 old_active_eps = virt_dev->tt_info->active_eps; 2537 old_active_eps = virt_dev->tt_info->active_eps;
2538 2538
2539 ctrl_ctx = xhci_get_input_control_ctx(xhci, in_ctx); 2539 ctrl_ctx = xhci_get_input_control_ctx(in_ctx);
2540 if (!ctrl_ctx) { 2540 if (!ctrl_ctx) {
2541 xhci_warn(xhci, "%s: Could not get input context, bad type.\n", 2541 xhci_warn(xhci, "%s: Could not get input context, bad type.\n",
2542 __func__); 2542 __func__);
@@ -2633,7 +2633,7 @@ static int xhci_configure_endpoint(struct xhci_hcd *xhci,
2633 spin_lock_irqsave(&xhci->lock, flags); 2633 spin_lock_irqsave(&xhci->lock, flags);
2634 virt_dev = xhci->devs[udev->slot_id]; 2634 virt_dev = xhci->devs[udev->slot_id];
2635 2635
2636 ctrl_ctx = xhci_get_input_control_ctx(xhci, command->in_ctx); 2636 ctrl_ctx = xhci_get_input_control_ctx(command->in_ctx);
2637 if (!ctrl_ctx) { 2637 if (!ctrl_ctx) {
2638 spin_unlock_irqrestore(&xhci->lock, flags); 2638 spin_unlock_irqrestore(&xhci->lock, flags);
2639 xhci_warn(xhci, "%s: Could not get input context, bad type.\n", 2639 xhci_warn(xhci, "%s: Could not get input context, bad type.\n",
@@ -2752,7 +2752,7 @@ int xhci_check_bandwidth(struct usb_hcd *hcd, struct usb_device *udev)
2752 command->in_ctx = virt_dev->in_ctx; 2752 command->in_ctx = virt_dev->in_ctx;
2753 2753
2754 /* See section 4.6.6 - A0 = 1; A1 = D0 = D1 = 0 */ 2754 /* See section 4.6.6 - A0 = 1; A1 = D0 = D1 = 0 */
2755 ctrl_ctx = xhci_get_input_control_ctx(xhci, command->in_ctx); 2755 ctrl_ctx = xhci_get_input_control_ctx(command->in_ctx);
2756 if (!ctrl_ctx) { 2756 if (!ctrl_ctx) {
2757 xhci_warn(xhci, "%s: Could not get input context, bad type.\n", 2757 xhci_warn(xhci, "%s: Could not get input context, bad type.\n",
2758 __func__); 2758 __func__);
@@ -2877,7 +2877,7 @@ static void xhci_setup_input_ctx_for_quirk(struct xhci_hcd *xhci,
2877 dma_addr_t addr; 2877 dma_addr_t addr;
2878 2878
2879 in_ctx = xhci->devs[slot_id]->in_ctx; 2879 in_ctx = xhci->devs[slot_id]->in_ctx;
2880 ctrl_ctx = xhci_get_input_control_ctx(xhci, in_ctx); 2880 ctrl_ctx = xhci_get_input_control_ctx(in_ctx);
2881 if (!ctrl_ctx) { 2881 if (!ctrl_ctx) {
2882 xhci_warn(xhci, "%s: Could not get input context, bad type.\n", 2882 xhci_warn(xhci, "%s: Could not get input context, bad type.\n",
2883 __func__); 2883 __func__);
@@ -3167,7 +3167,7 @@ int xhci_alloc_streams(struct usb_hcd *hcd, struct usb_device *udev,
3167 xhci_dbg(xhci, "Could not allocate xHCI command structure.\n"); 3167 xhci_dbg(xhci, "Could not allocate xHCI command structure.\n");
3168 return -ENOMEM; 3168 return -ENOMEM;
3169 } 3169 }
3170 ctrl_ctx = xhci_get_input_control_ctx(xhci, config_cmd->in_ctx); 3170 ctrl_ctx = xhci_get_input_control_ctx(config_cmd->in_ctx);
3171 if (!ctrl_ctx) { 3171 if (!ctrl_ctx) {
3172 xhci_warn(xhci, "%s: Could not get input context, bad type.\n", 3172 xhci_warn(xhci, "%s: Could not get input context, bad type.\n",
3173 __func__); 3173 __func__);
@@ -3322,7 +3322,7 @@ int xhci_free_streams(struct usb_hcd *hcd, struct usb_device *udev,
3322 */ 3322 */
3323 ep_index = xhci_get_endpoint_index(&eps[0]->desc); 3323 ep_index = xhci_get_endpoint_index(&eps[0]->desc);
3324 command = vdev->eps[ep_index].stream_info->free_streams_command; 3324 command = vdev->eps[ep_index].stream_info->free_streams_command;
3325 ctrl_ctx = xhci_get_input_control_ctx(xhci, command->in_ctx); 3325 ctrl_ctx = xhci_get_input_control_ctx(command->in_ctx);
3326 if (!ctrl_ctx) { 3326 if (!ctrl_ctx) {
3327 spin_unlock_irqrestore(&xhci->lock, flags); 3327 spin_unlock_irqrestore(&xhci->lock, flags);
3328 xhci_warn(xhci, "%s: Could not get input context, bad type.\n", 3328 xhci_warn(xhci, "%s: Could not get input context, bad type.\n",
@@ -3340,7 +3340,7 @@ int xhci_free_streams(struct usb_hcd *hcd, struct usb_device *udev,
3340 3340
3341 xhci_endpoint_copy(xhci, command->in_ctx, 3341 xhci_endpoint_copy(xhci, command->in_ctx,
3342 vdev->out_ctx, ep_index); 3342 vdev->out_ctx, ep_index);
3343 xhci_setup_no_streams_ep_input_ctx(xhci, ep_ctx, 3343 xhci_setup_no_streams_ep_input_ctx(ep_ctx,
3344 &vdev->eps[ep_index]); 3344 &vdev->eps[ep_index]);
3345 } 3345 }
3346 xhci_setup_input_ctx_for_config_ep(xhci, command->in_ctx, 3346 xhci_setup_input_ctx_for_config_ep(xhci, command->in_ctx,
@@ -3805,7 +3805,7 @@ static int xhci_setup_device(struct usb_hcd *hcd, struct usb_device *udev,
3805 command->completion = &xhci->addr_dev; 3805 command->completion = &xhci->addr_dev;
3806 3806
3807 slot_ctx = xhci_get_slot_ctx(xhci, virt_dev->in_ctx); 3807 slot_ctx = xhci_get_slot_ctx(xhci, virt_dev->in_ctx);
3808 ctrl_ctx = xhci_get_input_control_ctx(xhci, virt_dev->in_ctx); 3808 ctrl_ctx = xhci_get_input_control_ctx(virt_dev->in_ctx);
3809 if (!ctrl_ctx) { 3809 if (!ctrl_ctx) {
3810 xhci_warn(xhci, "%s: Could not get input context, bad type.\n", 3810 xhci_warn(xhci, "%s: Could not get input context, bad type.\n",
3811 __func__); 3811 __func__);
@@ -3988,7 +3988,7 @@ static int __maybe_unused xhci_change_max_exit_latency(struct xhci_hcd *xhci,
3988 3988
3989 /* Attempt to issue an Evaluate Context command to change the MEL. */ 3989 /* Attempt to issue an Evaluate Context command to change the MEL. */
3990 command = xhci->lpm_command; 3990 command = xhci->lpm_command;
3991 ctrl_ctx = xhci_get_input_control_ctx(xhci, command->in_ctx); 3991 ctrl_ctx = xhci_get_input_control_ctx(command->in_ctx);
3992 if (!ctrl_ctx) { 3992 if (!ctrl_ctx) {
3993 spin_unlock_irqrestore(&xhci->lock, flags); 3993 spin_unlock_irqrestore(&xhci->lock, flags);
3994 xhci_warn(xhci, "%s: Could not get input context, bad type.\n", 3994 xhci_warn(xhci, "%s: Could not get input context, bad type.\n",
@@ -4726,7 +4726,7 @@ int xhci_update_hub_device(struct usb_hcd *hcd, struct usb_device *hdev,
4726 xhci_dbg(xhci, "Could not allocate xHCI command structure.\n"); 4726 xhci_dbg(xhci, "Could not allocate xHCI command structure.\n");
4727 return -ENOMEM; 4727 return -ENOMEM;
4728 } 4728 }
4729 ctrl_ctx = xhci_get_input_control_ctx(xhci, config_cmd->in_ctx); 4729 ctrl_ctx = xhci_get_input_control_ctx(config_cmd->in_ctx);
4730 if (!ctrl_ctx) { 4730 if (!ctrl_ctx) {
4731 xhci_warn(xhci, "%s: Could not get input context, bad type.\n", 4731 xhci_warn(xhci, "%s: Could not get input context, bad type.\n",
4732 __func__); 4732 __func__);