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

Commit e1cd9727 authored by Andrew Bresticker's avatar Andrew Bresticker Committed by Greg Kroah-Hartman
Browse files

xhci: Check for XHCI_COMP_MODE_QUIRK when disabling D3cold



Instead of calling xhci_compliance_mode_recovery_timer_quirk_check() again
in the PCI suspend path, just check for XHCI_COMP_MODE_QUIRK which will
have been set based on xhci_compliance_mode_recovery_timer_quirk_check()
in xhci_init().

Signed-off-by: default avatarAndrew Bresticker <abrestic@chromium.org>
Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1885d9a3
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -288,7 +288,7 @@ static int xhci_pci_suspend(struct usb_hcd *hcd, bool do_wakeup)
	 * Systems with the TI redriver that loses port status change events
	 * Systems with the TI redriver that loses port status change events
	 * need to have the registers polled during D3, so avoid D3cold.
	 * need to have the registers polled during D3, so avoid D3cold.
	 */
	 */
	if (xhci_compliance_mode_recovery_timer_quirk_check())
	if (xhci->quirks & XHCI_COMP_MODE_QUIRK)
		pdev->no_d3cold = true;
		pdev->no_d3cold = true;


	return xhci_suspend(xhci);
	return xhci_suspend(xhci);
+1 −1
Original line number Original line Diff line number Diff line
@@ -491,7 +491,7 @@ static void compliance_mode_recovery_timer_init(struct xhci_hcd *xhci)
 * Systems:
 * Systems:
 * Vendor: Hewlett-Packard -> System Models: Z420, Z620 and Z820
 * Vendor: Hewlett-Packard -> System Models: Z420, Z620 and Z820
 */
 */
bool xhci_compliance_mode_recovery_timer_quirk_check(void)
static bool xhci_compliance_mode_recovery_timer_quirk_check(void)
{
{
	const char *dmi_product_name, *dmi_sys_vendor;
	const char *dmi_product_name, *dmi_sys_vendor;


+0 −3
Original line number Original line Diff line number Diff line
@@ -1887,7 +1887,4 @@ struct xhci_input_control_ctx *xhci_get_input_control_ctx(struct xhci_hcd *xhci,
struct xhci_slot_ctx *xhci_get_slot_ctx(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx);
struct xhci_slot_ctx *xhci_get_slot_ctx(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx);
struct xhci_ep_ctx *xhci_get_ep_ctx(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx, unsigned int ep_index);
struct xhci_ep_ctx *xhci_get_ep_ctx(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx, unsigned int ep_index);


/* xHCI quirks */
bool xhci_compliance_mode_recovery_timer_quirk_check(void);

#endif /* __LINUX_XHCI_HCD_H */
#endif /* __LINUX_XHCI_HCD_H */