@@ -2788,10 +2788,9 @@ static int handle_tx_event(struct xhci_hcd *xhci,
2788
2788
xhci_dbg (xhci , "td_list is empty while skip flag set. Clear skip flag for slot %u ep %u.\n" ,
2789
2789
slot_id , ep_index );
2790
2790
}
2791
- if (xhci_halted_host_endpoint (ep_ctx , trb_comp_code ))
2792
- xhci_handle_halted_endpoint (xhci , ep , NULL , EP_HARD_RESET );
2793
2791
2794
- return 0 ;
2792
+ td = NULL ;
2793
+ goto check_endpoint_halted ;
2795
2794
}
2796
2795
2797
2796
td = list_first_entry (& ep_ring -> td_list , struct xhci_td ,
@@ -2899,20 +2898,22 @@ static int handle_tx_event(struct xhci_hcd *xhci,
2899
2898
* indefinitely.
2900
2899
*/
2901
2900
2902
- if (trb_is_noop (ep_trb )) {
2903
- if (xhci_halted_host_endpoint (ep_ctx , trb_comp_code ))
2904
- xhci_handle_halted_endpoint (xhci , ep , td , EP_HARD_RESET );
2905
- } else {
2906
- td -> status = status ;
2901
+ if (trb_is_noop (ep_trb ))
2902
+ goto check_endpoint_halted ;
2907
2903
2908
- /* update the urb's actual_length and give back to the core */
2909
- if (usb_endpoint_xfer_control (& td -> urb -> ep -> desc ))
2910
- process_ctrl_td (xhci , ep , ep_ring , td , ep_trb , event );
2911
- else if (usb_endpoint_xfer_isoc (& td -> urb -> ep -> desc ))
2912
- process_isoc_td (xhci , ep , ep_ring , td , ep_trb , event );
2913
- else
2914
- process_bulk_intr_td (xhci , ep , ep_ring , td , ep_trb , event );
2915
- }
2904
+ td -> status = status ;
2905
+
2906
+ /* update the urb's actual_length and give back to the core */
2907
+ if (usb_endpoint_xfer_control (& td -> urb -> ep -> desc ))
2908
+ process_ctrl_td (xhci , ep , ep_ring , td , ep_trb , event );
2909
+ else if (usb_endpoint_xfer_isoc (& td -> urb -> ep -> desc ))
2910
+ process_isoc_td (xhci , ep , ep_ring , td , ep_trb , event );
2911
+ else
2912
+ process_bulk_intr_td (xhci , ep , ep_ring , td , ep_trb , event );
2913
+
2914
+ check_endpoint_halted :
2915
+ if (xhci_halted_host_endpoint (ep_ctx , trb_comp_code ))
2916
+ xhci_handle_halted_endpoint (xhci , ep , td , EP_HARD_RESET );
2916
2917
2917
2918
return 0 ;
2918
2919
0 commit comments