]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 7 Jan 2020 19:30:28 +0000 (20:30 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 7 Jan 2020 19:30:28 +0000 (20:30 +0100)
added patches:
ata-ahci_brcm-allow-optional-reset-controller-to-be-used.patch

queue-4.9/ata-ahci_brcm-allow-optional-reset-controller-to-be-used.patch [new file with mode: 0644]
queue-4.9/ata-ahci_brcm-fix-ahci-resources-management.patch
queue-4.9/series

diff --git a/queue-4.9/ata-ahci_brcm-allow-optional-reset-controller-to-be-used.patch b/queue-4.9/ata-ahci_brcm-allow-optional-reset-controller-to-be-used.patch
new file mode 100644 (file)
index 0000000..cd19828
--- /dev/null
@@ -0,0 +1,50 @@
+From 2b2c47d9e1fe90311b725125d6252a859ee87a79 Mon Sep 17 00:00:00 2001
+From: Florian Fainelli <f.fainelli@gmail.com>
+Date: Mon, 1 Oct 2018 10:33:00 -0700
+Subject: ata: ahci_brcm: Allow optional reset controller to be used
+
+From: Florian Fainelli <f.fainelli@gmail.com>
+
+commit 2b2c47d9e1fe90311b725125d6252a859ee87a79 upstream.
+
+On BCM63138, we need to reset the AHCI core prior to start utilizing it,
+grab the reset controller device cookie and do that.
+
+Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/ata/ahci_brcm.c |    7 +++++++
+ 1 file changed, 7 insertions(+)
+
+--- a/drivers/ata/ahci_brcm.c
++++ b/drivers/ata/ahci_brcm.c
+@@ -25,6 +25,7 @@
+ #include <linux/module.h>
+ #include <linux/of.h>
+ #include <linux/platform_device.h>
++#include <linux/reset.h>
+ #include <linux/string.h>
+ #include "ahci.h"
+@@ -88,6 +89,7 @@ struct brcm_ahci_priv {
+       u32 port_mask;
+       u32 quirks;
+       enum brcm_ahci_version version;
++      struct reset_control *rcdev;
+ };
+ static const struct ata_port_info ahci_brcm_port_info = {
+@@ -332,6 +334,11 @@ static int brcm_ahci_probe(struct platfo
+       if (IS_ERR(priv->top_ctrl))
+               return PTR_ERR(priv->top_ctrl);
++      /* Reset is optional depending on platform */
++      priv->rcdev = devm_reset_control_get(&pdev->dev, "ahci");
++      if (!IS_ERR_OR_NULL(priv->rcdev))
++              reset_control_deassert(priv->rcdev);
++
+       if ((priv->version == BRCM_SATA_BCM7425) ||
+               (priv->version == BRCM_SATA_NSP)) {
+               priv->quirks |= BRCM_AHCI_QUIRK_NO_NCQ;
index 97e240faf14622dd7eca08244df224f0a6aea223..8f5a20ce958f0d9b8277ff64e16c9a0bc7858453 100644 (file)
@@ -40,7 +40,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 
 --- a/drivers/ata/ahci_brcm.c
 +++ b/drivers/ata/ahci_brcm.c
-@@ -226,19 +226,12 @@ static void brcm_sata_phys_disable(struc
+@@ -228,19 +228,12 @@ static void brcm_sata_phys_disable(struc
                        brcm_sata_phy_disable(priv, i);
  }
  
@@ -62,7 +62,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  
        if (fls(impl) > SATA_TOP_MAX_PHYS)
                dev_warn(priv->dev, "warning: more ports than PHYs (%#x)\n",
-@@ -246,9 +239,6 @@ static u32 brcm_ahci_get_portmask(struct
+@@ -248,9 +241,6 @@ static u32 brcm_ahci_get_portmask(struct
        else if (!impl)
                dev_info(priv->dev, "no ports found\n");
  
@@ -72,7 +72,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
        return impl;
  }
  
-@@ -275,11 +265,10 @@ static int brcm_ahci_suspend(struct devi
+@@ -277,11 +267,10 @@ static int brcm_ahci_suspend(struct devi
        struct ata_host *host = dev_get_drvdata(dev);
        struct ahci_host_priv *hpriv = host->private_data;
        struct brcm_ahci_priv *priv = hpriv->plat_data;
@@ -86,7 +86,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  }
  
  static int brcm_ahci_resume(struct device *dev)
-@@ -287,11 +276,44 @@ static int brcm_ahci_resume(struct devic
+@@ -289,11 +278,44 @@ static int brcm_ahci_resume(struct devic
        struct ata_host *host = dev_get_drvdata(dev);
        struct ahci_host_priv *hpriv = host->private_data;
        struct brcm_ahci_priv *priv = hpriv->plat_data;
@@ -132,7 +132,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  }
  #endif
  
-@@ -338,37 +360,62 @@ static int brcm_ahci_probe(struct platfo
+@@ -345,37 +367,62 @@ static int brcm_ahci_probe(struct platfo
                priv->quirks |= BRCM_AHCI_QUIRK_SKIP_PHY_ENABLE;
        }
  
@@ -206,7 +206,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  }
  
  static int brcm_ahci_remove(struct platform_device *pdev)
-@@ -378,12 +425,12 @@ static int brcm_ahci_remove(struct platf
+@@ -385,12 +432,12 @@ static int brcm_ahci_remove(struct platf
        struct brcm_ahci_priv *priv = hpriv->plat_data;
        int ret;
  
index 1739061b3dc019b3fc4ec99287548fcd3a2b5a92..4a09cd4871cc5ded4171cfa0eb5b5c2bfd5d2549 100644 (file)
@@ -24,6 +24,7 @@ locks-print-unsigned-ino-in-proc-locks.patch
 dmaengine-fix-access-to-uninitialized-dma_slave_caps.patch
 compat_ioctl-block-handle-persistent-reservations.patch
 ata-libahci_platform-export-again-ahci_platform_-en-dis-able_phys.patch
+ata-ahci_brcm-allow-optional-reset-controller-to-be-used.patch
 ata-ahci_brcm-fix-ahci-resources-management.patch
 gpiolib-fix-up-emulated-open-drain-outputs.patch
 tracing-have-the-histogram-compare-functions-convert-to-u64-first.patch