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: <20200106185857.11128-3-f.fainelli@gmail.com>
Date:   Mon,  6 Jan 2020 10:58:57 -0800
From:   Florian Fainelli <f.fainelli@...il.com>
To:     linux-kernel@...r.kernel.org
Cc:     Florian Fainelli <f.fainelli@...il.com>,
        Jens Axboe <axboe@...nel.dk>, Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Hans de Goede <hdegoede@...hat.com>,
        Philipp Zabel <p.zabel@...gutronix.de>,
        Tejun Heo <tj@...nel.org>, Jaedon Shin <jaedon.shin@...il.com>,
        linux-ide@...r.kernel.org (open list:LIBATA SUBSYSTEM (Serial and
        Parallel ATA drivers)),
        devicetree@...r.kernel.org (open list:OPEN FIRMWARE AND FLATTENED
        DEVICE TREE BINDINGS)
Subject: [PATCH 2/2] ata: ahci_brcm: BCM7216 reset is self de-asserting

The BCM7216 reset controller line is self-deasserting, unlike other
platforms, so make use of reset_control_reset() instead of
reset_control_deassert().

Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
---
 drivers/ata/ahci_brcm.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/drivers/ata/ahci_brcm.c b/drivers/ata/ahci_brcm.c
index c3137ec9fb1c..5c9fcdb8df96 100644
--- a/drivers/ata/ahci_brcm.c
+++ b/drivers/ata/ahci_brcm.c
@@ -363,8 +363,12 @@ static int brcm_ahci_resume(struct device *dev)
 	struct brcm_ahci_priv *priv = hpriv->plat_data;
 	int ret = 0;
 
-	if (!IS_ERR_OR_NULL(priv->rcdev))
-		ret = reset_control_deassert(priv->rcdev);
+	if (!IS_ERR_OR_NULL(priv->rcdev)) {
+		if (priv->version == BRCM_SATA_BCM7216)
+			ret = reset_control_reset(priv->rcdev);
+		else
+			ret = reset_control_deassert(priv->rcdev);
+	}
 	if (ret)
 		return ret;
 
@@ -475,8 +479,12 @@ static int brcm_ahci_probe(struct platform_device *pdev)
 	}
 
 	priv->rcdev = devm_reset_control_get(&pdev->dev, reset_name);
-	if (!IS_ERR_OR_NULL(priv->rcdev))
-		reset_control_deassert(priv->rcdev);
+	if (!IS_ERR_OR_NULL(priv->rcdev)) {
+		if (priv->version == BRCM_SATA_BCM7216)
+			reset_control_reset(priv->rcdev);
+		else
+			reset_control_deassert(priv->rcdev);
+	}
 
 	ret = ahci_platform_enable_clks(hpriv);
 	if (ret)
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ