diff options
author | Lin Wang <lin.x.wang@intel.com> | 2015-01-09 09:06:31 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-01-09 13:05:47 -0500 |
commit | 4daf9df51fbfb03b8c2bcb538cb467f7c7af1f11 (patch) | |
tree | 33c82a9a637ed8447f3e288df21b339fef20779d | |
parent | 9e08a03dc12a41ce695559f8c6d999aaf245b8be (diff) |
xhci: clean up work to remove unused parameters for functions in xhci-mem.c
Some parameters are not used by functions in xhci-mem.c, just
remove it.
Changes compared to v1:
- Rebase to the latest usb-next branch
Signed-off-by: Lin Wang <lin.x.wang@intel.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/host/xhci-dbg.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/xhci-mem.c | 21 | ||||
-rw-r--r-- | drivers/usb/host/xhci-ring.c | 6 | ||||
-rw-r--r-- | drivers/usb/host/xhci.c | 34 | ||||
-rw-r--r-- | drivers/usb/host/xhci.h | 7 |
5 files changed, 33 insertions, 37 deletions
diff --git a/drivers/usb/host/xhci-dbg.c b/drivers/usb/host/xhci-dbg.c index bb89175ca6e5..745717ec9c89 100644 --- a/drivers/usb/host/xhci-dbg.c +++ b/drivers/usb/host/xhci-dbg.c | |||
@@ -552,7 +552,7 @@ void xhci_dbg_ctx(struct xhci_hcd *xhci, | |||
552 | 552 | ||
553 | if (ctx->type == XHCI_CTX_TYPE_INPUT) { | 553 | if (ctx->type == XHCI_CTX_TYPE_INPUT) { |
554 | struct xhci_input_control_ctx *ctrl_ctx = | 554 | struct xhci_input_control_ctx *ctrl_ctx = |
555 | xhci_get_input_control_ctx(xhci, ctx); | 555 | xhci_get_input_control_ctx(ctx); |
556 | if (!ctrl_ctx) { | 556 | if (!ctrl_ctx) { |
557 | xhci_warn(xhci, "Could not get input context, bad type.\n"); | 557 | xhci_warn(xhci, "Could not get input context, bad type.\n"); |
558 | return; | 558 | return; |
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index e72265c06f52..f8336408ef07 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c | |||
@@ -535,7 +535,7 @@ static void xhci_free_container_ctx(struct xhci_hcd *xhci, | |||
535 | kfree(ctx); | 535 | kfree(ctx); |
536 | } | 536 | } |
537 | 537 | ||
538 | struct xhci_input_control_ctx *xhci_get_input_control_ctx(struct xhci_hcd *xhci, | 538 | struct xhci_input_control_ctx *xhci_get_input_control_ctx( |
539 | struct xhci_container_ctx *ctx) | 539 | struct xhci_container_ctx *ctx) |
540 | { | 540 | { |
541 | if (ctx->type != XHCI_CTX_TYPE_INPUT) | 541 | if (ctx->type != XHCI_CTX_TYPE_INPUT) |
@@ -784,8 +784,7 @@ void xhci_setup_streams_ep_input_ctx(struct xhci_hcd *xhci, | |||
784 | * Reinstalls the "normal" endpoint ring (at its previous dequeue mark, | 784 | * Reinstalls the "normal" endpoint ring (at its previous dequeue mark, |
785 | * not at the beginning of the ring). | 785 | * not at the beginning of the ring). |
786 | */ | 786 | */ |
787 | void xhci_setup_no_streams_ep_input_ctx(struct xhci_hcd *xhci, | 787 | void xhci_setup_no_streams_ep_input_ctx(struct xhci_ep_ctx *ep_ctx, |
788 | struct xhci_ep_ctx *ep_ctx, | ||
789 | struct xhci_virt_ep *ep) | 788 | struct xhci_virt_ep *ep) |
790 | { | 789 | { |
791 | dma_addr_t addr; | 790 | dma_addr_t addr; |
@@ -1341,8 +1340,7 @@ static u32 xhci_get_endpoint_mult(struct usb_device *udev, | |||
1341 | return ep->ss_ep_comp.bmAttributes; | 1340 | return ep->ss_ep_comp.bmAttributes; |
1342 | } | 1341 | } |
1343 | 1342 | ||
1344 | static u32 xhci_get_endpoint_type(struct usb_device *udev, | 1343 | static u32 xhci_get_endpoint_type(struct usb_host_endpoint *ep) |
1345 | struct usb_host_endpoint *ep) | ||
1346 | { | 1344 | { |
1347 | int in; | 1345 | int in; |
1348 | u32 type; | 1346 | u32 type; |
@@ -1375,8 +1373,7 @@ static u32 xhci_get_endpoint_type(struct usb_device *udev, | |||
1375 | * Basically, this is the maxpacket size, multiplied by the burst size | 1373 | * Basically, this is the maxpacket size, multiplied by the burst size |
1376 | * and mult size. | 1374 | * and mult size. |
1377 | */ | 1375 | */ |
1378 | static u32 xhci_get_max_esit_payload(struct xhci_hcd *xhci, | 1376 | static u32 xhci_get_max_esit_payload(struct usb_device *udev, |
1379 | struct usb_device *udev, | ||
1380 | struct usb_host_endpoint *ep) | 1377 | struct usb_host_endpoint *ep) |
1381 | { | 1378 | { |
1382 | int max_burst; | 1379 | int max_burst; |
@@ -1417,7 +1414,7 @@ int xhci_endpoint_init(struct xhci_hcd *xhci, | |||
1417 | ep_index = xhci_get_endpoint_index(&ep->desc); | 1414 | ep_index = xhci_get_endpoint_index(&ep->desc); |
1418 | ep_ctx = xhci_get_ep_ctx(xhci, virt_dev->in_ctx, ep_index); | 1415 | ep_ctx = xhci_get_ep_ctx(xhci, virt_dev->in_ctx, ep_index); |
1419 | 1416 | ||
1420 | endpoint_type = xhci_get_endpoint_type(udev, ep); | 1417 | endpoint_type = xhci_get_endpoint_type(ep); |
1421 | if (!endpoint_type) | 1418 | if (!endpoint_type) |
1422 | return -EINVAL; | 1419 | return -EINVAL; |
1423 | ep_ctx->ep_info2 = cpu_to_le32(endpoint_type); | 1420 | ep_ctx->ep_info2 = cpu_to_le32(endpoint_type); |
@@ -1483,7 +1480,7 @@ int xhci_endpoint_init(struct xhci_hcd *xhci, | |||
1483 | } | 1480 | } |
1484 | ep_ctx->ep_info2 |= cpu_to_le32(MAX_PACKET(max_packet) | | 1481 | ep_ctx->ep_info2 |= cpu_to_le32(MAX_PACKET(max_packet) | |
1485 | MAX_BURST(max_burst)); | 1482 | MAX_BURST(max_burst)); |
1486 | max_esit_payload = xhci_get_max_esit_payload(xhci, udev, ep); | 1483 | max_esit_payload = xhci_get_max_esit_payload(udev, ep); |
1487 | ep_ctx->tx_info = cpu_to_le32(MAX_ESIT_PAYLOAD_FOR_EP(max_esit_payload)); | 1484 | ep_ctx->tx_info = cpu_to_le32(MAX_ESIT_PAYLOAD_FOR_EP(max_esit_payload)); |
1488 | 1485 | ||
1489 | /* | 1486 | /* |
@@ -1772,7 +1769,7 @@ struct xhci_command *xhci_alloc_command(struct xhci_hcd *xhci, | |||
1772 | return command; | 1769 | return command; |
1773 | } | 1770 | } |
1774 | 1771 | ||
1775 | void xhci_urb_free_priv(struct xhci_hcd *xhci, struct urb_priv *urb_priv) | 1772 | void xhci_urb_free_priv(struct urb_priv *urb_priv) |
1776 | { | 1773 | { |
1777 | if (urb_priv) { | 1774 | if (urb_priv) { |
1778 | kfree(urb_priv->td[0]); | 1775 | kfree(urb_priv->td[0]); |
@@ -1925,7 +1922,7 @@ static int xhci_test_trb_in_td(struct xhci_hcd *xhci, | |||
1925 | } | 1922 | } |
1926 | 1923 | ||
1927 | /* TRB math checks for xhci_trb_in_td(), using the command and event rings. */ | 1924 | /* TRB math checks for xhci_trb_in_td(), using the command and event rings. */ |
1928 | static int xhci_check_trb_in_td_math(struct xhci_hcd *xhci, gfp_t mem_flags) | 1925 | static int xhci_check_trb_in_td_math(struct xhci_hcd *xhci) |
1929 | { | 1926 | { |
1930 | struct { | 1927 | struct { |
1931 | dma_addr_t input_dma; | 1928 | dma_addr_t input_dma; |
@@ -2451,7 +2448,7 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags) | |||
2451 | flags); | 2448 | flags); |
2452 | if (!xhci->event_ring) | 2449 | if (!xhci->event_ring) |
2453 | goto fail; | 2450 | goto fail; |
2454 | if (xhci_check_trb_in_td_math(xhci, flags) < 0) | 2451 | if (xhci_check_trb_in_td_math(xhci) < 0) |
2455 | goto fail; | 2452 | goto fail; |
2456 | 2453 | ||
2457 | xhci->erst.entries = dma_alloc_coherent(dev, | 2454 | xhci->erst.entries = dma_alloc_coherent(dev, |
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index c84a959b1480..067f18a46690 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c | |||
@@ -609,7 +609,7 @@ static void xhci_giveback_urb_in_irq(struct xhci_hcd *xhci, | |||
609 | 609 | ||
610 | spin_unlock(&xhci->lock); | 610 | spin_unlock(&xhci->lock); |
611 | usb_hcd_giveback_urb(hcd, urb, status); | 611 | usb_hcd_giveback_urb(hcd, urb, status); |
612 | xhci_urb_free_priv(xhci, urb_priv); | 612 | xhci_urb_free_priv(urb_priv); |
613 | spin_lock(&xhci->lock); | 613 | spin_lock(&xhci->lock); |
614 | } | 614 | } |
615 | } | 615 | } |
@@ -1110,7 +1110,7 @@ static void xhci_handle_cmd_config_ep(struct xhci_hcd *xhci, int slot_id, | |||
1110 | * is not waiting on the configure endpoint command. | 1110 | * is not waiting on the configure endpoint command. |
1111 | */ | 1111 | */ |
1112 | virt_dev = xhci->devs[slot_id]; | 1112 | virt_dev = xhci->devs[slot_id]; |
1113 | ctrl_ctx = xhci_get_input_control_ctx(xhci, virt_dev->in_ctx); | 1113 | ctrl_ctx = xhci_get_input_control_ctx(virt_dev->in_ctx); |
1114 | if (!ctrl_ctx) { | 1114 | if (!ctrl_ctx) { |
1115 | xhci_warn(xhci, "Could not get input context, bad type.\n"); | 1115 | xhci_warn(xhci, "Could not get input context, bad type.\n"); |
1116 | return; | 1116 | return; |
@@ -2497,7 +2497,7 @@ cleanup: | |||
2497 | urb = td->urb; | 2497 | urb = td->urb; |
2498 | urb_priv = urb->hcpriv; | 2498 | urb_priv = urb->hcpriv; |
2499 | 2499 | ||
2500 | xhci_urb_free_priv(xhci, urb_priv); | 2500 | xhci_urb_free_priv(urb_priv); |
2501 | 2501 | ||
2502 | usb_hcd_unlink_urb_from_ep(bus_to_hcd(urb->dev->bus), urb); | 2502 | usb_hcd_unlink_urb_from_ep(bus_to_hcd(urb->dev->bus), urb); |
2503 | if ((urb->actual_length != urb->transfer_buffer_length && | 2503 | if ((urb->actual_length != urb->transfer_buffer_length && |
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; |
1439 | free_priv: | 1439 | free_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__); |
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index eeea5c074493..e23f31d029a3 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h | |||
@@ -1712,8 +1712,7 @@ void xhci_free_stream_info(struct xhci_hcd *xhci, | |||
1712 | void xhci_setup_streams_ep_input_ctx(struct xhci_hcd *xhci, | 1712 | void xhci_setup_streams_ep_input_ctx(struct xhci_hcd *xhci, |
1713 | struct xhci_ep_ctx *ep_ctx, | 1713 | struct xhci_ep_ctx *ep_ctx, |
1714 | struct xhci_stream_info *stream_info); | 1714 | struct xhci_stream_info *stream_info); |
1715 | void xhci_setup_no_streams_ep_input_ctx(struct xhci_hcd *xhci, | 1715 | void xhci_setup_no_streams_ep_input_ctx(struct xhci_ep_ctx *ep_ctx, |
1716 | struct xhci_ep_ctx *ep_ctx, | ||
1717 | struct xhci_virt_ep *ep); | 1716 | struct xhci_virt_ep *ep); |
1718 | void xhci_free_device_endpoint_resources(struct xhci_hcd *xhci, | 1717 | void xhci_free_device_endpoint_resources(struct xhci_hcd *xhci, |
1719 | struct xhci_virt_device *virt_dev, bool drop_control_ep); | 1718 | struct xhci_virt_device *virt_dev, bool drop_control_ep); |
@@ -1727,7 +1726,7 @@ struct xhci_ring *xhci_stream_id_to_ring( | |||
1727 | struct xhci_command *xhci_alloc_command(struct xhci_hcd *xhci, | 1726 | struct xhci_command *xhci_alloc_command(struct xhci_hcd *xhci, |
1728 | bool allocate_in_ctx, bool allocate_completion, | 1727 | bool allocate_in_ctx, bool allocate_completion, |
1729 | gfp_t mem_flags); | 1728 | gfp_t mem_flags); |
1730 | void xhci_urb_free_priv(struct xhci_hcd *xhci, struct urb_priv *urb_priv); | 1729 | void xhci_urb_free_priv(struct urb_priv *urb_priv); |
1731 | void xhci_free_command(struct xhci_hcd *xhci, | 1730 | void xhci_free_command(struct xhci_hcd *xhci, |
1732 | struct xhci_command *command); | 1731 | struct xhci_command *command); |
1733 | 1732 | ||
@@ -1863,7 +1862,7 @@ int xhci_find_slot_id_by_port(struct usb_hcd *hcd, struct xhci_hcd *xhci, | |||
1863 | void xhci_ring_device(struct xhci_hcd *xhci, int slot_id); | 1862 | void xhci_ring_device(struct xhci_hcd *xhci, int slot_id); |
1864 | 1863 | ||
1865 | /* xHCI contexts */ | 1864 | /* xHCI contexts */ |
1866 | struct xhci_input_control_ctx *xhci_get_input_control_ctx(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx); | 1865 | struct xhci_input_control_ctx *xhci_get_input_control_ctx(struct xhci_container_ctx *ctx); |
1867 | struct xhci_slot_ctx *xhci_get_slot_ctx(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx); | 1866 | struct xhci_slot_ctx *xhci_get_slot_ctx(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx); |
1868 | struct xhci_ep_ctx *xhci_get_ep_ctx(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx, unsigned int ep_index); | 1867 | struct xhci_ep_ctx *xhci_get_ep_ctx(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx, unsigned int ep_index); |
1869 | 1868 | ||