From patchwork Wed Apr 17 23:14:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thinh Nguyen X-Patchwork-Id: 790154 Received: from mx0b-00230701.pphosted.com (mx0b-00230701.pphosted.com [148.163.158.9]) (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 8A73C85922; Wed, 17 Apr 2024 23:14:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=148.163.158.9 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713395679; cv=fail; b=O/eFnNkCT+3LA/pn8kfSYNrLCkGz+Nq3mXvRFOc4Vhd/X4x2cHLbZN19lbAODrqc/PcBcWwJs2VYiDybP31NKGR8TSL+XFZspgieXDdWNWgmm2dsDPUDx8liDBH+Wnf2RrFv0d1IHpuTm8eq3Mq0CNPsBedfEFgVXE7X6JGVo6M= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713395679; c=relaxed/simple; bh=aBuarkfy7cqo/moi7sdMlkc5uGKWhN+6l0fGbpzpIyo=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=hmHzquPI5wtpa6UNa5alW9dNdQGpA3f7YXW7Sx/9+wu8HfhMVGC1cDswk8zGE35lgpTQ/Pg/dYJiKx9uTLibDuvJxFQBQoWVaivHVrawnJ6TGR/nvyvfBZZ0o2SflocLHejjKNNAS960WrwQQ8pqTtzswqK1pjGlrTLivZJznIo= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=synopsys.com; spf=pass smtp.mailfrom=synopsys.com; dkim=pass (2048-bit key) header.d=synopsys.com header.i=@synopsys.com header.b=WicAbXrD; dkim=pass (2048-bit key) header.d=synopsys.com header.i=@synopsys.com header.b=ON6e1zqd; dkim=fail (1024-bit key) header.d=synopsys.com header.i=@synopsys.com header.b=G0GAQaHW reason="signature verification failed"; arc=fail smtp.client-ip=148.163.158.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=synopsys.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=synopsys.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=synopsys.com header.i=@synopsys.com header.b="WicAbXrD"; dkim=pass (2048-bit key) header.d=synopsys.com header.i=@synopsys.com header.b="ON6e1zqd"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=synopsys.com header.i=@synopsys.com header.b="G0GAQaHW" Received: from pps.filterd (m0098572.ppops.net [127.0.0.1]) by mx0b-00230701.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 43HMZsBH008269; Wed, 17 Apr 2024 16:14:35 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=synopsys.com; h= from:to:cc:subject:date:message-id:references:in-reply-to :content-type:content-transfer-encoding:mime-version; s= pfptdkimsnps; bh=kjQ8Sspdtb/qGrv7Ygh1gy9d/8T5dCRlzIHHRjtsDxg=; b= WicAbXrDhIbgTqEA5jaDL8DQx9s8sdIjzW7h399ont7KzvS3hBeoOszTT2rE39ZE tzvlLlzHVaI1esOl9hQR/t2yF77OXC0TtTf/QdZanqWHGSMEgzDtr8tXUJ7TzXQC mgn71MNeEsVes9rupRsg4BA9RjlDAcB8VDjrSs74oGAsRo/SWYuGzh1WYpzDP1NH LAzSWvLwF0x+sTPlPcUIA90NIAWGTrj5VpvZjiApjbnNJEYtWAsqXrfJUJjTD0XS XzUqNHNOvwVdJK3eMoJ54aAhl+762bbx+ha5/zRN8JHEIOV8+RR0y8AZkAvYv0YX tXF7XdabDGxEU3RsHY4fOw== Received: from smtprelay-out1.synopsys.com (smtprelay-out1.synopsys.com [149.117.73.133]) by mx0b-00230701.pphosted.com (PPS) with ESMTPS id 3xjgkta7ww-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 17 Apr 2024 16:14:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1713395674; bh=aBuarkfy7cqo/moi7sdMlkc5uGKWhN+6l0fGbpzpIyo=; h=From:To:CC:Subject:Date:References:In-Reply-To:From; b=ON6e1zqdeBTqLeSoel2Pi/OT+3UaoqliTl511agj4EHbtpJQ9ql2JhcduSAihBwHP ueiqgDfCVUkToYPu6E3CHgyUAZvdosZCBgAvU2Krpk6nDpVnzZx1/Zw19LrJXFytq+ 8WS8Ueb4jPnIiyDpLP408THZzf3Cr2VtXY5xYvI1nF0scFpF6HsogOp3AxbqHTQ4bt WYaOVKmjdZwXPYahYvA4gjpOhNUl3HlyV0mZzVXQDk8BErgBf/x9Q7Tj6N7Gze9Beb 2hxOwSgwRTAJZjKmut/bIFh3P5hQNfUnxMXZT+qlqkc0Etj7lgGTZSo5whtQu2t+88 HFW7mBtm1DP2A== Received: from mailhost.synopsys.com (sv1-mailhost2.synopsys.com [10.205.2.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) client-signature RSA-PSS (2048 bits)) (Client CN "mailhost.synopsys.com", Issuer "SNPSica2" (verified OK)) by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id 302B8401C6; Wed, 17 Apr 2024 23:14:34 +0000 (UTC) Received: from o365relay-in.synopsys.com (us03-o365relay1.synopsys.com [10.4.161.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "o365relay-in.synopsys.com", Issuer "Entrust Certification Authority - L1K" (verified OK)) by mailhost.synopsys.com (Postfix) with ESMTPS id 097F6A006D; Wed, 17 Apr 2024 23:14:34 +0000 (UTC) Authentication-Results: o365relay-in.synopsys.com; dmarc=pass (p=reject dis=none) header.from=synopsys.com Authentication-Results: o365relay-in.synopsys.com; spf=pass smtp.mailfrom=synopsys.com Authentication-Results: o365relay-in.synopsys.com; dkim=pass (1024-bit key; unprotected) header.d=synopsys.com header.i=@synopsys.com header.a=rsa-sha256 header.s=selector1 header.b=G0GAQaHW; dkim-atps=neutral Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2168.outbound.protection.outlook.com [104.47.55.168]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "DigiCert Cloud Services CA-1" (verified OK)) by o365relay-in.synopsys.com (Postfix) with ESMTPS id 83C3A40349; Wed, 17 Apr 2024 23:14:33 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aDktLvspqLu/evo2Q7m6YyyQWrrtvzQPvor0VyiRmO8vMSmviTSTi/0WMby3Y/8GJA4fMzyzswxS7KhTgMFkgYQTnZggvF/Dd83VsqBr8lwXyxB0ISohcIMY6+2pwh09ogVsTDt7d043ziJNlhv49KWlqta8bmqIqmfjDVnPFIpQEPrEEJjWNck9a16odjTtz8GFYbnj+e+7zXsMjG6DCZgyAGWB/CzAMSDOqV8bZjMxLmSvJtAw1ojNXz3sUFL5nFIaJ/wIP24GyQyUvqHrZLPoUoP2sX+vrtQSPRD39C9BZDxsfk3yV1Krna3iBF4tkKLXZIpW4eAf+i79kQntQQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=kjQ8Sspdtb/qGrv7Ygh1gy9d/8T5dCRlzIHHRjtsDxg=; b=Osse6hojZLbayO9dob36GwORO+Wjo8hDSxUQbZzOyopphGFHGTIDyULFYzplgirZvx1IQA6LVjbB8NDw3OAKQQaj0opdnj+J2e64aIhG7oKJq8gjdulS2c19eea+JxbLiB+K9kWpiEj2zCxFczKPjZNoXAN4l65zEP7OFmIF57hPWilvpAPBNS28bSGMr87zWXHH4wAvTdVnbrHgnvx8lZ1+/F4iyble5M/v4DkbZb8020rNXqPfLJsdJfzVk3Dem/uiI1dz/juKTFPTWEFuy5C3pVr5mFqzj6oHSHd+vbpGzvFYBcg6jF+QTiXa5qRtCUeEB4Hh1JewxQ/JMcTs8Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=synopsys.com; dmarc=pass action=none header.from=synopsys.com; dkim=pass header.d=synopsys.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=synopsys.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kjQ8Sspdtb/qGrv7Ygh1gy9d/8T5dCRlzIHHRjtsDxg=; b=G0GAQaHWw6ZjyYNvWFo8Gerhh6ZqzwQfjvcHsQvGVRYvliofh/HP28sq4dKqPCpEyW2pg8eUPPLuBUvxmMZfR10sgP73Wlet/QGOOdS44bTeOH9hhiUyM50KsGC62ApnYk4LyLECzW1b4EuosC1ED6HL//jq6w4RkXlzctLMAIs= Received: from LV2PR12MB5990.namprd12.prod.outlook.com (2603:10b6:408:170::16) by DS0PR12MB8320.namprd12.prod.outlook.com (2603:10b6:8:f8::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.50; Wed, 17 Apr 2024 23:14:30 +0000 Received: from LV2PR12MB5990.namprd12.prod.outlook.com ([fe80::7827:b41a:c9d6:8e1d]) by LV2PR12MB5990.namprd12.prod.outlook.com ([fe80::7827:b41a:c9d6:8e1d%7]) with mapi id 15.20.7452.049; Wed, 17 Apr 2024 23:14:30 +0000 X-SNPS-Relay: synopsys.com From: Thinh Nguyen To: Greg Kroah-Hartman , Thinh Nguyen , Mathias Nyman CC: John Youn , "linux-usb@vger.kernel.org" , "stable@vger.kernel.org" Subject: [PATCH v2 1/2] usb: xhci-plat: Don't include xhci.h Thread-Topic: [PATCH v2 1/2] usb: xhci-plat: Don't include xhci.h Thread-Index: AQHakR0A/ht2WvByOUCLbChYqR7Edg== Date: Wed, 17 Apr 2024 23:14:30 +0000 Message-ID: <310acfa01c957a10d9feaca3f7206269866ba2eb.1713394973.git.Thinh.Nguyen@synopsys.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: LV2PR12MB5990:EE_|DS0PR12MB8320:EE_ x-ms-office365-filtering-correlation-id: 9512330a-d251-4c5a-093f-08dc5f3422e9 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: lgohOsa0XY66eqBnQrj3C4pkLBISZNUhm+qDP7OMNnTWS3EBXfhlr1Y87jodaBMabZ13BspBFoENu5pCVFm7uPif0OYp/4ghK361BnsXJEJRRFTRk1MQ9VhMro9EujHmx2G//qee8kF3C1KlTHqDGC8D/ErbWyV+xMcv8VsgH8IKPtjTgH1bo+cOLqSOPymdoVBzn6mEJpk/PjBFW8bCQWikcIrqdBU2+oAhCRFaLLQrzjbSoFCYAyOqOlNRz0pSQGpCKfXWYkdVrRiGcPHMJgmoNij6DGFtLkHFxNP76lk5+ka1nEobniMmgEH6ZofTSsYOZP/muVytCfCxf4N2MLBUGXcz5PIIazN7XqIMAmEo6kfYuUGvp1h8TTMz7p08+kZS0hFGTlD+TSX8UR3gJV9jr5wkljRtwc4UGi7hzi5ygKtikj3QGzqSy0nb0sQpuouXGqTCzwNiOavjFBN+pqzACR5R4196Ih4i3cTKoqsoX0cHSvF8l90ktFMH1dP1TFtobbYnX07nGhlzgmVsPTFv5/mDEEjyHaND2FNT8iQp/vxPGxVTKf/erf4rNPsxy8tutFHIjSlD3HKiMh4+8Y3MZI2JL0JYSgIDOxZTd4vu6owGKwsr7Ch8jXHvO+XD4oTNJOjHtAEQhULE0iMITep6nO6mNoLUSIwgvgI2IbPkYZ4aYe9TAZsxQqPf/tJUGFrX14KydJHbstsbPkir4siuJT3OIS73AE94Jw7O468= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:LV2PR12MB5990.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(1800799015)(366007)(38070700009); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?5piF6Y94k97ORrJolItyqJ3?= =?iso-8859-1?q?SbWrlDDg9VL2tX7DD+inoh2brgSRodV9SV+j8etIkmUuRAUYr2Qse25lr9w6?= =?iso-8859-1?q?6mJbGPHM42B6URczWXPsmEUHVURqWQnRtLuOEZRXmQjJnIOhzX3R8tsCS0kS?= =?iso-8859-1?q?lL1sSE7iwc7b7DgH/Iyifd/V6sSEUf+79SGUgssE1diF+67m7/+LtwA2dlOo?= =?iso-8859-1?q?yJx88HG+XhoxoBFzu0kK+NvrCdL4mZQQrMu3to/E7+v+LDcspG8ept8dJZr0?= =?iso-8859-1?q?mqIUTRXyTtI+b7leToA8lFK4F/x15gZ3/TYt0vhH9fY84ceEAS+zpD2MhID7?= =?iso-8859-1?q?zVK0sVbgVQXjVQoEpXstAFD4Ujf0oib/SsBgGkhamMgeT+QoORipOWeMAZff?= =?iso-8859-1?q?pMvZLu9/0EMgy6n+gn5wy1FaJZm3qsmE0PE41yBa3tKyByEtOrqimDRvKkST?= =?iso-8859-1?q?AEAHa4oXg2QoqIuPA2n0o8XmPwDeymB9tquK9338LbXd6UiQOQMoyfwgkBbA?= =?iso-8859-1?q?FFS70lNblyUJj/yBDpmcXwXWavDssUmVWKzuOsUdKDWbAf+VZrD6Cpkyubdg?= =?iso-8859-1?q?qSd9b6WEnl9AoxbUTg8wk8x6LSzx1oMvAdvfhsAwMjt0O4eEh/akG+6rB4Up?= =?iso-8859-1?q?A0A6GN2zMwW+GgEDEJsnpyWFlOMj+c+4PPklQSndNt5TlBuzLQTN/5lyvxvr?= =?iso-8859-1?q?RP6gXvkFiNp4FmYkDhLp2iw/hm+RlNvR/7McYyjqoQwmcw1VAHuPX1+mfWnm?= =?iso-8859-1?q?dt0/o6KSr+oKW/gb6bcEeQArc2tAgur6BrfiXmHOdYR/6afCFIxOlUqamrvx?= =?iso-8859-1?q?DN0JdtGMU+ye3oWarheoeToVrARjty+4VBNxuzuECeK82662YD1PYQKIjEMV?= =?iso-8859-1?q?OPx6hcSnPy5qb1IHaJKS1yiLJucPgwNjDbWXXJ92qEKVxhiIGld0s8KE8Xbk?= =?iso-8859-1?q?K03/3TPTp9Wf494j3X0Js7efAWs/25zJ5D2Vh2AK08gKIK3v2WXQ9lFOEpj1?= =?iso-8859-1?q?EOZ+oZ+U9E841chO4KNJTO7trZyxdu5NFl8Ab6Ybt1B3rrWoMBXclQmoMBGY?= =?iso-8859-1?q?EY4LlZ4Ik/FGqKoBzZD9X1nwScBM+bBvao1+4WZhjY0F0eu+K+3KkNNGI98+?= =?iso-8859-1?q?3Go5tmucOZokF9mmtaVgMcLrgAhuS+PtzWN1vv4N+Ljg1XPa7jRaK6XsVUYe?= =?iso-8859-1?q?sy0IKnfHwIJtcPshhLWU8ALPnJiXZBPma3Isv7ivvWOenPgY4Q9b4WKhCUNj?= =?iso-8859-1?q?THp+w+hGezVTjvVfyKpTLV03VC8NaIixD33YkU8V28gBaekvM0gdAVDiEk/8?= =?iso-8859-1?q?nhWfDfM5T0Yo/hG1P/SIJmenQ2GFH+2qMWKigASSpnwm91g1bR9X0TOHMGa/?= =?iso-8859-1?q?OV2qJL131ZXmXspPCfHosctQWIgszfaDvKG9aUjOXhJFIJGvUycXL4QLwI0Q?= =?iso-8859-1?q?gT+AWyEuifuXYkxGpedAkCOfkDScQUTDkDmrlDrebCIKAqKH7sR9pkC+bjVo?= =?iso-8859-1?q?rXEThOSPO5B9XYfJUg/f4zJpZ24owpe1TqADMLEoSDJMv7hXESeretD1Iw1e?= =?iso-8859-1?q?jnnRQ3xzsYC7Dj19F9NPj0acAcfC+NGgxDH7idGG9yVi3M1z3PTty8TFDtWM?= =?iso-8859-1?q?Sq7D5jg1IQQoLdCJ7?= Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: V6SbsqNUW5MCqnRYU7WyvvJqBn9CP1B/dSfgoo54p9Vii2eJufjMjdOMtcnFAHS4tXwYZNVIFeZeu9oscgEPPXAxA8cahpRg4trBZv9LPb8figSkNsxhlwlGpbgSmINeB1zqt/xoQM6TgIG8jn4GMgATyn60kePE/RWFK10IQt3bn4iNXXm8AiVn2+n9pH7dcA/3UD0+4zuAPu/s65sZ6WU6mbCLp2KrXU7sPZ1tO/4lBGQLOih89lOaFUa6/ueuEyAgY1Z2SOVO7dq6C0UVeHOMeqD5XBnkaHQ+i6VQi6SBaja7syaSWB4WlWxFX8IDJgQV5DbHGELmV+G8IJ7+GDGRuHitagnBkMJmTveOFTu0Au/h0D+aSXVMcwCZ5NiLtr2HCNbdGOifDUoauatPRjPQZ8oEBi9hvWv6ADSo1yo+VK/7reegNiTdnaLMyVvSmjk5xeWifhKNPkP55fbMhN4+sWlG2lkU3fTNt5V0dh3IwcoZd8M8WVDHYJxuJh+BPOzHCDfqCyHCM/KsdkaYxZeMWftfxKGq6VDSmvWFt/GXix9V1pW9HV5zY/ctg9EXL8antN96dPERG/8g7kU2VzOdaG7GO5Dc9sRerHiuhcaSGI9bvsYt7k3vVbWT3Fc8SeDN9xPkUfUA48LCvAuqCg== X-OriginatorOrg: synopsys.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: LV2PR12MB5990.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9512330a-d251-4c5a-093f-08dc5f3422e9 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Apr 2024 23:14:30.7943 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: c33c9f88-1eb7-4099-9700-16013fd9e8aa X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: aPyYNOdSKD6d/YtZ4A6+1fGoCUYwlSG784yycBpHqhodLBuuoCi2KDspIcrk93/C35FR57dPdxqycc2oi6A3gg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB8320 X-Proofpoint-ORIG-GUID: A1u00_6Mw-tZV2aemjT5WngXm-30-pT_ X-Proofpoint-GUID: A1u00_6Mw-tZV2aemjT5WngXm-30-pT_ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-04-17_18,2024-04-17_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_active_cloned_notspam policy=outbound_active_cloned score=0 priorityscore=1501 clxscore=1015 suspectscore=0 spamscore=0 mlxlogscore=999 phishscore=0 impostorscore=0 bulkscore=0 adultscore=0 lowpriorityscore=0 mlxscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404170165 The xhci_plat.h should not need to include the entire xhci.h header. This can cause redefinition in dwc3 if it selectively includes some xHCI definitions. This is a prerequisite change for a fix to disable suspend during initialization for dwc3. Cc: stable@vger.kernel.org Signed-off-by: Thinh Nguyen --- Changes in v2: - Fix xhci-rzv2m build issue drivers/usb/host/xhci-plat.h | 4 +++- drivers/usb/host/xhci-rzv2m.c | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci-plat.h b/drivers/usb/host/xhci-plat.h index 2d15386f2c50..6475130eac4b 100644 --- a/drivers/usb/host/xhci-plat.h +++ b/drivers/usb/host/xhci-plat.h @@ -8,7 +8,9 @@ #ifndef _XHCI_PLAT_H #define _XHCI_PLAT_H -#include "xhci.h" /* for hcd_to_xhci() */ +struct device; +struct platform_device; +struct usb_hcd; struct xhci_plat_priv { const char *firmware_name; diff --git a/drivers/usb/host/xhci-rzv2m.c b/drivers/usb/host/xhci-rzv2m.c index ec65b24eafa8..4f59867d7117 100644 --- a/drivers/usb/host/xhci-rzv2m.c +++ b/drivers/usb/host/xhci-rzv2m.c @@ -6,6 +6,7 @@ */ #include +#include "xhci.h" #include "xhci-plat.h" #include "xhci-rzv2m.h" From patchwork Wed Apr 17 23:14:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thinh Nguyen X-Patchwork-Id: 789736 Received: from mx0b-00230701.pphosted.com (mx0b-00230701.pphosted.com [148.163.158.9]) (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 0A1177C083; Wed, 17 Apr 2024 23:14:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=148.163.158.9 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713395686; cv=fail; b=mHrJC1qJpqSYHHsrC4qop3fmD+CiP74FMoBY9WjziqA8FA4dPkMvWi1h9D1FrCOxARTseNA76TG3uNrR0Q0apXw4x4qxPh7bfpDXX7nlddrrHvR4IpTy22xdCSNeq+J9NlCtIZSotGq6xYl+I++alGeHPIfHzuNeWaiR535osx4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713395686; c=relaxed/simple; bh=8yGpAGe4AxtHxlN49rA7q8lODfkxrs/+5dC3S8T1o4Y=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=paHi+v+bsq/it7RybD2jX6e0C/FIF97qK4McKx+oKAHe6AEPhT4zKjB9L5z+5GqxAjKJfsmuribWDvF5l3/ya+A+rkrFV7wRwRIjRVIUPt+bK9eX1JEhGShW/uCVW7bAiC11wCjj8GNnf+fV3inQH5xrOuJdmccyirlVnhuLp44= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=synopsys.com; spf=pass smtp.mailfrom=synopsys.com; dkim=pass (2048-bit key) header.d=synopsys.com header.i=@synopsys.com header.b=X9ValRwR; dkim=pass (2048-bit key) header.d=synopsys.com header.i=@synopsys.com header.b=e1C6+hdT; dkim=fail (1024-bit key) header.d=synopsys.com header.i=@synopsys.com header.b=jekBbRtb reason="signature verification failed"; arc=fail smtp.client-ip=148.163.158.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=synopsys.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=synopsys.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=synopsys.com header.i=@synopsys.com header.b="X9ValRwR"; dkim=pass (2048-bit key) header.d=synopsys.com header.i=@synopsys.com header.b="e1C6+hdT"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=synopsys.com header.i=@synopsys.com header.b="jekBbRtb" Received: from pps.filterd (m0098572.ppops.net [127.0.0.1]) by mx0b-00230701.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 43HMZsBJ008269; Wed, 17 Apr 2024 16:14:43 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=synopsys.com; h= from:to:cc:subject:date:message-id:references:in-reply-to :content-type:content-transfer-encoding:mime-version; s= pfptdkimsnps; bh=1TiWIRv6aNGXvkuu4md0xlwUHP0IGdYqfU+3qK1DskE=; b= X9ValRwRl/ecdL5ObtkXY6/P9RiClOMAF6S5sq05wc0zIgIJQp5NtZiWjHI7EJ1P 8G15tn/t77ymoEwWDESZqTsQfrUBp9AW816G5kiKMSBBGSG6s/efsDMbW89oDliR 44BZivds+KKxNbk9X+kA0K0Mwc5D67tx3XBY9m8zH/cD7hrcssaFaU937TdG1yTO pEnJPTC2Ac1wMSsMH8SCBdjw2DSjOZ0lzWqFtzfyokM81RHFBmGDx0zcd0TmYrgD 1qqvedSAB9AjMf9G9Jmr9UuzBu31nu9HVLM30J+sFmgeEYHAc8+EdFcVxHUekhZq Yqe4nfTmWImb/bWteiXWbA== Received: from smtprelay-out1.synopsys.com (smtprelay-out1.synopsys.com [149.117.73.133]) by mx0b-00230701.pphosted.com (PPS) with ESMTPS id 3xjgkta7xa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 17 Apr 2024 16:14:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1713395682; bh=8yGpAGe4AxtHxlN49rA7q8lODfkxrs/+5dC3S8T1o4Y=; h=From:To:CC:Subject:Date:References:In-Reply-To:From; b=e1C6+hdTSzhu2lF//I7zrOUWoHSDfFUgRW9MLwMEE99859CQz/UaUmX83p3mwJT/t eCl7fiaTmRgfgUNCjzJUPTYcP4XtB/RedQfdfjXIvz7sy9lGO57e/k5j/QaVjOaP4A Wv0p2KemM/p+gZi77tx15bI4eZr/GccT3JM2AqOfHUep+7G0ml6tJ4sI1ZguufiQPc GahjqywfJE2Qe5kb3534axMNh1HK+euUCH8q96mc8eCkiB4iH/GpGbe4+Xx3dPaEq6 AGqmwympXAbU8CY/5/ylkgVe3EJyQWiPEnaiPgrffD9X0VjqAWfpwZnAlp1gI56Vdr wNdCb693ZRbiQ== Received: from mailhost.synopsys.com (sv1-mailhost2.synopsys.com [10.205.2.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) client-signature RSA-PSS (2048 bits)) (Client CN "mailhost.synopsys.com", Issuer "SNPSica2" (verified OK)) by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id 2F654401C6; Wed, 17 Apr 2024 23:14:42 +0000 (UTC) Received: from o365relay-in.synopsys.com (sv2-o365relay3.synopsys.com [10.202.1.139]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "o365relay-in.synopsys.com", Issuer "Entrust Certification Authority - L1K" (verified OK)) by mailhost.synopsys.com (Postfix) with ESMTPS id 1C237A006D; Wed, 17 Apr 2024 23:14:42 +0000 (UTC) Authentication-Results: o365relay-in.synopsys.com; dmarc=pass (p=reject dis=none) header.from=synopsys.com Authentication-Results: o365relay-in.synopsys.com; spf=pass smtp.mailfrom=synopsys.com Authentication-Results: o365relay-in.synopsys.com; dkim=pass (1024-bit key; unprotected) header.d=synopsys.com header.i=@synopsys.com header.a=rsa-sha256 header.s=selector1 header.b=jekBbRtb; dkim-atps=neutral Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2168.outbound.protection.outlook.com [104.47.57.168]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "DigiCert Cloud Services CA-1" (verified OK)) by o365relay-in.synopsys.com (Postfix) with ESMTPS id 9612E400A2; Wed, 17 Apr 2024 23:14:41 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kFc3Ty5VYJKVmphu9XxTMZ53ztr1V9YG6pySwkddtL+dp9UI0ANk+vIm9tp+SneF3um0btxqFSW9ljPmX8dLUZXj0ItNS8iYZFCYKyVubjhGk099vKxFOrTddMhsPogpOfLPKe9zCSPmNA3iMLQmZLl+CQO/wi8ddTbkBsIPikgMCe2+UDw317H5gIJMjdnNls+w/SFUVKyqfNEYmKn/Ct+0ifwfdNfVmejBpjqNUH1tCau2SL0d3+N2AxuI9WP50qDfaFoei9aEa5WjZl1opwMTInup6TzbsZxdFDhADPPOWJ0VCJSDYowiA+4041tUFHnWrJ4yUFlKqDFTaC5FGA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1TiWIRv6aNGXvkuu4md0xlwUHP0IGdYqfU+3qK1DskE=; b=MfXvR7QblnWc7gb8R3G5zCke71cuChcqokWqlX5QQijOXX8V2GaJARpDg8dN7oF+m4L3I+WuHOd03muwJA59LxVWSWyAadcrfEk2KpOFbJsDsW5qExvwmTns85QYiSLZ5m+vvOYMvEJNJgekqGiOst9nTLT2hYJz9EUch09bw63ScEqWRJtU+lJl0HM7VqVVRuRiY5qBrparakHDbfG2Zz+SanepUC4Se0vR8KuDUC7+uKsEh9d8F9N4f2Lmap3rTZcce9CubYllLp26M8aPSmrAVnU+tH8SYZSzZzIaE5bQ1p/syL7DOsRhC2c5TYQ6LdOwsGcx9HOAMVa5GxVq3g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=synopsys.com; dmarc=pass action=none header.from=synopsys.com; dkim=pass header.d=synopsys.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=synopsys.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1TiWIRv6aNGXvkuu4md0xlwUHP0IGdYqfU+3qK1DskE=; b=jekBbRtbALwkIEenp8YZJ8fPzpw734VLYKwIl27k6V/GBeV7+DbWExyqzaiLzgNBr56JV+c3zEBlEiYJlrYOEezF6/owLg6tSDDbhq0hC3QF5eiHeX73T/GCdNzKPjp3vcAhal0HpkckX8i/efw9C+NbRhhmOwpMp1i07XYVUnU= Received: from LV2PR12MB5990.namprd12.prod.outlook.com (2603:10b6:408:170::16) by LV3PR12MB9118.namprd12.prod.outlook.com (2603:10b6:408:1a1::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.39; Wed, 17 Apr 2024 23:14:37 +0000 Received: from LV2PR12MB5990.namprd12.prod.outlook.com ([fe80::7827:b41a:c9d6:8e1d]) by LV2PR12MB5990.namprd12.prod.outlook.com ([fe80::7827:b41a:c9d6:8e1d%7]) with mapi id 15.20.7452.049; Wed, 17 Apr 2024 23:14:36 +0000 X-SNPS-Relay: synopsys.com From: Thinh Nguyen To: Greg Kroah-Hartman , Thinh Nguyen CC: John Youn , "linux-usb@vger.kernel.org" , "stable@vger.kernel.org" Subject: [PATCH v2 2/2] usb: dwc3: core: Prevent phy suspend during init Thread-Topic: [PATCH v2 2/2] usb: dwc3: core: Prevent phy suspend during init Thread-Index: AQHakR0EbYmkUkR/o0OT/UUX1EhVrQ== Date: Wed, 17 Apr 2024 23:14:36 +0000 Message-ID: <20da4e5a0c4678c9587d3da23f83bdd6d77353e9.1713394973.git.Thinh.Nguyen@synopsys.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: LV2PR12MB5990:EE_|LV3PR12MB9118:EE_ x-ms-office365-filtering-correlation-id: 2234cfff-58e9-4881-de24-08dc5f342687 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: vWqJ+0q9MRi7pGsaogIU6nzhagw8qB9FMogmcBKjKDagJGnf6sT/vaDan0xXxdeHUbmuRe2x9/r6BuonQFb1yqCnvzQ8NFSHBopzYbCCS6v1y6s/RMecSR+/GB7w9MLK2UWL2mbLNKv48j4O4Z58cyuyPeFV3NPLtXhgtzQbyYBcjV1nRrSMVzGna7rA4jVcw5kwsoPUGOtt5x+OTDhFXYDxts+8DJrZVAdCv0qtomqgn8B/G/tzbzP7z7z4k/Z3dt00/pM28oyGCJeKh7c45ftn2You9o8gX6pEf0kg9Y1ve2De/jew7supnB9M1mrFNgwB139+mTbohk8V/ZsHC/F22Qj8X3je68y2HyjenfGu9cuZWfEqYrzNlTb0oVjAaPb4bWseC1dFpJAhNrmgvkc8BM7XxeODDytq8B2QNGBIZyiwtlSW7AnqT/CqVBz0OsgcQxd9y4Oc0+bL22rNFwMjRJuE7qd+EMh9dPUIYZKshIDE0LMX1xmcFhwk0NGAEb4Iu8+KeN98ITYiaGwXkA473Uiq/a+L8308JSJEgfD7Hyef4FNiYXxtLHsSuxAFQvzMUEjpNza6KuMQ/Kdm9cDBJ7DWJvEzwk9xrheXG+7Nsl4mVLbcOFB45mWngPL7o7onTov95ZaUaxQ7bDy7a3sPz5oKLXBnRjuMwwKhGM1klIcFa40Fg5a60pbWe5hQSi5ImMV1v7Cb1+75hIRcI0hgJSZ/Wpt6Y9uVq4vEp2Y= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:LV2PR12MB5990.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(1800799015)(366007)(376005)(38070700009); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?dsS1i7kjT3Tq6GwDEdNhhbZ?= =?iso-8859-1?q?cuLMS1cGBe+kOgM11DvF7UjCcbHJ3o4eSFTAvDfZO9vrpMptvhMQzNJoIeNv?= =?iso-8859-1?q?I38d3OrJcVSn+3588JrjPbAi7z+swIpnVj47RVB1/qJMyE7wSqBY6sRePOMs?= =?iso-8859-1?q?H/Y4KlCMr3Nq++lVxuVOEre3wciyUaCUFxgP3rLHLmfxPPR9jPOiPIT6dWWF?= =?iso-8859-1?q?QzCgq7LdkP3sv0SmgQOWB8+S2/VWaJehzHl2m44ld5Jtn5bORgaMEparb81E?= =?iso-8859-1?q?xDQWC9FBzeSGBkNybVwEZas7ckuAnMTBLZuh2C6alk5Utgd6iueqm36s73Tr?= =?iso-8859-1?q?bqASLCct3Zxcfm2X4LwnT/zl2muwKxaRuzShPC5D0KyxueJAI+mory1vcJVP?= =?iso-8859-1?q?a9dHrwenLMd+ljiasYMWqzHb1aj3ojdr/sKXm2OiBA/KcT1ZGVGATS8vmFsT?= =?iso-8859-1?q?Q6jtehKBpL3IhbvuRiYEXRqT0Baaf47l3/FrVS86Ld5AF2JAcUP9kRjeAIuy?= =?iso-8859-1?q?y+55PDM0NzjIc0Izo6+EHFvxDrQEGl9b2G0psp9auyDM/lpD5oJ3vPe5iUPy?= =?iso-8859-1?q?cG9p5MfGcYOJtUQOmlgZCcqUpr5GzshcIeDqwm2V/hsNzlgkDcnKVK87O0IO?= =?iso-8859-1?q?YlOrTrxpHM9rc34AxsheGhSEdh/4JYfotVBs1d8JaZt8d5HkMP2eNDHqRM9F?= =?iso-8859-1?q?eyj3TfjjEBj83CloQbtNxVyUzTzdY4Cgv435w6/gsbEzFejNcLLPP+cc8sVX?= =?iso-8859-1?q?5ND5OIvw/xP6ENY9ZSiFcW9qZ7yml+n2TfAnLPOZEPXXQJ61tCdrCWj0JRjH?= =?iso-8859-1?q?B+K91ioPpO/0ItZRQjjmaAINuQGAEoo/ZbU1ISE3a+AqTMCc/o2/f0btSWno?= =?iso-8859-1?q?VXZ6212FzEFWGoV3D8sOWGWzKbX4gag0YIbW6pawybMNidttSW3eUc3y4zRr?= =?iso-8859-1?q?M1+bcV9f6aafHAZtptyBMjIKqhbZrTe2/MrdzrNQJybWzJOrdAkeMZOGO72v?= =?iso-8859-1?q?VyybqlO9oLFlTLs0n0aDgNWfeg8esFN4bt7VD/15YyGL95sD7GlB7g17PwoY?= =?iso-8859-1?q?X9zrxWaOaK5OZb9kwXdJYde9hxsQNRohSAlQrb8UtYW7JJvaL1npGbxr+tpJ?= =?iso-8859-1?q?a4h30Pq6ic8q7LRw4YqEueZH72JsIFK+7mecWjddzLSxGzufn4t8AfCsLN97?= =?iso-8859-1?q?JAy4ckWBXdJLB3Sm+NGa+eNq9NLG12m/aMbprxIbEtPAURQYujKElDv3V8AY?= =?iso-8859-1?q?BmaO76bzbeVKnF3WwU3cnnjc88pDw7h8x46QtC3utGKS58mjR911PrbXnzjY?= =?iso-8859-1?q?oZMhyg3SigH8LP3HulxoQbroR5DyR+L4HMs90TWDTa3bwi6HLBdsquwXmpvM?= =?iso-8859-1?q?hwx5g7o8D3wVTWeJPIxZVBKL46E7U+0nMR4Umw1HoeuVD6oMjEZ6LlY6QMK5?= =?iso-8859-1?q?WzfGREM3ydDFFFNBQWMLDuQuh7TrvJ6uGEOAKd57hfV8K2sSI4Jk9QZ5VoNc?= =?iso-8859-1?q?WSFN1vg1OLVlIx6XtK9Ee3imScMGzpL4Y6IxmyXfsvpC3Tbg9PpnCSZ6BOIo?= =?iso-8859-1?q?Zgv/6/boSrvE+z6IPLYHLTzUACjST7m/9Mfqu+3pdO/HX9h+hfUqj0DlYK42?= =?iso-8859-1?q?q26rAAcxYATgxn1Er?= Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: SKjG61WlRCDAweVCIqrjxCwuZ5dFfge13VzVroNQXfOrxvUNDJd3xKU5PhXSt7wDw2UVKlHgt+8KaICk15cGXp6LY9N9RGPetXhPs2QvgoLnNIdqkKkjgC//+vSwvzMQ+xu8qm2DM5+cILPRWltJPYQGrIQF8QiBDEZSXltEQSw2oqkoK7ovu/2WC+kcJacx4uWKgMYWpr2xz0g0iZVStPDGJh8mmp+SzxbgLLWt7dJjP+JVmxvgYUAI3iyFEDNwUtwLIiWFCi0HV04r6vBgen8ijwB2YbBwwriitk9v7BCeloYz++n3MbPbxT4xSmV3AV7RMGgqKLrimj2f8tZQIwNG6XrzEIz3r4Vst0bPOQ4R7teMypmVn5IGNq5tcbHzKwlQdSn9knV+3XEWDGd4KpwWMepHafCXEHL/QCYYr3M1u0ZygEHqnHeJWG6CiV7vAewaAD8JU781k5XRIltAm2E9JIgXFc6MoH6yAf9uCeB1UcycFMRqKR45DW+Yt7v+6HRN+IJHOK+S6qitRaysWRh/eCQosh7LnIWYGbs0sGSYp5UFYM+J+DshaKShbWsgyTTVsiYma2lOY4clOm8FaglD7Z3SzNiDV/RB4mXcflw3ZV6mTUXY6VCDDKNuBK9FqIwLrVX/0fBs0T/oYe3kVg== X-OriginatorOrg: synopsys.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: LV2PR12MB5990.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2234cfff-58e9-4881-de24-08dc5f342687 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Apr 2024 23:14:36.8570 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: c33c9f88-1eb7-4099-9700-16013fd9e8aa X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: CH8BWMQR3F7hBjrwXS+QCgZLvfmCyHR88yvPUAvlkfZSEX0ahPwaez77SxoB23ts0rien/yQocWR0vn5bkPDUw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR12MB9118 X-Proofpoint-ORIG-GUID: s12m_f5XBQz_BnrvRbaIs_pcOhC8O95v X-Proofpoint-GUID: s12m_f5XBQz_BnrvRbaIs_pcOhC8O95v X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-04-17_18,2024-04-17_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_active_cloned_notspam policy=outbound_active_cloned score=0 priorityscore=1501 clxscore=1015 suspectscore=0 spamscore=0 mlxlogscore=999 phishscore=0 impostorscore=0 bulkscore=0 adultscore=0 lowpriorityscore=0 mlxscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404170165 GUSB3PIPECTL.SUSPENDENABLE and GUSB2PHYCFG.SUSPHY should be cleared during initialization. Suspend during initialization can result in undefined behavior due to clock synchronization failure, which often seen as core soft reset timeout. The programming guide recommended these bits to be cleared during initialization for DWC_usb3.0 version 1.94 and above (along with DWC_usb31 and DWC_usb32). The current check in the driver does not account if it's set by default setting from coreConsultant. This is especially the case for DRD when switching mode to ensure the phy clocks are available to change mode. Depending on the platforms/design, some may be affected more than others. This is noted in the DWC_usb3x programming guide under the above registers. Let's just disable them during driver load and mode switching. Restore them when the controller initialization completes. Note that some platforms workaround this issue by disabling phy suspend through "snps,dis_u3_susphy_quirk" and "snps,dis_u2_susphy_quirk" when they should not need to. Cc: stable@vger.kernel.org Fixes: 9ba3aca8fe82 ("usb: dwc3: Disable phy suspend after power-on reset") Signed-off-by: Thinh Nguyen --- Changes in v2: - None drivers/usb/dwc3/core.c | 90 +++++++++++++++++---------------------- drivers/usb/dwc3/core.h | 1 + drivers/usb/dwc3/gadget.c | 2 + drivers/usb/dwc3/host.c | 27 ++++++++++++ 4 files changed, 68 insertions(+), 52 deletions(-) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 31684cdaaae3..100041320e8d 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -104,6 +104,27 @@ static int dwc3_get_dr_mode(struct dwc3 *dwc) return 0; } +void dwc3_enable_susphy(struct dwc3 *dwc, bool enable) +{ + u32 reg; + + reg = dwc3_readl(dwc->regs, DWC3_GUSB3PIPECTL(0)); + if (enable && !dwc->dis_u3_susphy_quirk) + reg |= DWC3_GUSB3PIPECTL_SUSPHY; + else + reg &= ~DWC3_GUSB3PIPECTL_SUSPHY; + + dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(0), reg); + + reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0)); + if (enable && !dwc->dis_u2_susphy_quirk) + reg |= DWC3_GUSB2PHYCFG_SUSPHY; + else + reg &= ~DWC3_GUSB2PHYCFG_SUSPHY; + + dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg); +} + void dwc3_set_prtcap(struct dwc3 *dwc, u32 mode) { u32 reg; @@ -585,11 +606,8 @@ static int dwc3_core_ulpi_init(struct dwc3 *dwc) */ static int dwc3_phy_setup(struct dwc3 *dwc) { - unsigned int hw_mode; u32 reg; - hw_mode = DWC3_GHWPARAMS0_MODE(dwc->hwparams.hwparams0); - reg = dwc3_readl(dwc->regs, DWC3_GUSB3PIPECTL(0)); /* @@ -599,21 +617,16 @@ static int dwc3_phy_setup(struct dwc3 *dwc) reg &= ~DWC3_GUSB3PIPECTL_UX_EXIT_PX; /* - * Above 1.94a, it is recommended to set DWC3_GUSB3PIPECTL_SUSPHY - * to '0' during coreConsultant configuration. So default value - * will be '0' when the core is reset. Application needs to set it - * to '1' after the core initialization is completed. - */ - if (!DWC3_VER_IS_WITHIN(DWC3, ANY, 194A)) - reg |= DWC3_GUSB3PIPECTL_SUSPHY; - - /* - * For DRD controllers, GUSB3PIPECTL.SUSPENDENABLE must be cleared after - * power-on reset, and it can be set after core initialization, which is - * after device soft-reset during initialization. + * Above DWC_usb3.0 1.94a, it is recommended to set + * DWC3_GUSB3PIPECTL_SUSPHY to '0' during coreConsultant configuration. + * So default value will be '0' when the core is reset. Application + * needs to set it to '1' after the core initialization is completed. + * + * Similarly for DRD controllers, GUSB3PIPECTL.SUSPENDENABLE must be + * cleared after power-on reset, and it can be set after core + * initialization. */ - if (hw_mode == DWC3_GHWPARAMS0_MODE_DRD) - reg &= ~DWC3_GUSB3PIPECTL_SUSPHY; + reg &= ~DWC3_GUSB3PIPECTL_SUSPHY; if (dwc->u2ss_inp3_quirk) reg |= DWC3_GUSB3PIPECTL_U2SSINP3OK; @@ -639,9 +652,6 @@ static int dwc3_phy_setup(struct dwc3 *dwc) if (dwc->tx_de_emphasis_quirk) reg |= DWC3_GUSB3PIPECTL_TX_DEEPH(dwc->tx_de_emphasis); - if (dwc->dis_u3_susphy_quirk) - reg &= ~DWC3_GUSB3PIPECTL_SUSPHY; - if (dwc->dis_del_phy_power_chg_quirk) reg &= ~DWC3_GUSB3PIPECTL_DEPOCHANGE; @@ -689,24 +699,15 @@ static int dwc3_phy_setup(struct dwc3 *dwc) } /* - * Above 1.94a, it is recommended to set DWC3_GUSB2PHYCFG_SUSPHY to - * '0' during coreConsultant configuration. So default value will - * be '0' when the core is reset. Application needs to set it to - * '1' after the core initialization is completed. - */ - if (!DWC3_VER_IS_WITHIN(DWC3, ANY, 194A)) - reg |= DWC3_GUSB2PHYCFG_SUSPHY; - - /* - * For DRD controllers, GUSB2PHYCFG.SUSPHY must be cleared after - * power-on reset, and it can be set after core initialization, which is - * after device soft-reset during initialization. + * Above DWC_usb3.0 1.94a, it is recommended to set + * DWC3_GUSB2PHYCFG_SUSPHY to '0' during coreConsultant configuration. + * So default value will be '0' when the core is reset. Application + * needs to set it to '1' after the core initialization is completed. + * + * Similarly for DRD controllers, GUSB2PHYCFG.SUSPHY must be cleared + * after power-on reset, and it can be set after core initialization. */ - if (hw_mode == DWC3_GHWPARAMS0_MODE_DRD) - reg &= ~DWC3_GUSB2PHYCFG_SUSPHY; - - if (dwc->dis_u2_susphy_quirk) - reg &= ~DWC3_GUSB2PHYCFG_SUSPHY; + reg &= ~DWC3_GUSB2PHYCFG_SUSPHY; if (dwc->dis_enblslpm_quirk) reg &= ~DWC3_GUSB2PHYCFG_ENBLSLPM; @@ -1227,21 +1228,6 @@ static int dwc3_core_init(struct dwc3 *dwc) if (ret) goto err_exit_phy; - if (hw_mode == DWC3_GHWPARAMS0_MODE_DRD && - !DWC3_VER_IS_WITHIN(DWC3, ANY, 194A)) { - if (!dwc->dis_u3_susphy_quirk) { - reg = dwc3_readl(dwc->regs, DWC3_GUSB3PIPECTL(0)); - reg |= DWC3_GUSB3PIPECTL_SUSPHY; - dwc3_writel(dwc->regs, DWC3_GUSB3PIPECTL(0), reg); - } - - if (!dwc->dis_u2_susphy_quirk) { - reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0)); - reg |= DWC3_GUSB2PHYCFG_SUSPHY; - dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg); - } - } - dwc3_core_setup_global_control(dwc); dwc3_core_num_eps(dwc); diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index 7e80dd3d466b..180dd8d29287 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h @@ -1580,6 +1580,7 @@ int dwc3_event_buffers_setup(struct dwc3 *dwc); void dwc3_event_buffers_cleanup(struct dwc3 *dwc); int dwc3_core_soft_reset(struct dwc3 *dwc); +void dwc3_enable_susphy(struct dwc3 *dwc, bool enable); #if IS_ENABLED(CONFIG_USB_DWC3_HOST) || IS_ENABLED(CONFIG_USB_DWC3_DUAL_ROLE) int dwc3_host_init(struct dwc3 *dwc); diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 4df2661f6675..f94f68f1e7d2 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -2924,6 +2924,7 @@ static int __dwc3_gadget_start(struct dwc3 *dwc) dwc3_ep0_out_start(dwc); dwc3_gadget_enable_irq(dwc); + dwc3_enable_susphy(dwc, true); return 0; @@ -4690,6 +4691,7 @@ void dwc3_gadget_exit(struct dwc3 *dwc) if (!dwc->gadget) return; + dwc3_enable_susphy(dwc, false); usb_del_gadget(dwc->gadget); dwc3_gadget_free_endpoints(dwc); usb_put_gadget(dwc->gadget); diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c index 0204787df81d..a171b27a7845 100644 --- a/drivers/usb/dwc3/host.c +++ b/drivers/usb/dwc3/host.c @@ -10,10 +10,13 @@ #include #include #include +#include +#include #include "../host/xhci-port.h" #include "../host/xhci-ext-caps.h" #include "../host/xhci-caps.h" +#include "../host/xhci-plat.h" #include "core.h" #define XHCI_HCSPARAMS1 0x4 @@ -57,6 +60,24 @@ static void dwc3_power_off_all_roothub_ports(struct dwc3 *dwc) } } +static void dwc3_xhci_plat_start(struct usb_hcd *hcd) +{ + struct platform_device *pdev; + struct dwc3 *dwc; + + if (!usb_hcd_is_primary_hcd(hcd)) + return; + + pdev = to_platform_device(hcd->self.controller); + dwc = dev_get_drvdata(pdev->dev.parent); + + dwc3_enable_susphy(dwc, true); +} + +static const struct xhci_plat_priv dwc3_xhci_plat_quirk = { + .plat_start = dwc3_xhci_plat_start, +}; + static void dwc3_host_fill_xhci_irq_res(struct dwc3 *dwc, int irq, char *name) { @@ -167,6 +188,11 @@ int dwc3_host_init(struct dwc3 *dwc) } } + ret = platform_device_add_data(xhci, &dwc3_xhci_plat_quirk, + sizeof(struct xhci_plat_priv)); + if (ret) + goto err; + ret = platform_device_add(xhci); if (ret) { dev_err(dwc->dev, "failed to register xHCI device\n"); @@ -192,6 +218,7 @@ void dwc3_host_exit(struct dwc3 *dwc) if (dwc->sys_wakeup) device_init_wakeup(&dwc->xhci->dev, false); + dwc3_enable_susphy(dwc, false); platform_device_unregister(dwc->xhci); dwc->xhci = NULL; }