Skip to contentSkip to conversation

SDHCI: Don't assign mmc->caps at SDHCI directly

PATCH In review Kyungmin Park 3 participants 3 messages Jun 12, 2010 – Jun 28, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/3 SDHCI: Don't assign mmc->caps at SDHCI directly

From: Kyungmin Park <[email protected]>

Some host controller can set mmc->caps before sdhci_add_host.

---
 drivers/mmc/host/sdhci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mmc/host/sdhci.c +1 -1
index 4321e0c..142419c 100644
@@ -1791,7 +1791,7 @@ int sdhci_add_host(struct sdhci_host *host)
 	else
 		mmc->f_min = host->max_clk / 256;
 	mmc->f_max = host->max_clk;
-	mmc->caps = MMC_CAP_SDIO_IRQ;
+	mmc->caps |= MMC_CAP_SDIO_IRQ;
 
 	if (!(host->quirks & SDHCI_QUIRK_FORCE_1_BIT_DATA))
 		mmc->caps |= MMC_CAP_4_BIT_DATA;
Signature · 1 line
1.5.3.3
#1 lore raw
Quoted 14 lines · On Sat, 12 Jun 2010 14:44:50 +0900 Kyungmin Park <[email protected]>…

From: Kyungmin Park <[email protected]>

Some host controller can set mmc->caps before sdhci_add_host.

---
 drivers/mmc/host/sdhci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mmc/host/sdhci.c +0 -0
index 4321e0c..142419c 100644

drivers/mmc/host/sdhci.c int sdhci_add_host(struct sdhci_host *host) · line 1797

Quoted 8 lines
drivers/mmc/host/sdhci.c +1 -1
@@ -1791,7 +1791,7 @@ int sdhci_add_host(struct sdhci_host *host)
 	else
 		mmc->f_min = host->max_clk / 256;
 	mmc->f_max = host->max_clk;
-	mmc->caps = MMC_CAP_SDIO_IRQ;
+	mmc->caps |= MMC_CAP_SDIO_IRQ;
 
 	if (!(host->quirks & SDHCI_QUIRK_FORCE_1_BIT_DATA))
 		mmc->caps |= MMC_CAP_4_BIT_DATA;

A great shower of MMC patches have magically turned up in linux-next, apparently via some tree of Grant's. Those patches changed the above code to look like:

        if (!(host->quirks & SDHCI_QUIRK_NO_SDIO_IRQ))
                mmc->caps |= MMC_CAP_SDIO_IRQ;

So it appears that this bug is fixed in that code as well. So I'll drop your patch. If the above changes end up not getting merged into mainline then your fix will be lost.

That fix was unchangelogged. In fact the patch was completely unchangelogged and I haven't looked at it at all and as far as I can tell none of it has been sent to the mmc list.

#2 lore raw
Quoted 33 lines · Andrew Morton
Quoted 20 lines · On Sat, 12 Jun 2010 14:44:50 +0900 Kyungmin Park <[email protected]>…

From: Kyungmin Park <[email protected]>

Some host controller can set mmc->caps before sdhci_add_host.

---
 drivers/mmc/host/sdhci.c |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mmc/host/sdhci.c +0 -0
index 4321e0c..142419c 100644
@@ -1791,7 +1791,7 @@ int sdhci_add_host(struct sdhci_host *host)

      else
              mmc->f_min = host->max_clk / 256;
      mmc->f_max = host->max_clk;
-     mmc->caps = MMC_CAP_SDIO_IRQ;
+     mmc->caps |= MMC_CAP_SDIO_IRQ;

Quoted 2 lines

      if (!(host->quirks & SDHCI_QUIRK_FORCE_1_BIT_DATA)) mmc->caps |= MMC_CAP_4_BIT_DATA;

A great shower of MMC patches have magically turned up in linux-next, apparently via some tree of Grant's.  Those patches changed the above code to look like:

       if (!(host->quirks & SDHCI_QUIRK_NO_SDIO_IRQ)) mmc->caps |= MMC_CAP_SDIO_IRQ;

Quoted 7 lines

So it appears that this bug is fixed in that code as well.  So I'll drop your patch.  If the above changes end up not getting merged into mainline then your fix will be lost.

That fix was unchangelogged.  In fact the patch was completely unchangelogged and I haven't looked at it at all and as far as I can tell none of it has been sent to the mmc list.

I messed it up by pushing the wrong branch. I'm pulling it out now and it won't be in the next linux-next.

g.