From patchwork Mon Dec 9 07:39:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Zhu X-Patchwork-Id: 13899028 Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2046.outbound.protection.outlook.com [40.107.241.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B6871215046 for ; Mon, 9 Dec 2024 07:40:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.241.46 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733730016; cv=fail; b=VRxan5OFwhvmZBbR72plbeyVgv0cUjE9YfF2O5iMmE4/kK30eHCsxTZsvBqmRVScSFb8J/SrUFPs8n0a6YkM5/JeVguTZQhw0/ljhAYozT/gTwXsV4RhVNFVl5kEhe6q6Vly+YsRHi2cJGq0ii0SH+Py3zMpZN62wJPPXnZHs4I= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733730016; c=relaxed/simple; bh=qu/mOK8RlXLX615vCFMV8FkJEhV8PaiLQ+BxfIi6XI8=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=rzVqFkVOzb5xivqOZ4A9seMSE8+tclPoeYEyNDKG9GIjzZE8ped6S4gZbQaknVcPN7V8iS0E3LM9Uqea8FbK++JcbBKMArIdE62TUO+/YfIjGJv3WV+Z6ceGhhBl9C+fiPCd1zAXnD35XILKJk8onem9JJrww3lwFvzEZD1vyoA= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=cl3mMTZE; arc=fail smtp.client-ip=40.107.241.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="cl3mMTZE" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=q2GvKzGdM7eKXWDXu5fY77uruYnuQ/CX0GmAA1LEvzlRLiPFlHeq3rvrR1RerM0xVy2RzQjffsQMgFyiyid1loAfQ2gbekPWN3pDSszxYfJWzhhDJPZSqMop3M4jAlbQuXe4xSMWlIlMb0OOxqSc68mdIM8LxF3Sucn0LYMrJiP5B57jdLHcIjZXbVqfvCTikYrX4jR/qzfqu5WZyFq0QFs5lI1Q9P2yGu6TmhR0Dqiiv+sPO52RHCKp1cwIiMVKmRAmXrLTD0aVu7Ia6R7ztRvVpd239nDt7ciLyXcR1ZLTQF3dGUSPV1qFYp9ialclL1jCWprh/XIHzu4qLPmIkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=78qRs6XiPjctbELPN+NX/iUdrFknZC6FXLvj4HNj0yg=; b=zIbHOUgmm0DQL8MKJp3bn4pQWDlWm+mMuN+5IxsLWu9gPOv64Ae/2QWPiC9IZgXGg0luNZ2gjx+NURJOvaE4Wi5QjOArGKBiyF9R5oJdbtm4zhAZ+l5buND3xios2BzYUk/hbTgazVNli+vqFzNDljPSA6/BEcklhX7bwsMj6XqfCfDr/jSKG2CAQ7Z+diCZJxqSWM3Hmst86brRalXXS7ztq6+XhQygK6lgln6LtIdUGpDdPAMkrpztbF2fKKm7r60XPgH61EFHXt+nfpAyzudDN4SFUGa110UjqwGKTeHsJws8b+vBOBgkXjWUQ1yAGmI1cpCpJnTEYj/BdCpOuQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=78qRs6XiPjctbELPN+NX/iUdrFknZC6FXLvj4HNj0yg=; b=cl3mMTZESunsamk3LFYirx/NgwVE8mt8Lrzyq9JrRvzCm3dlJh7WNbsKuj5tULr8WjfYdvue0bvKrpNW+bEnBVZ/dMPEVf6ngq8KMWHW3e0Dg02bNJrT8dqnplFHE4KEIqwetStpds1HzKs+V5ZjALa3aqgLg60BUUkRsJ2ckdmvuQqOXGF4Lu6y8JqYaSd+RNz9BfoJDoWlH3OCjLBXV8dCj7sI8NlaV2VYExhdFVxgN8WenCMIC3YtFdT5mXIyboPMxz0SxlvqhMvQmDusjDcrHJ2+VRdwnWidAAxoWz1uW8eG2/+Jefs+y9MJxDEUfn4K6aLQeAmZCfMeCcbOqA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS8PR04MB8676.eurprd04.prod.outlook.com (2603:10a6:20b:42b::10) by GVXPR04MB9927.eurprd04.prod.outlook.com (2603:10a6:150:118::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.28; Mon, 9 Dec 2024 07:40:10 +0000 Received: from AS8PR04MB8676.eurprd04.prod.outlook.com ([fe80::28b2:de72:ad25:5d93]) by AS8PR04MB8676.eurprd04.prod.outlook.com ([fe80::28b2:de72:ad25:5d93%5]) with mapi id 15.20.8230.016; Mon, 9 Dec 2024 07:40:09 +0000 From: Richard Zhu To: jingoohan1@gmail.com, bhelgaas@google.com, lpieralisi@kernel.org, kw@linux.com, manivannan.sadhasivam@linaro.org, robh@kernel.org, frank.li@nxp.com, quic_krichai@quicinc.com Cc: imx@lists.linux.dev, kernel@pengutronix.de, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 0/3] Bug fixes when dwc generic suspend/resume callbacks are used Date: Mon, 9 Dec 2024 15:39:21 +0800 Message-Id: <20241209073924.2155933-1-hongxing.zhu@nxp.com> X-Mailer: git-send-email 2.37.1 X-ClientProxiedBy: SI2PR02CA0040.apcprd02.prod.outlook.com (2603:1096:4:196::6) To AS8PR04MB8676.eurprd04.prod.outlook.com (2603:10a6:20b:42b::10) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8676:EE_|GVXPR04MB9927:EE_ X-MS-Office365-Filtering-Correlation-Id: 0082ebd4-db23-47d1-50ba-08dd1824b54c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|52116014|376014|366016|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: Z3CLVSrgRJeDVbKwhDJl01mmlGHHpTUotlnBaGFlkxUDJxzJJFUtDckQDxSE40DTa18y77yc3sncQYY4uhKjp2iK9XcMfddqtV4NPk5XsqjuASaUxDHDmvF7VG53sfHYxLHTWiFBrRtbCu7n06Lm7xje3xre0GIyQjCkL+6iMgXkX78hbqZHUeVkXFwyhbjtZFRkZxjXlV4IEJnwHVjSL7KSzUv5qRc9M8pCejtSHAS/tqCJDPgwVvNG63BqYOiN4PuaxLHa0zbbDgfU7ZZxvlm8FK6en3xYZd8LXYDobypQRHfD1PpdXxEBdpEqdW6pBtHvaRIsAte9L5v2W1z1Npgo20IFXknmwUokLhNWMD1+DeWnvRmWgMtT9YpX6YOEQHE7rCGVFHEMZN9yiNyn9Qjg/teL2SvhXeaqeWi/ox/GP8ZQwlUApyE+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od.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(52116014)(376014)(366016)(1800799024)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: DWNBWBTMyzXObKbfNQTSzR14MLfuN3ludKF21T7INu6IfD8ZygnK7p+s7Eg80R88YqEaUKcXCp7dbnkQ3Vofx52cPqLg8CB9gHDp/FITXLmaDjZufwQ8uP7cbuXNRQWHbqN0yDa2K2v3p5GrqQlx92V43LvoRzU90USqBxYDGS+AXgO7M/lvzGdTEQ2YFcdCNfZfXzBDFfqGvRV1GEvOc/vmh+JaqfUB3tYkTk92M91QmhH5jNSotslvUs/MWgYWfSQZKg71kU6w3TepnbvXz2zvssrZOAWANxEnZ+I2D1Wo/Bt93SIlfzBfg5I4zLITR2IBXzWaXh6Pfb1kpTX1qBhpZ5g06/fouBfVLo3l7VoH0OdLyf5x9IXrdA+fxg2hbD6Oj+NHopW+iJ6goZ8KR9GcQ+3NIQZ+SKpEbvm9zHYCub687tmlk2F9few7TLksZwLYWjqNpltqFinbi34Rf0nIM1jCpzJeP9DzPqUcQhActjQio3UxkoiS8FIXmJAV4Dfo1yTzVuNi19PS1ty0g3W1iXk05wyIcbp2s79/utmvkazmQT4JMfMgGakrKRjjulGhEs18brzzlRI39K3YHNHUVs6AP+SU3a8Uvi/XoKYgxHd89CoBN3gXpYpw6pJnfMqD1XeFkSmDkhNUrH0UaJobFdtqAB15V1DNQrQaBxl8LCc/EpmeNcyITfSl9uzCU0AHU56DLvkB3U3Fzq+81VLsr6zGZT58Tpv9lMJWkwtKUTK5gMIsdrQ7BUIbOA/TJa01FBKva5DbthpuZP5igwuVIrE0aXMWRNCiw81aAOjFPS+jd3/co2KNb7QJ+OvtqbOrLQJFafuuM+LChA1LELYqV1bBdaNBcs2M5RxEVmYXp9pW+xhA6XL99CqIaDaCnIGwrVi6gzTjbbj0csnTzA7i9Sxid4HsisjYytYknvDNrZ1Ktv/lRBSgNHDUUqAlH8btZIVj617yGGfnLxtGys2zjt9A2FT7k7ypYeP8O/zLRCVPPqyGtlo3IVzvUBrGPcjcPq1C5f0JMd/LX0AloNEkk5Q9EPV4rPcPe8o8+VXTb4eeTRzUk4IPitUM5+BqFLPY8qalYfQf0IafMq9weNAp09YmWr+5rgUP9a1mg9p+KemG1O/N77x2sLgo45o94T2XSgcTrmg0m2Q9tCHrf9ZMr33/V5ifAq/S7AJDYgj7ulG4d+tLl0fpmqC92TwHbOlW7Eg4Z3vOgQPjddhu7aIg0UT828Bz0fqwTvBSNJGmkU9AKsDdRXMLr5rAyBYBsv8BgqeyWIlBOPhchex+JuVt7wJgfyIUeEnyFgeFH2PxEZrc9IqXGQTJn98EQWrzirGT02D5mdS38oJfFg3T29HGcEmsbYMJCyDNnOfhVxhbMPiXnKtH3NqwUkBKDlTpuT8E+0MJpz88s41k2Rkb0N/0qUzIoZC+9Do7i8IuA5MFZEaWYsVxGgqirrPH+nC06KyLz3+NhnTyte3FZtecRui3TQ0fycqrna8XqKpSdESKUO2C0j4/REEXqvvp5DEmXLkIqR5YXwb4jDq2iLVs4O4JMWj/kr2rJdUVmn5rhEyv85eX4GbjApxRZpWktNgD X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0082ebd4-db23-47d1-50ba-08dd1824b54c X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8676.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2024 07:40:09.8978 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: VptF9o+Gi49RU8rBPtGQPZOMEF467ObphVwWipNSNpDAo7kYTTl3am5zfd6YLZHOwu7y+uykb5OTITTEyJUI1w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR04MB9927 The patch #1 is issued before, but it's not applied yet refer to [1]. Combine these two bug fixes into one series and send here. [1] https://patchwork.kernel.org/project/linux-pci/patch/1721628913-1449-1-git-send-email-hongxing.zhu@nxp.com/ Resend this bug fixes patch-set, with one more codes clean up patch. Here is the discussion [2] and final solution [3] of the codes clean up commit. [2] https://patchwork.kernel.org/project/linux-pci/patch/1721628913-1449-1-git-send-email-hongxing.zhu@nxp.com/ [3] https://patchwork.kernel.org/project/linux-pci/patch/20241126073909.4058733-1-hongxing.zhu@nxp.com/ v3 changes: Regarding the discussion listed above[2]. Resend the patch-set after adding one more codes clean up patch together. v2 changes: Thanks for Manivannan's review. - Refine the subject of second patch and add "Reviewed-by: Manivannan Sadhasivam " - In first patch, update the commit message and move one comment into proper place. BTW, Manivannan found another potential issue that suspend is entry but the link is in L1SS stat in v1 review. This is a new story. And it's better to be verified and fixed by another commit later. v2: https://patchwork.kernel.org/project/linux-pci/cover/1728539269-1861-1-git-send-email-hongxing.zhu@nxp.com/ [PATCH v3 1/3] PCI: dwc: Fix resume failure if no EP is connected on [PATCH v3 2/3] PCI: dwc: Always stop link in the [PATCH v3 3/3] PCI: dwc: Clean up some unnecessary codes in drivers/pci/controller/dwc/pcie-designware-host.c | 17 ++++++++++++----- drivers/pci/controller/dwc/pcie-designware.h | 1 + 2 files changed, 13 insertions(+), 5 deletions(-)