提交 d36374fd 编写于 作者: M Mathias Nyman 提交者: Greg Kroah-Hartman

xhci: cleanup virtual endoint structure, remove stopped_stream

Get rid of stopped_stream member in virtual endpoint structure as
it is only used in one case when cleaning a halted endpoint.

Pass it as function parameter instead.

No functional changes
Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 ade2e3a1
...@@ -1832,11 +1832,8 @@ static void xhci_cleanup_halted_endpoint(struct xhci_hcd *xhci, ...@@ -1832,11 +1832,8 @@ static void xhci_cleanup_halted_endpoint(struct xhci_hcd *xhci,
xhci_queue_reset_ep(xhci, command, slot_id, ep_index, reset_type); xhci_queue_reset_ep(xhci, command, slot_id, ep_index, reset_type);
if (reset_type == EP_HARD_RESET) { if (reset_type == EP_HARD_RESET)
ep->stopped_stream = stream_id; xhci_cleanup_stalled_ring(xhci, ep_index, stream_id, td);
xhci_cleanup_stalled_ring(xhci, ep_index, td);
ep->stopped_stream = 0;
}
xhci_ring_cmd_db(xhci); xhci_ring_cmd_db(xhci);
} }
......
...@@ -2822,8 +2822,8 @@ static void xhci_setup_input_ctx_for_quirk(struct xhci_hcd *xhci, ...@@ -2822,8 +2822,8 @@ static void xhci_setup_input_ctx_for_quirk(struct xhci_hcd *xhci,
added_ctxs, added_ctxs); added_ctxs, added_ctxs);
} }
void xhci_cleanup_stalled_ring(struct xhci_hcd *xhci, void xhci_cleanup_stalled_ring(struct xhci_hcd *xhci, unsigned int ep_index,
unsigned int ep_index, struct xhci_td *td) unsigned int stream_id, struct xhci_td *td)
{ {
struct xhci_dequeue_state deq_state; struct xhci_dequeue_state deq_state;
struct xhci_virt_ep *ep; struct xhci_virt_ep *ep;
...@@ -2836,7 +2836,7 @@ void xhci_cleanup_stalled_ring(struct xhci_hcd *xhci, ...@@ -2836,7 +2836,7 @@ void xhci_cleanup_stalled_ring(struct xhci_hcd *xhci,
* or it will attempt to resend it on the next doorbell ring. * or it will attempt to resend it on the next doorbell ring.
*/ */
xhci_find_new_dequeue_state(xhci, udev->slot_id, xhci_find_new_dequeue_state(xhci, udev->slot_id,
ep_index, ep->stopped_stream, td, &deq_state); ep_index, stream_id, td, &deq_state);
if (!deq_state.new_deq_ptr || !deq_state.new_deq_seg) if (!deq_state.new_deq_ptr || !deq_state.new_deq_seg)
return; return;
......
...@@ -924,7 +924,6 @@ struct xhci_virt_ep { ...@@ -924,7 +924,6 @@ struct xhci_virt_ep {
#define EP_GETTING_NO_STREAMS (1 << 5) #define EP_GETTING_NO_STREAMS (1 << 5)
/* ---- Related to URB cancellation ---- */ /* ---- Related to URB cancellation ---- */
struct list_head cancelled_td_list; struct list_head cancelled_td_list;
unsigned int stopped_stream;
/* Watchdog timer for stop endpoint command to cancel URBs */ /* Watchdog timer for stop endpoint command to cancel URBs */
struct timer_list stop_cmd_timer; struct timer_list stop_cmd_timer;
struct xhci_hcd *xhci; struct xhci_hcd *xhci;
...@@ -2056,8 +2055,8 @@ void xhci_find_new_dequeue_state(struct xhci_hcd *xhci, ...@@ -2056,8 +2055,8 @@ void xhci_find_new_dequeue_state(struct xhci_hcd *xhci,
void xhci_queue_new_dequeue_state(struct xhci_hcd *xhci, void xhci_queue_new_dequeue_state(struct xhci_hcd *xhci,
unsigned int slot_id, unsigned int ep_index, unsigned int slot_id, unsigned int ep_index,
struct xhci_dequeue_state *deq_state); struct xhci_dequeue_state *deq_state);
void xhci_cleanup_stalled_ring(struct xhci_hcd *xhci, void xhci_cleanup_stalled_ring(struct xhci_hcd *xhci, unsigned int ep_index,
unsigned int ep_index, struct xhci_td *td); unsigned int stream_id, struct xhci_td *td);
void xhci_stop_endpoint_command_watchdog(unsigned long arg); void xhci_stop_endpoint_command_watchdog(unsigned long arg);
void xhci_handle_command_timeout(struct work_struct *work); void xhci_handle_command_timeout(struct work_struct *work);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册