From patchwork Fri Jun 2 14:40:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathias Nyman X-Patchwork-Id: 688988 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 04C0BC7EE2E for ; Fri, 2 Jun 2023 14:39:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236065AbjFBOj2 (ORCPT ); Fri, 2 Jun 2023 10:39:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236047AbjFBOj1 (ORCPT ); Fri, 2 Jun 2023 10:39:27 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D0BC1BC; Fri, 2 Jun 2023 07:39:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685716766; x=1717252766; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=03LuCHhFCmzwPVIBc2Q48ocGBZh0HC5gzPK8HstY9ig=; b=gJV6fTGrFbT6K7qH/wo1HVIMV9C0F9E+cyOiGlK4iakDVCPEM7rlmQfF Ra0gUWt53iIEzTI8hXMldb3vD86yma7EDDebIrSa3atikdD+haW+e/jLT 37ZPbDFbPybU6K0PwEcJZ8NoVUk+dxKNCE7YLU8YIXkVqHA7E8lOT7BZy EW+zo7qOyWYs5bSlXO1BJan2sz+ZNFi1bgDuN4yLtQ4hyvYboxiDK0VaG lPTJjprLsce46B01DlQoCYCW/t81AbM7zsHzsNAeedsBXDIrsKWIJQDWe BKvgINA2T4aN24vwu1mhYeHC33To7tx4hXcZbofXhkqrxAtpKEMXXGx+9 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10729"; a="358311291" X-IronPort-AV: E=Sophos;i="6.00,213,1681196400"; d="scan'208";a="358311291" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jun 2023 07:39:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10729"; a="707877460" X-IronPort-AV: E=Sophos;i="6.00,213,1681196400"; d="scan'208";a="707877460" Received: from mattu-haswell.fi.intel.com ([10.237.72.199]) by orsmga002.jf.intel.com with ESMTP; 02 Jun 2023 07:39:04 -0700 From: Mathias Nyman To: Cc: , Weitao Wang , stable@vger.kernel.org, Mathias Nyman Subject: [PATCH 08/11] xhci: Fix resume issue of some ZHAOXIN hosts Date: Fri, 2 Jun 2023 17:40:06 +0300 Message-Id: <20230602144009.1225632-9-mathias.nyman@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230602144009.1225632-1-mathias.nyman@linux.intel.com> References: <20230602144009.1225632-1-mathias.nyman@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Weitao Wang On ZHAOXIN ZX-100 project, xHCI can't work normally after resume from system Sx state. To fix this issue, when resume from system Sx state, reinitialize xHCI instead of restore. So, Add XHCI_RESET_ON_RESUME quirk for ZX-100 to fix issue of resuming from system Sx state. Cc: stable@vger.kernel.org Signed-off-by: Weitao Wang Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci-pci.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index 611703f863e0..2103c6c0a967 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c @@ -521,6 +521,11 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_4)) xhci->quirks |= XHCI_NO_SOFT_RETRY; + if (pdev->vendor == PCI_VENDOR_ID_ZHAOXIN) { + if (pdev->device == 0x9202) + xhci->quirks |= XHCI_RESET_ON_RESUME; + } + /* xHC spec requires PCI devices to support D3hot and D3cold */ if (xhci->hci_version >= 0x120) xhci->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW;