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

Commit 60f0e0d2 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: XHCI: Add support to disable selective suspend"

parents 9dbcc76a 12d90425
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -818,7 +818,8 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
		}
		if ((temp & PORT_PLS_MASK) == XDEV_U0
			&& (temp & PORT_POWER)
			&& (bus_state->suspended_ports & (1 << wIndex))) {
			&& ((bus_state->suspended_ports & (1 << wIndex))
			|| (xhci->quirks & XHCI_NO_SELECTIVE_SUSPEND))) {
			bus_state->suspended_ports &= ~(1 << wIndex);
			if (hcd->speed != HCD_USB3)
				bus_state->port_c_suspend |= 1 << wIndex;
@@ -875,6 +876,8 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
		/* FIXME: What new port features do we need to support? */
		switch (wValue) {
		case USB_PORT_FEAT_SUSPEND:
			if (xhci->quirks & XHCI_NO_SELECTIVE_SUSPEND)
				break;
			temp = xhci_readl(xhci, port_array[wIndex]);
			if ((temp & PORT_PLS_MASK) != XDEV_U0) {
				/* Resume the port to U0 first */
@@ -1089,6 +1092,8 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
			xhci_dbg(xhci, "PORTSC %04x\n", temp);
			if (temp & PORT_RESET)
				goto error;
			if (xhci->quirks & XHCI_NO_SELECTIVE_SUSPEND)
				break;
			if ((temp & PORT_PLS_MASK) == XDEV_U3) {
				if ((temp & PORT_PE) == 0)
					goto error;
+1 −0
Original line number Diff line number Diff line
@@ -1548,6 +1548,7 @@ struct xhci_hcd {
 * The workaround is to handle TRB Error and Context State Error in same way
 */
#define XHCI_TR_DEQ_ERR_QUIRK	(1 << 18)
#define XHCI_NO_SELECTIVE_SUSPEND (1 << 19)
	unsigned int		num_active_eps;
	unsigned int		limit_active_eps;
	/* There are two roothubs to keep track of bus suspend info for */