Commit 7428a253 authored by Mathias Nyman's avatar Mathias Nyman Committed by Greg Kroah-Hartman

xhci: remove unused stream_id parameter from xhci_handle_halted_endpoint()

The stream_id parameter is no longer used when handling halted endpoints.
Remove it
Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20221130091944.2171610-7-mathias.nyman@linux.intel.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a1575120
...@@ -896,7 +896,7 @@ static int xhci_reset_halted_ep(struct xhci_hcd *xhci, unsigned int slot_id, ...@@ -896,7 +896,7 @@ static int xhci_reset_halted_ep(struct xhci_hcd *xhci, unsigned int slot_id,
} }
static int xhci_handle_halted_endpoint(struct xhci_hcd *xhci, static int xhci_handle_halted_endpoint(struct xhci_hcd *xhci,
struct xhci_virt_ep *ep, unsigned int stream_id, struct xhci_virt_ep *ep,
struct xhci_td *td, struct xhci_td *td,
enum xhci_ep_reset_type reset_type) enum xhci_ep_reset_type reset_type)
{ {
...@@ -1110,8 +1110,7 @@ static void xhci_handle_cmd_stop_ep(struct xhci_hcd *xhci, int slot_id, ...@@ -1110,8 +1110,7 @@ static void xhci_handle_cmd_stop_ep(struct xhci_hcd *xhci, int slot_id,
td->status = -EPROTO; td->status = -EPROTO;
} }
/* reset ep, reset handler cleans up cancelled tds */ /* reset ep, reset handler cleans up cancelled tds */
err = xhci_handle_halted_endpoint(xhci, ep, 0, td, err = xhci_handle_halted_endpoint(xhci, ep, td, reset_type);
reset_type);
if (err) if (err)
break; break;
ep->ep_state &= ~EP_STOP_CMD_PENDING; ep->ep_state &= ~EP_STOP_CMD_PENDING;
...@@ -2183,8 +2182,7 @@ static int finish_td(struct xhci_hcd *xhci, struct xhci_virt_ep *ep, ...@@ -2183,8 +2182,7 @@ static int finish_td(struct xhci_hcd *xhci, struct xhci_virt_ep *ep,
} }
/* Almost same procedure as for STALL_ERROR below */ /* Almost same procedure as for STALL_ERROR below */
xhci_clear_hub_tt_buffer(xhci, td, ep); xhci_clear_hub_tt_buffer(xhci, td, ep);
xhci_handle_halted_endpoint(xhci, ep, ep_ring->stream_id, td, xhci_handle_halted_endpoint(xhci, ep, td, EP_HARD_RESET);
EP_HARD_RESET);
return 0; return 0;
case COMP_STALL_ERROR: case COMP_STALL_ERROR:
/* /*
...@@ -2200,8 +2198,7 @@ static int finish_td(struct xhci_hcd *xhci, struct xhci_virt_ep *ep, ...@@ -2200,8 +2198,7 @@ static int finish_td(struct xhci_hcd *xhci, struct xhci_virt_ep *ep,
if (ep->ep_index != 0) if (ep->ep_index != 0)
xhci_clear_hub_tt_buffer(xhci, td, ep); xhci_clear_hub_tt_buffer(xhci, td, ep);
xhci_handle_halted_endpoint(xhci, ep, ep_ring->stream_id, td, xhci_handle_halted_endpoint(xhci, ep, td, EP_HARD_RESET);
EP_HARD_RESET);
return 0; /* xhci_handle_halted_endpoint marked td cancelled */ return 0; /* xhci_handle_halted_endpoint marked td cancelled */
default: default:
...@@ -2490,8 +2487,7 @@ static int process_bulk_intr_td(struct xhci_hcd *xhci, struct xhci_virt_ep *ep, ...@@ -2490,8 +2487,7 @@ static int process_bulk_intr_td(struct xhci_hcd *xhci, struct xhci_virt_ep *ep,
td->status = 0; td->status = 0;
xhci_handle_halted_endpoint(xhci, ep, ep_ring->stream_id, td, xhci_handle_halted_endpoint(xhci, ep, td, EP_SOFT_RESET);
EP_SOFT_RESET);
return 0; return 0;
default: default:
/* do nothing */ /* do nothing */
...@@ -2568,10 +2564,10 @@ static int handle_tx_event(struct xhci_hcd *xhci, ...@@ -2568,10 +2564,10 @@ static int handle_tx_event(struct xhci_hcd *xhci,
xhci_dbg(xhci, "Stream transaction error ep %u no id\n", xhci_dbg(xhci, "Stream transaction error ep %u no id\n",
ep_index); ep_index);
if (ep->err_count++ > MAX_SOFT_RETRY) if (ep->err_count++ > MAX_SOFT_RETRY)
xhci_handle_halted_endpoint(xhci, ep, 0, NULL, xhci_handle_halted_endpoint(xhci, ep, NULL,
EP_HARD_RESET); EP_HARD_RESET);
else else
xhci_handle_halted_endpoint(xhci, ep, 0, NULL, xhci_handle_halted_endpoint(xhci, ep, NULL,
EP_SOFT_RESET); EP_SOFT_RESET);
goto cleanup; goto cleanup;
case COMP_RING_UNDERRUN: case COMP_RING_UNDERRUN:
...@@ -2755,9 +2751,7 @@ static int handle_tx_event(struct xhci_hcd *xhci, ...@@ -2755,9 +2751,7 @@ static int handle_tx_event(struct xhci_hcd *xhci,
if (trb_comp_code == COMP_STALL_ERROR || if (trb_comp_code == COMP_STALL_ERROR ||
xhci_requires_manual_halt_cleanup(xhci, ep_ctx, xhci_requires_manual_halt_cleanup(xhci, ep_ctx,
trb_comp_code)) { trb_comp_code)) {
xhci_handle_halted_endpoint(xhci, ep, xhci_handle_halted_endpoint(xhci, ep, NULL,
ep_ring->stream_id,
NULL,
EP_HARD_RESET); EP_HARD_RESET);
} }
goto cleanup; goto cleanup;
...@@ -2850,9 +2844,8 @@ static int handle_tx_event(struct xhci_hcd *xhci, ...@@ -2850,9 +2844,8 @@ static int handle_tx_event(struct xhci_hcd *xhci,
if (trb_comp_code == COMP_STALL_ERROR || if (trb_comp_code == COMP_STALL_ERROR ||
xhci_requires_manual_halt_cleanup(xhci, ep_ctx, xhci_requires_manual_halt_cleanup(xhci, ep_ctx,
trb_comp_code)) trb_comp_code))
xhci_handle_halted_endpoint(xhci, ep, xhci_handle_halted_endpoint(xhci, ep, td,
ep_ring->stream_id, EP_HARD_RESET);
td, EP_HARD_RESET);
goto cleanup; goto cleanup;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment