diff options
author | Sarah Sharp <sarah.a.sharp@linux.intel.com> | 2009-08-07 17:04:43 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-23 09:46:17 -0400 |
commit | f2217e8edd95b0428d8123d426e0097a5e955f9f (patch) | |
tree | 2364fb618dcae52cc8b6a947ce75152983dc3a9a /drivers/usb/host/xhci-ring.c | |
parent | 018218d1d9eb06116d24a02dd5e7a390f0353d0f (diff) |
USB: xhci: Configure endpoint code refactoring.
Refactor out the code issue, wait for, and parse the event completion code
for a configure endpoint command. Modify it to support the evaluate
context command, which has a very similar submission process. Add
functions to copy parts of the output context into the input context
(which will be used in the evaluate context command).
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/xhci-ring.c')
-rw-r--r-- | drivers/usb/host/xhci-ring.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 011458f4d9ce..ac5c662368ed 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c | |||
@@ -1740,6 +1740,15 @@ int xhci_queue_configure_endpoint(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr, | |||
1740 | TRB_TYPE(TRB_CONFIG_EP) | SLOT_ID_FOR_TRB(slot_id)); | 1740 | TRB_TYPE(TRB_CONFIG_EP) | SLOT_ID_FOR_TRB(slot_id)); |
1741 | } | 1741 | } |
1742 | 1742 | ||
1743 | /* Queue an evaluate context command TRB */ | ||
1744 | int xhci_queue_evaluate_context(struct xhci_hcd *xhci, dma_addr_t in_ctx_ptr, | ||
1745 | u32 slot_id) | ||
1746 | { | ||
1747 | return queue_command(xhci, lower_32_bits(in_ctx_ptr), | ||
1748 | upper_32_bits(in_ctx_ptr), 0, | ||
1749 | TRB_TYPE(TRB_EVAL_CONTEXT) | SLOT_ID_FOR_TRB(slot_id)); | ||
1750 | } | ||
1751 | |||
1743 | int xhci_queue_stop_endpoint(struct xhci_hcd *xhci, int slot_id, | 1752 | int xhci_queue_stop_endpoint(struct xhci_hcd *xhci, int slot_id, |
1744 | unsigned int ep_index) | 1753 | unsigned int ep_index) |
1745 | { | 1754 | { |