From patchwork Tue May 4 04:57:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandeep Singh X-Patchwork-Id: 12237343 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B39F6C433B4 for ; Tue, 4 May 2021 04:58:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8E054613B4 for ; Tue, 4 May 2021 04:58:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229796AbhEDE7J (ORCPT ); Tue, 4 May 2021 00:59:09 -0400 Received: from mail-dm6nam10on2071.outbound.protection.outlook.com ([40.107.93.71]:43617 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229724AbhEDE7I (ORCPT ); Tue, 4 May 2021 00:59:08 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=naFl037XYg131wpLWo09qSprszsXRey3igM0kZU7tOkUyWewjW3PQCTgUdiZTItzyd0aH9U3dSe/DGOnKSX0s3ZCCFn6JOUH+fU6WLuchZFLaGXLg2tQmlJHbYhfSV1ydNeq4iK5HhJy/iJMA6RTRszNdONgeXKkme1xUgdHBf7gxsi+56OyMJymjCBwtTV+Y+fFKTXZAYUAbuW+iymf5S5pMHclO2NVSVvCWKq49Pdr+3XDGaIYF3mHcsyAYWNtq7j/24mewe+lzj+ZH1lWuhFEU9WG0aYcMTZSH7ivKgPa250J8DChwkQou5Ds36wZqMUxHIE42z81ECbWOOEDyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0HiXxifFrPQLeS9dQZjb0iAq59Yds2V987MIRT218YY=; b=TJxFUz4Yf1QUR/5eRR5qPOwPx0gOw/Q/dYq1tDA9XpWelGJ+d0F6Rt27s3ONt0FM/yV+2hCrKdGBrMGgDoRtAqHxSvBeQbqiawtd4XAvXpQoUjnqOsK3JnEX4YlNpFj82HsrmNZcLKI+0pPHLMz9G2nWfm2mKdfxlVz/SQ9+KNCZacjMRLeUOyXBbhEI6z07PqUDF58y9uG29eDQxh87z0PSOAHgQLKF7VqvFCHfWxS8/iqNs3jC9cuV4WvCtGYaPundPXGoHdiQ1oAbRvyaFUTCSrYRgH+UMBG5POap3ZpTAZQBcV0xhgeg+F8i7pTwuuHD5iJ3Dtg4Km8S0qaTmg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0HiXxifFrPQLeS9dQZjb0iAq59Yds2V987MIRT218YY=; b=nufe82xBbRgIfS/YZzaaFfz/+jsJ9PzhM1eE7mv4QQu+00ICcTVUnbbGWjuJJsPpY6ck7q2YG6bSnJMW3p7JZU/4gmedbdaDqEV/+XkZrfPFRRuXqrlUjcesbmaCJMdMvpPiWulF4e3lrp4CpsqWe/PC5vO9zcBRoTo8DDF+msM= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=amd.com; Received: from CO6PR12MB5412.namprd12.prod.outlook.com (2603:10b6:5:35e::15) by CO6PR12MB5476.namprd12.prod.outlook.com (2603:10b6:303:138::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.25; Tue, 4 May 2021 04:58:13 +0000 Received: from CO6PR12MB5412.namprd12.prod.outlook.com ([fe80::3508:d33b:5c53:c961]) by CO6PR12MB5412.namprd12.prod.outlook.com ([fe80::3508:d33b:5c53:c961%7]) with mapi id 15.20.4087.044; Tue, 4 May 2021 04:58:13 +0000 From: Sandeep Singh To: mathias.nyman@intel.com, gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Shyam-sundar.S-k@amd.com, Nehal-bakulchandra.Shah@amd.com, Sandeep Singh Subject: [PATCH] xhci:Add reset resume quirk for AMD xhci controller. Date: Tue, 4 May 2021 10:27:39 +0530 Message-Id: <20210504045739.3786551-1-Sandeep.Singh@amd.com> X-Mailer: git-send-email 2.25.1 X-Originating-IP: [165.204.156.251] X-ClientProxiedBy: MA1PR01CA0145.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:71::15) To CO6PR12MB5412.namprd12.prod.outlook.com (2603:10b6:5:35e::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from jatayu.amd.com (165.204.156.251) by MA1PR01CA0145.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:71::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.26 via Frontend Transport; Tue, 4 May 2021 04:58:11 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d8a6efab-89b8-4ce4-8a18-08d90eb93872 X-MS-TrafficTypeDiagnostic: CO6PR12MB5476: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1923; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ILcvECKBClE1C5bHMoWbSe+zCk4R5XhcSHk9VXwvoBrlUIRbgvlnnL8OqW6xa99Q1gdwA8QvSRVQylYiejpjqBjl7Q6hjqWQpFXUcy41OQrCVhLWqG9o/g6pNidtqyVzjSIxEWlcof+AZ2W4RN6RvT7VQmxp4/ODpMgjs9WTxImnDo1YBqDJCpbB+ofBnCimVpo+JG5NrYljdWztl91FlEbAu4609KCAW3mb/1w9093PTKOa3qwJDGOBRIkWlGrgwJKr7X0jvo9y/NY2biTZYo5VOaZmCSjHgG7OpCRdrK3f+s7lTkFJPb8GRGKuN92NJd49TY88zfXTUl72KdoHcw7igqs1zRRT6EhjvjVs8OgAB7oPwoXcc1yjZf4z/TnNR7Nvu4v6u/1PIu4KKCQmQfUjo0QzZn9gtZRWHw4d/mdPh9uTJAgfqCSMC7a4oejp9p91d+uFJs1JqjlewH64gXmGF6k5rcNqyFP3v2QlJQs+tunTB9UAuq5DLcUMtarHwZ/GatDE7BjzuLYJMYJ5JUI3gIB6DCNhKgSFg0okHIjk1ROzNXYnGFh78qLKunQWCQbpSLU73n/5PpXRWm67FD+xIoG73VqQLJVPUxh4WZOUj/XNoKYi1mnzVB6mQuwIFHGZUuM2HGU8I7QUUfukyhO7WtxuDDPxNIfhezpfLbk= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR12MB5412.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(136003)(346002)(366004)(376002)(396003)(39860400002)(2616005)(66946007)(316002)(86362001)(478600001)(6486002)(8676002)(956004)(7696005)(4326008)(2906002)(8936002)(1076003)(83380400001)(26005)(66556008)(5660300002)(186003)(38350700002)(6666004)(66476007)(16526019)(52116002)(36756003)(38100700002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IxwIRsaofrjYMnrKd2wUZkCDGLk/vkbiVLhmfTLGSgpqeVWw8bBW/No1SSUoRj2ZmTHDV3qgydejuIN1iCXYZ7U6HtLIFkA1xJNuX6UklhhRd03Qe3n9WUu5+xegzm/E2zuSIr3pcG1fDDZ2gzpX7/i7JNelt4eGplyZNlYauSsMSbEHji0UFwJX8J7jDIomVlznbEE8SMlEr/+LAwDegldzNmjX6UMM2N02ckniD7JIF44rzDV2NmqleOYQMaC76GeTRq3CxKXzDs0/1bsBHzaxrKEP51TeyvzQ8k87qM+Rcv92YFv07bgCAP X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: d8a6efab-89b8-4ce4-8a18-08d90eb93872 X-MS-Exchange-CrossTenant-AuthSource: CO6PR12MB5412.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 May 2021 04:58:13.3004 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ziyxPmB/pLgBe2TiQax8Un+7DhafRrAK/oaZmIUM5KGNDJxBFL9cVSKfXz2W/HrO X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR12MB5476 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Sandeep Singh One of AMD xhci controller require reset on resume. Occasionally AMD xhci controller does not respond to Stop endpoint command. Once the issue happens controller goes into bad state and in that case controller needs to be reset. Signed-off-by: Sandeep Singh --- drivers/usb/host/xhci-pci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index 84da8406d5b4..c8c468271767 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c @@ -165,8 +165,10 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) (pdev->device == 0x15e0 || pdev->device == 0x15e1)) xhci->quirks |= XHCI_SNPS_BROKEN_SUSPEND; - if (pdev->vendor == PCI_VENDOR_ID_AMD && pdev->device == 0x15e5) + if (pdev->vendor == PCI_VENDOR_ID_AMD && pdev->device == 0x15e5) { xhci->quirks |= XHCI_DISABLE_SPARSE; + xhci->quirks |= XHCI_RESET_ON_RESUME; + } if (pdev->vendor == PCI_VENDOR_ID_AMD) xhci->quirks |= XHCI_TRUST_TX_LENGTH;