Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2217249/?format=api
{ "id": 2217249, "url": "http://patchwork.ozlabs.org/api/patches/2217249/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/patch/20260327184706.1600329-11-vladimir.oltean@nxp.com/", "project": { "id": 42, "url": "http://patchwork.ozlabs.org/api/projects/42/?format=api", "name": "Linux GPIO development", "link_name": "linux-gpio", "list_id": "linux-gpio.vger.kernel.org", "list_email": "linux-gpio@vger.kernel.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260327184706.1600329-11-vladimir.oltean@nxp.com>", "list_archive_url": null, "date": "2026-03-27T18:46:48", "name": "[v6,phy-next,10/28] scsi: ufs: qcom: keep parallel track of PHY power state", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "28c1d9a78f69c9933c700d9b95dca3fad9bf34a2", "submitter": { "id": 75582, "url": "http://patchwork.ozlabs.org/api/people/75582/?format=api", "name": "Vladimir Oltean", "email": "vladimir.oltean@nxp.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-gpio/patch/20260327184706.1600329-11-vladimir.oltean@nxp.com/mbox/", "series": [ { "id": 497821, "url": "http://patchwork.ozlabs.org/api/series/497821/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/list/?series=497821", "date": "2026-03-27T18:46:39", "name": "Split Generic PHY consumer and provider", "version": 6, "mbox": "http://patchwork.ozlabs.org/series/497821/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2217249/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2217249/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linux-gpio+bounces-34305-incoming=patchwork.ozlabs.org@vger.kernel.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "linux-gpio@vger.kernel.org" ], "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=nxp.com header.i=@nxp.com header.a=rsa-sha256\n header.s=selector1 header.b=KdXbK4hJ;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=104.64.211.4; helo=sin.lore.kernel.org;\n envelope-from=linux-gpio+bounces-34305-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com\n header.b=\"KdXbK4hJ\"", "smtp.subspace.kernel.org;\n arc=fail smtp.client-ip=52.101.83.36", "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=nxp.com", "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=nxp.com", "dkim=none (message not signed)\n header.d=none;dmarc=none action=none header.from=nxp.com;" ], "Received": [ "from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fj95H3xKtz1y1P\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 28 Mar 2026 06:02:59 +1100 (AEDT)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sin.lore.kernel.org (Postfix) with ESMTP id 4FEF930ABF62\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 27 Mar 2026 18:51:39 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 3B78239184D;\n\tFri, 27 Mar 2026 18:49:03 +0000 (UTC)", "from GVXPR05CU001.outbound.protection.outlook.com\n (mail-swedencentralazon11013036.outbound.protection.outlook.com\n [52.101.83.36])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 444C63750B9;\n\tFri, 27 Mar 2026 18:49:01 +0000 (UTC)", "from DU2PR04MB8584.eurprd04.prod.outlook.com (2603:10a6:10:2db::24)\n by MRWPR04MB11287.eurprd04.prod.outlook.com (2603:10a6:501:79::20) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9745.22; Fri, 27 Mar\n 2026 18:48:54 +0000", "from DU2PR04MB8584.eurprd04.prod.outlook.com\n ([fe80::3f9d:4a01:f53c:952d]) by DU2PR04MB8584.eurprd04.prod.outlook.com\n ([fe80::3f9d:4a01:f53c:952d%5]) with mapi id 15.20.9745.019; Fri, 27 Mar 2026\n 18:48:54 +0000" ], "ARC-Seal": [ "i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774637343; cv=fail;\n b=YBn0iVfnBI++bvUzup9Ib77MHWRd9Flb6c3uPRiMT87WA+nTzZt4paJ+ktF/B3y56cg9bx9qtYBHyyPoQMX+cUY1lc0VRTb4D24ZXTgtDwMPGKpoXPRx9KE2D+YgQRQpWLqdjZTCXPsRGkq+Ws9Mq8sGuohk5K68TEwK6AvtnVU=", "i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;\n b=XBrdYhtuD7bVBNXSZRFJ/czhl8CleE1i3co6vQY1Qhv5TZTI3i45TH4gO4m1nlwYRjOQhB9VXZ4NcKDGuceBzBHQ1iRxDCjfNFw7OKuh9JLmjwUGVLJJraWePhZRrISofho1p/Hg8uzdVPrAofZG9NelzczTv5RYAhkU6ItFyOeWlOek0WrmQ01ToBKMTlVje1fP77tk3vGEj7r6aiiQli0hXMB+i0444BIGnkaGbBDjxSDtU40796Jnzp2eWqQhDnbc/ziF0YMY4jt/hITGBHhPVr9rOs+5Uy57IMDllO6nvj3h5G+t6yd7OaalRLTqOSfsCayMX8eq75RhUPueTQ==" ], "ARC-Message-Signature": [ "i=2; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774637343; c=relaxed/simple;\n\tbh=d/ibPA+gHxFTeNABvCJ8TxAibY7Xpq5Wqp0zpVJZN6E=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t Content-Type:MIME-Version;\n b=mlEoc798yz3380XP6KcelwHB4j5NvYB0FVFmx6gH69Y88kUC4ZsWtJhPlYpQDXFuS7D0ZbGj/P3hMZyblHqkl6hu4L/JB6GezQTWEnesQ1GIjcfJmtQJbvq+ul3hzuxubPdRrmIlaYwksdcS6iqjhf3vKH35OS5xu0o1x73lTZU=", "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector10001;\n 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;\n bh=6/8IFemO3A8G7HYoTa5WO0VaG7lZf+B1vLBMtAQUIrA=;\n b=L0ddRc8zFYcj/HZGu+ANM/W0qCPGwR7fopDujjdvBH/XAptEF9wmSAbdx6IrFKabcHdA7TVRcSuyCpSeV+giDfEQA7jlmXYVDbq4/lh/Q5Q3/xnecGqARuhCZoej6QMWxSeyp8DsWMimjX+V4y252sssbuECNWC53HF+SQBqFEoTZCqhIvg8LZMCXRHJXJ2m4vxz+FNgGX90+2WSCsjkAtlpI1pNGzqMhGY6vVAn4lXu7puwytVo2f1B9Ls3Ov/FxmN9S2o/ifn9pM2Y1HxrVUmzsBtK4bgbUizvjTiQlrkbMpGhc2ZebnPOUwAfExaXOPLn0Yp8UwebKpYm3Dp65w==" ], "ARC-Authentication-Results": [ "i=2; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=nxp.com;\n spf=pass smtp.mailfrom=nxp.com;\n dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com\n header.b=KdXbK4hJ; arc=fail smtp.client-ip=52.101.83.36", "i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass\n header.d=nxp.com; arc=none" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=6/8IFemO3A8G7HYoTa5WO0VaG7lZf+B1vLBMtAQUIrA=;\n b=KdXbK4hJYwowfR3YQ0EHdcfv2pp1gNgvPJJ1ETQAzafIrPb+4J9o8p7WhNBVdZG2Vfk18Dd/PhBTAzoLvAQMik1ea3vFPfhBGVTgAuP9h+V9zKrSoWem3WG6dX3X5dqhOsfNadYSfdoYTeG8UXciz75dp3VskyEw3EFFZNODU+eh3IKa6ZbXaHzTSIEBlzvFf3+V/D+sO/TuRrlsTMpIonGNOqHKa3sJbhV3+PxkubFd3j6Iu/RTJEowMkqbx9vpKCdA6awymF8FczSXUo7cNYccyKoV65EglQxlgAYX+IQHuRNfTQRejGgejFRqxA0GMrIwBB8jc4TGvb8Fllxjkg==", "From": "Vladimir Oltean <vladimir.oltean@nxp.com>", "To": "linux-phy@lists.infradead.org", "Cc": "Vinod Koul <vkoul@kernel.org>,\n\tNeil Armstrong <neil.armstrong@linaro.org>,\n\tdri-devel@lists.freedesktop.org,\n\tfreedreno@lists.freedesktop.org,\n\tlinux-arm-kernel@lists.infradead.org,\n\tlinux-arm-msm@vger.kernel.org,\n\tlinux-can@vger.kernel.org,\n\tlinux-gpio@vger.kernel.org,\n\tlinux-ide@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org,\n\tlinux-media@vger.kernel.org,\n\tlinux-pci@vger.kernel.org,\n\tlinux-renesas-soc@vger.kernel.org,\n\tlinux-riscv@lists.infradead.org,\n\tlinux-rockchip@lists.infradead.org,\n\tlinux-samsung-soc@vger.kernel.org,\n\tlinux-scsi@vger.kernel.org,\n\tlinux-sunxi@lists.linux.dev,\n\tlinux-tegra@vger.kernel.org,\n\tlinux-usb@vger.kernel.org,\n\tnetdev@vger.kernel.org,\n\tspacemit@lists.linux.dev,\n\tUNGLinuxDriver@microchip.com,\n\t\"James E.J. Bottomley\" <James.Bottomley@HansenPartnership.com>,\n\tManivannan Sadhasivam <mani@kernel.org>,\n\t\"Martin K. Petersen\" <martin.petersen@oracle.com>,\n\tNitin Rawat <quic_nitirawa@quicinc.com>", "Subject": "[PATCH v6 phy-next 10/28] scsi: ufs: qcom: keep parallel track of PHY\n power state", "Date": "Fri, 27 Mar 2026 20:46:48 +0200", "Message-ID": "<20260327184706.1600329-11-vladimir.oltean@nxp.com>", "X-Mailer": "git-send-email 2.43.0", "In-Reply-To": "<20260327184706.1600329-1-vladimir.oltean@nxp.com>", "References": "<20260327184706.1600329-1-vladimir.oltean@nxp.com>", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-ClientProxiedBy": "VI1PR04CA0067.eurprd04.prod.outlook.com\n (2603:10a6:802:2::38) To DU2PR04MB8584.eurprd04.prod.outlook.com\n (2603:10a6:10:2db::24)", "Precedence": "bulk", "X-Mailing-List": "linux-gpio@vger.kernel.org", "List-Id": "<linux-gpio.vger.kernel.org>", "List-Subscribe": "<mailto:linux-gpio+subscribe@vger.kernel.org>", "List-Unsubscribe": "<mailto:linux-gpio+unsubscribe@vger.kernel.org>", "MIME-Version": "1.0", "X-MS-PublicTrafficType": "Email", "X-MS-TrafficTypeDiagnostic": "DU2PR04MB8584:EE_|MRWPR04MB11287:EE_", "X-MS-Office365-Filtering-Correlation-Id": "f33495f2-deea-475b-edcf-08de8c317e9b", "X-MS-Exchange-SenderADCheck": "1", "X-MS-Exchange-AntiSpam-Relay": "0", "X-Microsoft-Antispam": "\n\tBCL:0;ARA:13230040|7416014|376014|1800799024|366016|10070799003|19092799006|18002099003|56012099003|22082099003;", "X-Microsoft-Antispam-Message-Info": "\n\tKKpkGAjXHUdsD/PJ3bx0Cx61TiSlnw3jU/3JRNoHAwDbGVQR0CD7oi1eIZ1AD5J+ss2nnmi8on3bf1O8Nc9wlFmrar8wgR5QZYsQ6WJsGNlb9cqyX70ooEggg8eh7dXJ1MucA5tXdUtXPdjCNWQmqqzG1Ftj6J8SqKn+uoagoM7JyPRvU8rQWKHNFTxLe2gU8fu+wQo0IUFa766ogetnrlkRlCm6tLeWKaOsI3fblE5laqmzWy2UuEZB8wvAPJOCrNWiTeGyPnDwj6iRa5LBqkZdzXLubM98qcDz3Rdo/eTIW2DqoLONqc17FCEhJoC5wYSjlm/sKmAkfD5rn/wXwbofcdWReyaqtSaocwwh/fMsM5OwQnzhb3+ei3BaDQz7sx828ySDw+TkRlLC8cSCUQcSoipp6c5a7fKA44WbNbSFwONMXkrnhZeSF+banVKVMkPEiH3+MFaT1r9e99Z+ZrQeUpKYoskxMSKaExqkkI66UGNUpdNlo0cOycxQZZzYL9wEcPJ7qgOTXEKTgC7BAJclfR395Ne7Nlmr/ojJwjlfRCloVKOQ6k4/CTWmxNLPnHWovjsCa2oBNr/JuEHGXwyBZ8FWBd3ANNdl+usKxUi2PlwvEcFIppbcya1dAL807GV9u2r+pCF/war7M77Q0bW/hCzCz0rOl1bGiuvuPLbUITeV0Idq9ZBeboq9KRuUEBeHkrlFlXhjIdpyCCMLxdjN/+jU2EkkPQtG7geBifAiPuwD3SMRZv8FWMCYzXf3", "X-Forefront-Antispam-Report": "\n\tCIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8584.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(376014)(1800799024)(366016)(10070799003)(19092799006)(18002099003)(56012099003)(22082099003);DIR:OUT;SFP:1101;", "X-MS-Exchange-AntiSpam-MessageData-ChunkCount": "2", "X-MS-Exchange-AntiSpam-MessageData-0": "\n ofrQe78l9h/8xAQf+dZIDuhUXH4V6y9XLPhTWmXwJ3EQyaszTj3AqEiwzSXiCEV97jaG+fv6Cj9lDIBkKCprKMdRJNbX2PwCm2CzdjafJGYngQdXoNCSBJ7fjDbnROErIhWqrDdlUKaHSUypDHRsuOnWv4c/hJvYoCQv6Hra5coc4tF/p33mXVD0uv3zrwgzSFVOt68OjJoIc0TqLUwK+xtytmeKqyHYxr/9Ez0WZThmL+YLexTYEyK7oFY00VLd8R9JHx8a1EV7zSHP6A/tCdiCvrZ4gbz7IkUseB9XbQK1TriH/6Ln+KzD0zcC31EdZ5Ij9zD8YyCpTcmCRsN18hO8jQUSsHFeNP7vUh8HGt6jZuIf3nvofLbNOYGlhQqOr2lxbZlffjxvx3pCGfm0lWKwKiKZ5xgNzU6K1YlMFr4XGh9vNyg91NVQANgymhmyDR6N0uDJStDKZHzQMnGLydWHqYtOOBuogfQoC+kwxwgD9YOICSB1oiF1uxh3afCwjK+/yKfqoFvsLFi5gEMplZp1IH5nXXDkGIWw32SxMLlMcYhR+lwRV/9c9owJIWOwQB2N7rwd8NHUmmFcFGfsHxnLIETtzon+qYGCPjbgGDP1Zoy61yI5WvmSaTo40Q+msJTWMiJDvsZ/szV8ozl4yJFJg/BxrqhkkbkOcNFp2kJlSS5qVXo0+Nj6m4yURgCIU6aQ69lsgPxOuLOYfN8H7skQsrzewSTN0ueulAqYT07G0gjDpM3T0OW/2O/aq1ay+LqOtIrsdcvKIpyxnSrQjgllpcEd1jMBnA1FSYS2jvhb3rtdijPy4n+GJZ07AtFhBdn6Z+uQYHjs33WT6LTHl3pWLNyJw1FiSBeG+Ztq6b/tZnk+wgp9g9XrK8qiO7lhr+jW8D+wj6smvQz72W21xgTb1PbNxN857HJe+6AuaxsLAFQreAq83kKxPDSOESesys9rSz5lY+jfFVDu4xkPZfFcSJ0k83SfufR0nhTyxPg8JcLMlatIUcqHmh82fE0Wl8vU8eXnMRSdzkNYYsy0EBy4+mukwFAoR7o3VvdX5726U9fHUpavfJTBhSqaoAepI02GzzsTuXHjcmXWsYJsUcnZ3mbxIbVYn1Suz9wj3Zns1zmY2ni65qeUQvxZs/c9lSsH4wVnCF1cCB5AwCFcpxAtXlbMS55Z2XBIoUz8rB/1Fez6J3XSm4uLJYxecIbRl8TecHbLr0Hfn1Ou8Y4FltP2vjMmSkbFybHY3TntAcXDPv34ZQ9iV2GtHeKll/oarGgHaroW1gsmLrBo/W/1VzYRmbskPPFhKW0Ln6CxHOigCddVXIqeAFcXWAYILOPKeuJwseRarrZAUJdw7W4H/TrQajEkSXN8ehURbJc82++yhxs2pxuYjay7Vi9QlCIJeUpOVjoM8mSYm28rcSCeddIVJob+SlP14h+mfL6nr3LFg29dgOqvrrykRL0DIzSZOj3W7IoZde+x/s5OV4oGBQFDLTBH7bQz0CcuiMVgB4Z0QfOPRr6dwuE/RKzIdqbaM0A9PJ8zVSTV6xYXElk/e3nPMqxYBVx48ZpPdsdVP8HkogKCI+mP8Lk7RtXLzm5AfiRJ0h/yN3CxDFdo52hYNMqGU9brmJG8gTVv0zgtiHETy9oLQP5fCKGwqKIF908G9Yfi31v30D5H0+t+p0YTDZRdKUeM199DhRZoR6JQjIZfXGlvifnTixz/Gjl9K6T0cKsrU8vha+MK2KbeLzLnW56KmMFyQ0kH99Bw0JEkOr303mO4v8WMp47Qt6kel7szm8iOTGzK", "X-MS-Exchange-AntiSpam-MessageData-1": "ck0bPn/L/xe+AVP2NuUwhSrem6PCqgVmRp4=", "X-OriginatorOrg": "nxp.com", "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n f33495f2-deea-475b-edcf-08de8c317e9b", "X-MS-Exchange-CrossTenant-AuthSource": "DU2PR04MB8584.eurprd04.prod.outlook.com", "X-MS-Exchange-CrossTenant-AuthAs": "Internal", "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "27 Mar 2026 18:48:54.0341\n (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": "\n QEvEMrDtvb+pUQvcbEfh51leInynvkBrR9j5mTMsIvykCbnaznmvPvJLVXm2Vj545J2T90iJTcCQ2xDZBNfqTw==", "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "MRWPR04MB11287" }, "content": "PHY consumer drivers should not look at the phy->power_count (a PHY\ninternal field), because in the general case there might also be other\nconsumers who have called phy_power_on() too, so the fact that the\npower_count is non-zero does not mean that we did.\n\nMoreover, struct phy will become opaque soon, so the qcom UFS driver\nwill not be able to apply this pattern anymore.\n\nBy all accounts, the need for ufs_qcom_power_up_sequence() to call\nphy_power_off() prior to phy_init() denotes a skewed state of affairs.\n\n(1) The Generic PHY API warns if phy_power_on() is called prior to\n phy_init() - which ufs-qcom.c does, from ufs_qcom_setup_clocks().\n The UFS controller driver hides its tracks by dropping the power\n count prior to phy_init(), and that API violation goes undetected.\n\n(2) phy_calibrate(), as implemented by the phy-qcom-qmp-ufs.c provider,\n only works once after power on. Next time it will time out. And\n since ufs_qcom_hce_enable_notify() -> ufs_qcom_power_up_sequence()\n is called in a retry loop by the UFS core, the PHY power would\n normally be on, hence the phy_power_off() call to ensure the\n consistent state during phy_calibrate().\n\nThe above constitute improper Generic PHY API use, *but* fixing that\nrequires delicate surgery and I'm only here to stop this PHY consumer\nfrom using fields it's not supposed to.\n\nOnce this discussion is settled, I will also address the above issues as\nfollow-ups:\nhttps://lore.kernel.org/linux-phy/20260327112858.r5lpqygtvsane2vf@skbuf/\n\nUntil then, we can reimplement the logic in this driver in a\nbug-compatible way, by keeping parallel track of just the UFS\ncontroller's calls to phy_power_on() and phy_power_off().\n\nNote that phy_power_off() shouldn't return an error in general and\ndoesn't return an error in the particular case of the phy-qcom-qmp-ufs.c\nprovider. So I've removed the one handling of phy_power_off() errors\nfrom ufs_qcom_setup_clocks().\n\nSigned-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>\n---\nCc: \"James E.J. Bottomley\" <James.Bottomley@HansenPartnership.com>\nCc: Manivannan Sadhasivam <mani@kernel.org>\nCc: \"Martin K. Petersen\" <martin.petersen@oracle.com>\nCc: Nitin Rawat <quic_nitirawa@quicinc.com>\n\nv5->v6:\n- rewrite commit message\n- drop phy_power_off() error handling from ufs_qcom_setup_clocks()\nv4->v5: patch is new\n---\n drivers/ufs/host/ufs-qcom.c | 15 ++++++++-------\n drivers/ufs/host/ufs-qcom.h | 1 +\n 2 files changed, 9 insertions(+), 7 deletions(-)", "diff": "diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c\nindex 375fd24ba458..99feabc69111 100644\n--- a/drivers/ufs/host/ufs-qcom.c\n+++ b/drivers/ufs/host/ufs-qcom.c\n@@ -508,9 +508,10 @@ static int ufs_qcom_power_up_sequence(struct ufs_hba *hba)\n \tif (ret)\n \t\treturn ret;\n \n-\tif (phy->power_count)\n+\tif (host->phy_powered_on) {\n \t\tphy_power_off(phy);\n-\n+\t\thost->phy_powered_on = false;\n+\t}\n \n \t/* phy initialization - calibrate the phy */\n \tret = phy_init(phy);\n@@ -531,6 +532,7 @@ static int ufs_qcom_power_up_sequence(struct ufs_hba *hba)\n \t\t\t__func__, ret);\n \t\tgoto out_disable_phy;\n \t}\n+\thost->phy_powered_on = true;\n \n \tret = phy_calibrate(phy);\n \tif (ret) {\n@@ -1263,11 +1265,8 @@ static int ufs_qcom_setup_clocks(struct ufs_hba *hba, bool on,\n \t\t\t\tufs_qcom_dev_ref_clk_ctrl(host, false);\n \t\t\t}\n \n-\t\t\terr = phy_power_off(phy);\n-\t\t\tif (err) {\n-\t\t\t\tdev_err(hba->dev, \"phy power off failed, ret=%d\\n\", err);\n-\t\t\t\treturn err;\n-\t\t\t}\n+\t\t\tphy_power_off(phy);\n+\t\t\thost->phy_powered_on = false;\n \t\t}\n \t\tbreak;\n \tcase POST_CHANGE:\n@@ -1277,6 +1276,7 @@ static int ufs_qcom_setup_clocks(struct ufs_hba *hba, bool on,\n \t\t\t\tdev_err(hba->dev, \"phy power on failed, ret = %d\\n\", err);\n \t\t\t\treturn err;\n \t\t\t}\n+\t\t\thost->phy_powered_on = true;\n \n \t\t\t/* enable the device ref clock for HS mode*/\n \t\t\tif (ufshcd_is_hs_mode(&hba->pwr_info))\n@@ -1467,6 +1467,7 @@ static void ufs_qcom_exit(struct ufs_hba *hba)\n \n \tufs_qcom_disable_lane_clks(host);\n \tphy_power_off(host->generic_phy);\n+\thost->phy_powered_on = false;\n \tphy_exit(host->generic_phy);\n }\n \ndiff --git a/drivers/ufs/host/ufs-qcom.h b/drivers/ufs/host/ufs-qcom.h\nindex 1111ab34da01..72ce0687fa42 100644\n--- a/drivers/ufs/host/ufs-qcom.h\n+++ b/drivers/ufs/host/ufs-qcom.h\n@@ -282,6 +282,7 @@ struct ufs_qcom_host {\n \tstruct clk_bulk_data *clks;\n \tu32 num_clks;\n \tbool is_lane_clks_enabled;\n+\tbool phy_powered_on;\n \n \tstruct icc_path *icc_ddr;\n \tstruct icc_path *icc_cpu;\n", "prefixes": [ "v6", "phy-next", "10/28" ] }