mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-11 05:17:10 +09:00
xhci: Use correct SLOT ID when handling a reset device command
commit6fcfb0d682upstream. Command completion events normally include command completion status, SLOT_ID, and a pointer to the original command. Reset device command completion SLOT_ID may be zero according to xhci specs 4.6.11. VIA controllers set the SLOT_ID to zero, triggering a WARN_ON in the command completion handler. Use the SLOT ID found from the original command instead. This patch should be applied to stable kernels since 3.13 that contain the commit20e7acb13f"xhci: use completion event's slot id rather than dig it out of command" Reported-by: Saran Neti <sarannmr@gmail.com> Tested-by: Saran Neti <sarannmr@gmail.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
75d2faaab2
commit
9dd9ec82c5
@@ -1611,8 +1611,11 @@ static void handle_cmd_completion(struct xhci_hcd *xhci,
|
||||
xhci_handle_cmd_reset_ep(xhci, slot_id, cmd_trb, cmd_comp_code);
|
||||
break;
|
||||
case TRB_RESET_DEV:
|
||||
WARN_ON(slot_id != TRB_TO_SLOT_ID(
|
||||
le32_to_cpu(cmd_trb->generic.field[3])));
|
||||
/* SLOT_ID field in reset device cmd completion event TRB is 0.
|
||||
* Use the SLOT_ID from the command TRB instead (xhci 4.6.11)
|
||||
*/
|
||||
slot_id = TRB_TO_SLOT_ID(
|
||||
le32_to_cpu(cmd_trb->generic.field[3]));
|
||||
xhci_handle_cmd_reset_dev(xhci, slot_id, event);
|
||||
break;
|
||||
case TRB_NEC_GET_FW:
|
||||
|
||||
Reference in New Issue
Block a user