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

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

Revert "xhci: Add grace period after xHC start to prevent premature runtime suspend."



This reverts commit c2f4a72d which is
commit 33e321586e37b642ad10594b9ef25a613555cd08 upstream.

It breaks the Android kernel ABI and shouldn't be needed for any normal
Android devices.  If this is needed in the future, it can be brought
back in an ABI-stable manner.

Bug: 161946584
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
Change-Id: I6654f57f1f234421ec8573dc741e3e8bdb7e287b
parent e0659ad4
Loading
Loading
Loading
Loading
+0 −11
Original line number Original line Diff line number Diff line
@@ -1464,17 +1464,6 @@ int xhci_hub_status_data(struct usb_hcd *hcd, char *buf)


	status = bus_state->resuming_ports;
	status = bus_state->resuming_ports;


	/*
	 * SS devices are only visible to roothub after link training completes.
	 * Keep polling roothubs for a grace period after xHC start
	 */
	if (xhci->run_graceperiod) {
		if (time_before(jiffies, xhci->run_graceperiod))
			status = 1;
		else
			xhci->run_graceperiod = 0;
	}

	mask = PORT_CSC | PORT_PEC | PORT_OCC | PORT_PLC | PORT_WRC | PORT_CEC;
	mask = PORT_CSC | PORT_PEC | PORT_OCC | PORT_PLC | PORT_WRC | PORT_CEC;


	/* For each port, did anything change?  If so, set that bit in buf. */
	/* For each port, did anything change?  If so, set that bit in buf. */
+1 −3
Original line number Original line Diff line number Diff line
@@ -149,11 +149,9 @@ int xhci_start(struct xhci_hcd *xhci)
		xhci_err(xhci, "Host took too long to start, "
		xhci_err(xhci, "Host took too long to start, "
				"waited %u microseconds.\n",
				"waited %u microseconds.\n",
				XHCI_MAX_HALT_USEC);
				XHCI_MAX_HALT_USEC);
	if (!ret) {
	if (!ret)
		/* clear state flags. Including dying, halted or removing */
		/* clear state flags. Including dying, halted or removing */
		xhci->xhc_state = 0;
		xhci->xhc_state = 0;
		xhci->run_graceperiod = jiffies + msecs_to_jiffies(500);
	}


	return ret;
	return ret;
}
}
+1 −1
Original line number Original line Diff line number Diff line
@@ -1820,7 +1820,7 @@ struct xhci_hcd {


	/* Host controller watchdog timer structures */
	/* Host controller watchdog timer structures */
	unsigned int		xhc_state;
	unsigned int		xhc_state;
	unsigned long		run_graceperiod;

	u32			command;
	u32			command;
	struct s3_save		s3;
	struct s3_save		s3;
/* Host controller is dying - not responding to commands. "I'm not dead yet!"
/* Host controller is dying - not responding to commands. "I'm not dead yet!"