From: Greg Kroah-Hartman Date: Tue, 7 Jan 2020 19:31:25 +0000 (+0100) Subject: 4.14-stable patches X-Git-Tag: v4.14.163~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d65c862a5f90a06bbb59c5e3073967dad5792dac;p=thirdparty%2Fkernel%2Fstable-queue.git 4.14-stable patches added patches: ata-ahci_brcm-allow-optional-reset-controller-to-be-used.patch --- diff --git a/queue-4.14/ata-ahci_brcm-allow-optional-reset-controller-to-be-used.patch b/queue-4.14/ata-ahci_brcm-allow-optional-reset-controller-to-be-used.patch new file mode 100644 index 00000000000..1370cc036d7 --- /dev/null +++ b/queue-4.14/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" +@@ -87,6 +88,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 = { +@@ -327,6 +329,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.14/ata-ahci_brcm-fix-ahci-resources-management.patch b/queue-4.14/ata-ahci_brcm-fix-ahci-resources-management.patch index 1362bb6ec43..fe1b67154c0 100644 --- a/queue-4.14/ata-ahci_brcm-fix-ahci-resources-management.patch +++ b/queue-4.14/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 -@@ -221,19 +221,12 @@ static void brcm_sata_phys_disable(struc +@@ -223,19 +223,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", -@@ -241,9 +234,6 @@ static u32 brcm_ahci_get_portmask(struct +@@ -243,9 +236,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; } -@@ -270,11 +260,10 @@ static int brcm_ahci_suspend(struct devi +@@ -272,11 +262,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) -@@ -282,11 +271,44 @@ static int brcm_ahci_resume(struct devic +@@ -284,11 +273,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 -@@ -333,38 +355,63 @@ static int brcm_ahci_probe(struct platfo +@@ -340,38 +362,63 @@ static int brcm_ahci_probe(struct platfo priv->quirks |= BRCM_AHCI_QUIRK_SKIP_PHY_ENABLE; } @@ -207,7 +207,7 @@ Signed-off-by: Greg Kroah-Hartman } static int brcm_ahci_remove(struct platform_device *pdev) -@@ -374,12 +421,12 @@ static int brcm_ahci_remove(struct platf +@@ -381,12 +428,12 @@ static int brcm_ahci_remove(struct platf struct brcm_ahci_priv *priv = hpriv->plat_data; int ret; diff --git a/queue-4.14/series b/queue-4.14/series index f6a79179fd6..c053c85b30d 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -34,6 +34,7 @@ dmaengine-fix-access-to-uninitialized-dma_slave_caps.patch compat_ioctl-block-handle-persistent-reservations.patch compat_ioctl-block-handle-blkreportzone-blkresetzone.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-fix-lock-inversion-in-trace_event_enable_tgid_record.patch