Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit af5c5805 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge branch 'for-usb-next' of...

Merge branch 'for-usb-next' of git+ssh://master.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-next

* 'for-usb-next' of git+ssh://master.kernel.org/pub/scm/linux/kernel/git/sarah/xhci:
  xhci: Fix bug in control transfer cancellation.
parents 97f93227 3abeca99
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -1641,6 +1641,9 @@ static int process_ctrl_td(struct xhci_hcd *xhci, struct xhci_td *td,
		else
			*status = 0;
		break;
	case COMP_STOP_INVAL:
	case COMP_STOP:
		return finish_td(xhci, td, event_trb, event, ep, status, false);
	default:
		if (!xhci_requires_manual_halt_cleanup(xhci,
					ep_ctx, trb_comp_code))
@@ -1685,8 +1688,6 @@ static int process_ctrl_td(struct xhci_hcd *xhci, struct xhci_td *td,
			}
		} else {
		/* Maybe the event was for the data stage? */
			if (trb_comp_code != COMP_STOP_INVAL) {
				/* We didn't stop on a link TRB in the middle */
			td->urb->actual_length =
				td->urb->transfer_buffer_length -
				TRB_LEN(le32_to_cpu(event->transfer_len));
@@ -1695,7 +1696,6 @@ static int process_ctrl_td(struct xhci_hcd *xhci, struct xhci_td *td,
			return 0;
		}
	}
	}

	return finish_td(xhci, td, event_trb, event, ep, status, false);
}