lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1705604904-471889-3-git-send-email-radhey.shyam.pandey@amd.com>
Date: Fri, 19 Jan 2024 00:38:24 +0530
From: Radhey Shyam Pandey <radhey.shyam.pandey@....com>
To: <dlemoal@...nel.org>, <cassel@...nel.org>, <richardcochran@...il.com>,
	<piyush.mehta@...inx.com>, <axboe@...nel.dk>, <michal.simek@....com>
CC: <linux-ide@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<git@....com>, Piyush Mehta <piyush.mehta@....com>, Radhey Shyam Pandey
	<radhey.shyam.pandey@....com>
Subject: [PATCH 2/2] ata: ahci_ceva: add missing enable regulator API for Xilinx GT PHY support

From: Piyush Mehta <piyush.mehta@....com>

The regulators API are disabled and enabled, during suspend and resume,
respectively. The following warning notice shows up on the initial suspend
because the enable regulators API is unaddressed in the probe:

regulator-dummy: Underflow of regulator enable count

Added the ahci_platform_enable_regulators API in probe to maintain the
regulator enabled and disabled ref count.

Fixes: 9a9d3abe24bb ("ata: ahci: ceva: Update the driver to support xilinx GT phy")
Signed-off-by: Piyush Mehta <piyush.mehta@....com>
Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@....com>
---
 drivers/ata/ahci_ceva.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/ata/ahci_ceva.c b/drivers/ata/ahci_ceva.c
index bfc513f1d0b3..1c56f0cabb11 100644
--- a/drivers/ata/ahci_ceva.c
+++ b/drivers/ata/ahci_ceva.c
@@ -219,9 +219,14 @@ static int ceva_ahci_probe(struct platform_device *pdev)
 		if (rc)
 			return rc;
 	} else {
-		rc = ahci_platform_enable_clks(hpriv);
+		rc = ahci_platform_enable_regulators(hpriv);
 		if (rc)
 			return rc;
+
+		rc = ahci_platform_enable_clks(hpriv);
+		if (rc)
+			goto disable_regulator;
+
 		/* Assert the controller reset */
 		reset_control_assert(cevapriv->rst);
 
@@ -340,6 +345,9 @@ static int ceva_ahci_probe(struct platform_device *pdev)
 disable_clks:
 	ahci_platform_disable_clks(hpriv);
 
+disable_regulator:
+	ahci_platform_disable_regulators(hpriv);
+
 	return rc;
 }
 
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ