Patch "Revert "ata: sata_mv: Convert to devm_ioremap_resource()"" has been added to the 4.11-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
Revert "ata: sata_mv: Convert to devm_ioremap_resource()"
to the 4.11-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
revert-ata-sata_mv-convert-to-devm_ioremap_resource.patch
and it can be found in the queue-4.11 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
3e4240da0e3673637c1c995bdd14cfdbc8f4dc4cMon Sep 17 00:00:00 2001
From: Andrew Lunn <[email protected]>
Date: Wed, 24 May 2017 01:39:35 +0200
Subject: Revert "ata: sata_mv: Convert to devm_ioremap_resource()"
From: Andrew Lunn <[email protected]>
commit 3e4240da0e3673637c1c995bdd14cfdbc8f4dc4c upstream.
This reverts commit 368e5fbdfc60732643f34f538823ed4bc8829827.
devm_ioremap_resource() enforces that there are no overlapping resources, where as devm_ioremap() does not. The sata phy driver needs a subset of the sata IO address space, so maps some of the sata address space. As a result, sata_mv now fails to probe, reporting it cannot get its resources, and so we don't have any SATA disks.
--- drivers/ata/sata_mv.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
drivers/ata/sata_mv.c +8 -5
@@ -4067,7 +4067,6 @@ static int mv_platform_probe(struct platstruct ata_host *host;struct mv_host_priv *hpriv;struct resource *res; -void __iomem *mmio;int n_ports =0 , irq =0 ;int rc;int port;
@@ -4086,9 +4085,8 @@ static int mv_platform_probe(struct plat* Get the register base first */ res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); - mmio =devm_ioremap_resource (&pdev->dev, res); -if (IS_ERR (mmio)) -return PTR_ERR (mmio); +if (res ==NULL ) +return -EINVAL ;/* allocate host */ if (pdev->dev.of_node) {
@@ -4132,7 +4130,12 @@ static int mv_platform_probe(struct plat hpriv->board_idx = chip_soc; host->iomap =NULL ; - hpriv->base = mmio -SATAHC0_REG_BASE ; + hpriv->base =devm_ioremap (&pdev->dev, res->start, +resource_size (res)); +if (!hpriv->base) +return -ENOMEM ; + + hpriv->base -=SATAHC0_REG_BASE ; hpriv->clk =clk_get (&pdev->dev,NULL );if (IS_ERR (hpriv->clk))
Patches currently in stable-queue which might be from [email protected] are
queue-4.11/revert-ata-sata_mv-convert-to-devm_ioremap_resource.patch