From: Greg Kroah-Hartman Date: Tue, 7 Jan 2020 19:30:28 +0000 (+0100) Subject: 4.9-stable patches X-Git-Tag: v4.14.163~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=176f609a82052bf871809ed151060d7bd4767f32;p=thirdparty%2Fkernel%2Fstable-queue.git 4.9-stable patches added patches: ata-ahci_brcm-allow-optional-reset-controller-to-be-used.patch --- 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 index 00000000000..cd1982896d8 --- /dev/null +++ b/queue-4.9/ata-ahci_brcm-allow-optional-reset-controller-to-be-used.patch @@ -0,0 +1,50 @@ +From 2b2c47d9e1fe90311b725125d6252a859ee87a79 Mon Sep 17 00:00:00 2001 +From: Florian Fainelli +Date: Mon, 1 Oct 2018 10:33:00 -0700 +Subject: ata: ahci_brcm: Allow optional reset controller to be used + +From: Florian Fainelli + +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 +Signed-off-by: Jens Axboe +Signed-off-by: Greg Kroah-Hartman + +--- + 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 + #include + #include ++#include + #include + + #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; diff --git a/queue-4.9/ata-ahci_brcm-fix-ahci-resources-management.patch b/queue-4.9/ata-ahci_brcm-fix-ahci-resources-management.patch index 97e240faf14..8f5a20ce958 100644 --- a/queue-4.9/ata-ahci_brcm-fix-ahci-resources-management.patch +++ b/queue-4.9/ata-ahci_brcm-fix-ahci-resources-management.patch @@ -40,7 +40,7 @@ Signed-off-by: Greg Kroah-Hartman --- 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 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 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 } 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 } #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 } 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; diff --git a/queue-4.9/series b/queue-4.9/series index 1739061b3dc..4a09cd4871c 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -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