Skip to contentSkip to conversation

one doubt about mmc_sdio_init_card function

DISCUSSION Fu, Zhonghui 4 participants 16 messages Jul 1, 2014 – Aug 11, 2014 1 message not in the archive MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

Hi, all

The mmc_sdio_init_card(drivers/mmc/core/sdio.c) function calls mmc_alloc_card(drivers/mmc/core/bus.c) function to allocate a card structure. card->dev.bus is assigned with mmc_bus_type in mmc_alloc_card function. Why not assign sdio_bus_type to card->dev.bus?

struct mmc_card *mmc_alloc_card(struct mmc_host *host, struct device_type *type)

{
    struct mmc_card *card;

    card = kzalloc(sizeof(struct mmc_card), GFP_KERNEL);
    if (!card)
        return ERR_PTR(-ENOMEM);

    card->host = host;

    device_initialize(&card->dev);

    card->dev.parent = mmc_classdev(host);
    card->dev.bus = &mmc_bus_type;
    card->dev.release = mmc_release_card;
    card->dev.type = type;

    return card;
}

Thanks,
Zhonghui

#1 lore raw
Quoted 4 lines · Zhonghui

Hi, all

The mmc_sdio_init_card(drivers/mmc/core/sdio.c) function calls mmc_alloc_card(drivers/mmc/core/bus.c) function to allocate a card structure. card->dev.bus is assigned with mmc_bus_type in mmc_alloc_card function. Why not assign sdio_bus_type to card->dev.bus?

sdio card, mmc card, sd card are all devices on the mmc bus, hence their bus type is set to mmc_bus_type.

sdio function device is a device on the sdio bus, hence its bus type is sdio_bus_type.

Hope this helps,
Aaron

Quoted 26 lines

struct mmc_card *mmc_alloc_card(struct mmc_host *host, struct device_type *type)

{
    struct mmc_card *card;

    card = kzalloc(sizeof(struct mmc_card), GFP_KERNEL);
    if (!card)
        return ERR_PTR(-ENOMEM);

    card->host = host;

    device_initialize(&card->dev);

    card->dev.parent = mmc_classdev(host);
    card->dev.bus = &mmc_bus_type;
    card->dev.release = mmc_release_card;
    card->dev.type = type;

    return card;
}

Thanks,
Zhonghui

#2 lore raw

One bug of SDHCI driver

In reply to Fu, Zhonghui

Hi, all

The statement "mmc->caps2 |= MMC_CAP2_SDIO_IRQ_NOTHREAD;" is added in "sdhci_add_host" function in host/sdhci.c file. In some cases, this will make "host->sdio_irq_thread" a NULL pointer in "mmc_sdio_resume" functon of core/sdio.c file and lead to resume failure. Could you please give me some advice how to fix this bug?

Thanks,
Zhonghui

#3 lore raw

Re: One bug of SDHCI driver

Hi,

just use the MMC_CAP2_SDIO_IRQ_NOTHREAD?

if (!err && host->sdio_irq && !(host->quirks & MMC_CAP2_SDIO_IRQ_NOTHREAD))

	wake_up_process(host->sdio_irq_thread);

I didn't test this..but i believe that it will be fixed.

Best Regards,
Jaehoon Chung

Quoted 15 lines · Zhonghui

Hi, all

The statement "mmc->caps2 |= MMC_CAP2_SDIO_IRQ_NOTHREAD;" is added in "sdhci_add_host" function in host/sdhci.c file. In some cases, this will make "host->sdio_irq_thread" a NULL pointer in "mmc_sdio_resume" functon of core/sdio.c file and lead to resume failure. Could you please give me some advice how to fix this bug?

Thanks,
Zhonghui

#4 lore raw

Re: One bug of SDHCI driver

Yes, "mmc->caps2 |= MMC_CAP2_SDIO_IRQ_NOTHREAD;" of "sdhci_add_host" function in host/sdhci.c file make oops.

"sdio_card_irq_get" function in core/sdio_irq.c file:
if (!(host->caps2 & MMC_CAP2_SDIO_IRQ_NOTHREAD)) { /* the condition is false */

            atomic_set(&host->sdio_irq_thread_abort, 0);
            host->sdio_irq_thread =                                               
                kthread_run(sdio_irq_thread, host,
                        "ksdioirqd/%s", mmc_hostname(host));

This will make "host->sdio_irq_thread" a NULL pointer in "mmc_sdio_resume" functon of core/sdio.c file.

Thanks,
Zhonghui

Quoted 27 lines · Jaehoon Chung

Hi,

just use the MMC_CAP2_SDIO_IRQ_NOTHREAD?

if (!err && host->sdio_irq && !(host->quirks & MMC_CAP2_SDIO_IRQ_NOTHREAD))

	wake_up_process(host->sdio_irq_thread);

I didn't test this..but i believe that it will be fixed.

Best Regards,
Jaehoon Chung

Quoted 14 lines · Zhonghui

Hi, all

The statement "mmc->caps2 |= MMC_CAP2_SDIO_IRQ_NOTHREAD;" is added in "sdhci_add_host" function in host/sdhci.c file. In some cases, this will make "host->sdio_irq_thread" a NULL pointer in "mmc_sdio_resume" functon of core/sdio.c file and lead to resume failure. Could you please give me some advice how to fix this bug?

Thanks,
Zhonghui

#5 lore raw

Re: One bug of SDHCI driver

Hi,

Why add "mmc->caps2 |= MMC_CAP2_SDIO_IRQ_NOTHREAD;" ? How to fix this bug?

Could you please give out some idea about this bug?

Thanks,
Zhonghui

Quoted 47 lines · Zhonghui

Yes, "mmc->caps2 |= MMC_CAP2_SDIO_IRQ_NOTHREAD;" of "sdhci_add_host" function in host/sdhci.c file make oops.

"sdio_card_irq_get" function in core/sdio_irq.c file:
if (!(host->caps2 & MMC_CAP2_SDIO_IRQ_NOTHREAD)) { /* the condition is false */

            atomic_set(&host->sdio_irq_thread_abort, 0);
            host->sdio_irq_thread =                                               
                kthread_run(sdio_irq_thread, host,
                        "ksdioirqd/%s", mmc_hostname(host));

This will make "host->sdio_irq_thread" a NULL pointer in "mmc_sdio_resume" functon of core/sdio.c file.

Thanks,
Zhonghui

Quoted 27 lines · Jaehoon Chung

Hi,

just use the MMC_CAP2_SDIO_IRQ_NOTHREAD?

if (!err && host->sdio_irq && !(host->quirks & MMC_CAP2_SDIO_IRQ_NOTHREAD))

	wake_up_process(host->sdio_irq_thread);

I didn't test this..but i believe that it will be fixed.

Best Regards,
Jaehoon Chung

Quoted 14 lines · Zhonghui

Hi, all

The statement "mmc->caps2 |= MMC_CAP2_SDIO_IRQ_NOTHREAD;" is added in "sdhci_add_host" function in host/sdhci.c file. In some cases, this will make "host->sdio_irq_thread" a NULL pointer in "mmc_sdio_resume" functon of core/sdio.c file and lead to resume failure. Could you please give me some advice how to fix this bug?

Thanks,
Zhonghui

#6 lore raw

Re: One bug of SDHCI driver

Hi Zhonghui,

Quoted 3 lines · Zhonghui

Why add "mmc->caps2 |= MMC_CAP2_SDIO_IRQ_NOTHREAD;" ? How to fix this bug?

Could you please give out some idea about this bug?

Jaehoon already gave you a patch to fix this bug. Here it is again in proper patch form. Please can you test it and let us know whether it fixes the crash? Thanks.

From: Chris Ball <[email protected]>
Subject: [PATCH] mmc: core: sdio: Fix unconditional wake_up_process() on sdio thread

781e989cf59 ("mmc: sdhci: convert to new SDIO IRQ handling") and bf3b5ec66bd ("mmc: sdio_irq: rework sdio irq handling") disabled the use of our own custom threaded IRQ handler, but left in an unconditional wake_up_process() on that handler at resume-time.

[Patch suggested by Jaehoon Chung]
---
 drivers/mmc/core/sdio.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/core/sdio.c +2 -1
index e636d9e..2a128e2 100644
@@ -992,7 +992,8 @@ static int mmc_sdio_resume(struct mmc_host *host)
 		}
 	}
 
-	if (!err && host->sdio_irqs)
+	if (!err && host->sdio_irqs &&
+	    !(host->quirks & MMC_CAP2_SDIO_IRQ_NOTHREAD))
 		wake_up_process(host->sdio_irq_thread);
 	mmc_release_host(host);
 
Signature · 1 line
Chris Ball   <http://printf.net/>
#7 lore raw

Re: One bug of SDHCI driver

Hi,

The data type of "host" is "struct mmc_host", and there is not "quirks" member in this structure.

Thanks,
Zhonghui

Quoted 40 lines · Chris Ball

Hi Zhonghui,

Quoted 3 lines · Zhonghui

Why add "mmc->caps2 |= MMC_CAP2_SDIO_IRQ_NOTHREAD;" ? How to fix this bug?

Could you please give out some idea about this bug?

Jaehoon already gave you a patch to fix this bug. Here it is again in proper patch form. Please can you test it and let us know whether it fixes the crash? Thanks.

From: Chris Ball <[email protected]>
Subject: [PATCH] mmc: core: sdio: Fix unconditional wake_up_process() on sdio thread

781e989cf59 ("mmc: sdhci: convert to new SDIO IRQ handling") and bf3b5ec66bd ("mmc: sdio_irq: rework sdio irq handling") disabled the use of our own custom threaded IRQ handler, but left in an unconditional wake_up_process() on that handler at resume-time.

[Patch suggested by Jaehoon Chung]
---
 drivers/mmc/core/sdio.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/core/sdio.c +2 -1
index e636d9e..2a128e2 100644
@@ -992,7 +992,8 @@ static int mmc_sdio_resume(struct mmc_host *host)
 		}
 	}
 
-	if (!err && host->sdio_irqs)
+	if (!err && host->sdio_irqs &&
+	    !(host->quirks & MMC_CAP2_SDIO_IRQ_NOTHREAD))
 		wake_up_process(host->sdio_irq_thread);
 	mmc_release_host(host);
 
#8 lore raw

Re: One bug of SDHCI driver

Quoted 4 lines · Zhonghui

Hi,

The data type of "host" is "struct mmc_host", and there is not "quirks" member in this structure.

Sorry for wrong typo.
You use the "host->caps2" instead of "host->quirks".

Best Regards,
Jaehoon Chung

Quoted 52 lines

Thanks,
Zhonghui

Quoted 31 lines · Chris Ball

Hi Zhonghui,

Quoted 3 lines · Zhonghui

Why add "mmc->caps2 |= MMC_CAP2_SDIO_IRQ_NOTHREAD;" ? How to fix this bug?

Could you please give out some idea about this bug?

Jaehoon already gave you a patch to fix this bug. Here it is again in proper patch form. Please can you test it and let us know whether it fixes the crash? Thanks.

From: Chris Ball <[email protected]>
Subject: [PATCH] mmc: core: sdio: Fix unconditional wake_up_process() on sdio thread

781e989cf59 ("mmc: sdhci: convert to new SDIO IRQ handling") and bf3b5ec66bd ("mmc: sdio_irq: rework sdio irq handling") disabled the use of our own custom threaded IRQ handler, but left in an unconditional wake_up_process() on that handler at resume-time.

[Patch suggested by Jaehoon Chung]
---
 drivers/mmc/core/sdio.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/core/sdio.c +0 -0
index e636d9e..2a128e2 100644

drivers/mmc/core/sdio.c static int mmc_sdio_resume(struct mmc_host *host) · line 999

Quoted 9 lines
drivers/mmc/core/sdio.c +2 -1
@@ -992,7 +992,8 @@ static int mmc_sdio_resume(struct mmc_host *host)
 		}
 	}
 
-	if (!err && host->sdio_irqs)
+	if (!err && host->sdio_irqs &&
+	    !(host->quirks & MMC_CAP2_SDIO_IRQ_NOTHREAD))
 		wake_up_process(host->sdio_irq_thread);
 	mmc_release_host(host);
 

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#9 lore raw

Re: One bug of SDHCI driver

From: Chris Ball <[email protected]>
Subject: [PATCH] mmc: core: sdio: Fix unconditional wake_up_process() on sdio thread

781e989cf59 ("mmc: sdhci: convert to new SDIO IRQ handling") and bf3b5ec66bd ("mmc: sdio_irq: rework sdio irq handling") disabled the use of our own custom threaded IRQ handler, but left in an unconditional wake_up_process() on that handler at resume-time.

[Patch suggested by Jaehoon Chung]
---
 drivers/mmc/core/sdio.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/core/sdio.c +2 -1
index e636d9e..11cc4e0 100644
@@ -992,7 +992,8 @@ static int mmc_sdio_resume(struct mmc_host *host)
 		}
 	}
 
-	if (!err && host->sdio_irqs)
+	if (!err && host->sdio_irqs &&
+			!(host->caps2 & MMC_CAP2_SDIO_IRQ_NOTHREAD))
 		wake_up_process(host->sdio_irq_thread);
 	mmc_release_host(host);
 
Signature · 1 line
1.7.9.5
Quoted 69 lines · Jaehoon Chung
Quoted 4 lines · Zhonghui

Hi,

The data type of "host" is "struct mmc_host", and there is not "quirks" member in this structure.

Sorry for wrong typo.
You use the "host->caps2" instead of "host->quirks".

Best Regards,
Jaehoon Chung

Quoted 40 lines

Thanks,
Zhonghui

Quoted 34 lines · Chris Ball

Hi Zhonghui,

Quoted 3 lines · Zhonghui

Why add "mmc->caps2 |= MMC_CAP2_SDIO_IRQ_NOTHREAD;" ? How to fix this bug?

Could you please give out some idea about this bug?

Jaehoon already gave you a patch to fix this bug. Here it is again in proper patch form. Please can you test it and let us know whether it fixes the crash? Thanks.

From: Chris Ball <[email protected]>
Subject: [PATCH] mmc: core: sdio: Fix unconditional wake_up_process() on sdio thread

781e989cf59 ("mmc: sdhci: convert to new SDIO IRQ handling") and bf3b5ec66bd ("mmc: sdio_irq: rework sdio irq handling") disabled the use of our own custom threaded IRQ handler, but left in an unconditional wake_up_process() on that handler at resume-time.

[Patch suggested by Jaehoon Chung]
---
 drivers/mmc/core/sdio.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/core/sdio.c +0 -0
index e636d9e..2a128e2 100644
@@ -992,7 +992,8 @@ static int mmc_sdio_resume(struct mmc_host *host)
 		}
 	}
 
Quoted 12 lines

drivers/mmc/core/sdio.c static int mmc_sdio_resume(struct mmc_host *host) · line 999

Quoted 6 lines
drivers/mmc/core/sdio.c +2 -1
-	if (!err && host->sdio_irqs)
+	if (!err && host->sdio_irqs &&
+	    !(host->quirks & MMC_CAP2_SDIO_IRQ_NOTHREAD))
 		wake_up_process(host->sdio_irq_thread);
 	mmc_release_host(host);
 

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#10 lore raw

Re: One bug of SDHCI driver

Hi,

Chris' patch is not enough to fix this bug. I made a patch as follows and verified it can work. Could you please give out some comments about this patch?

Thanks,
Zhonghui

Quoted 1 line

From 72d6f5b56fa04290fd3a055a3333de1d89e7c8d4 Mon Sep 17 00:00:00 2001

From: Fu Zhonghui <[email protected]>
Date: Sun, 20 Jul 2014 22:29:53 +0800
Subject: [PATCH] mmc: core: sdio: Fix unconditional wake_up_process() on sdio thread

781e989cf59 ("mmc: sdhci: convert to new SDIO IRQ handling") and bf3b5ec66bd ("mmc: sdio_irq: rework sdio irq handling") disabled the use of our own custom threaded IRQ handler, but left in an unconditional wake_up_process() on that handler at resume-time.

---
 drivers/mmc/core/sdio.c |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)
drivers/mmc/core/sdio.c +12 -2
index e636d9e..8369e56 100644
@@ -992,8 +992,18 @@ static int mmc_sdio_resume(struct mmc_host *host)
 		}
 	}
 
-	if (!err && host->sdio_irqs)
-		wake_up_process(host->sdio_irq_thread);
+	if (!err && host->sdio_irqs) {
+		if (!(host->caps2 & MMC_CAP2_SDIO_IRQ_NOTHREAD)) {
+			wake_up_process(host->sdio_irq_thread);
+		} else {
+			mmc_release_host(host);
+			mmc_host_clk_hold(host);
+			host->ops->enable_sdio_irq(host, 1);
+			mmc_host_clk_release(host);
+			mmc_claim_host(host);
+		}
+	}
+
 	mmc_release_host(host);
 
 	host->pm_flags &= ~MMC_PM_KEEP_POWER;

-- 1.7.1

Quoted 29 lines · Jaehoon Chung

From: Chris Ball <[email protected]>
Subject: [PATCH] mmc: core: sdio: Fix unconditional wake_up_process() on sdio thread

781e989cf59 ("mmc: sdhci: convert to new SDIO IRQ handling") and bf3b5ec66bd ("mmc: sdio_irq: rework sdio irq handling") disabled the use of our own custom threaded IRQ handler, but left in an unconditional wake_up_process() on that handler at resume-time.

[Patch suggested by Jaehoon Chung]
---
 drivers/mmc/core/sdio.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/core/sdio.c +2 -1
index e636d9e..11cc4e0 100644
@@ -992,7 +992,8 @@ static int mmc_sdio_resume(struct mmc_host *host)
 		}
 	}
 
-	if (!err && host->sdio_irqs)
+	if (!err && host->sdio_irqs &&
+			!(host->caps2 & MMC_CAP2_SDIO_IRQ_NOTHREAD))
 		wake_up_process(host->sdio_irq_thread);
 	mmc_release_host(host);
 
#11 lore raw

Re: One bug of SDHCI driver

Hi,

Any comments for this new patch?

Thanks,
Zhonghui

Quoted 87 lines · Zhonghui

Hi,

Chris' patch is not enough to fix this bug. I made a patch as follows and verified it can work. Could you please give out some comments about this patch?

Thanks,
Zhonghui

From 72d6f5b56fa04290fd3a055a3333de1d89e7c8d4 Mon Sep 17 00:00:00 2001
From: Fu Zhonghui <[email protected]>
Date: Sun, 20 Jul 2014 22:29:53 +0800
Subject: [PATCH] mmc: core: sdio: Fix unconditional wake_up_process() on sdio thread

781e989cf59 ("mmc: sdhci: convert to new SDIO IRQ handling") and bf3b5ec66bd ("mmc: sdio_irq: rework sdio irq handling") disabled the use of our own custom threaded IRQ handler, but left in an unconditional wake_up_process() on that handler at resume-time.

---
 drivers/mmc/core/sdio.c |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)
drivers/mmc/core/sdio.c +12 -3
index e636d9e..8369e56 100644
@@ -992,8 +992,18 @@ static int mmc_sdio_resume(struct mmc_host *host)
 		}
 	}
 
-	if (!err && host->sdio_irqs)
-		wake_up_process(host->sdio_irq_thread);
+	if (!err && host->sdio_irqs) {
+		if (!(host->caps2 & MMC_CAP2_SDIO_IRQ_NOTHREAD)) {
+			wake_up_process(host->sdio_irq_thread);
+		} else {
+			mmc_release_host(host);
+			mmc_host_clk_hold(host);
+			host->ops->enable_sdio_irq(host, 1);
+			mmc_host_clk_release(host);
+			mmc_claim_host(host);
+		}
+	}
+
 	mmc_release_host(host);
 
 	host->pm_flags &= ~MMC_PM_KEEP_POWER;
-- 1.7.1
Quoted 20 lines · Jaehoon Chung

From: Chris Ball <[email protected]>
Subject: [PATCH] mmc: core: sdio: Fix unconditional wake_up_process() on sdio thread

781e989cf59 ("mmc: sdhci: convert to new SDIO IRQ handling") and bf3b5ec66bd ("mmc: sdio_irq: rework sdio irq handling") disabled the use of our own custom threaded IRQ handler, but left in an unconditional wake_up_process() on that handler at resume-time.

[Patch suggested by Jaehoon Chung]
---
 drivers/mmc/core/sdio.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/core/sdio.c +0 -0
index e636d9e..11cc4e0 100644

drivers/mmc/core/sdio.c static int mmc_sdio_resume(struct mmc_host *host) · line 999

Quoted 9 lines
drivers/mmc/core/sdio.c +2 -1
@@ -992,7 +992,8 @@ static int mmc_sdio_resume(struct mmc_host *host)
 		}
 	}
 
-	if (!err && host->sdio_irqs)
+	if (!err && host->sdio_irqs &&
+			!(host->caps2 & MMC_CAP2_SDIO_IRQ_NOTHREAD))
 		wake_up_process(host->sdio_irq_thread);
 	mmc_release_host(host);
 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

A message that is not in the archive (sent off-list or not yet received): [email protected]

#13 lore raw

Re: One bug of SDHCI driver

Hi, Zhonghui.

Quoted 51 lines · Zhonghui

Hi,

In the resume function, SDIO irq must be enabled, or the interrupts from devices on SDIO bus can't be acknowledged. I also uploaded this new patch to https://bugzilla.kernel.org/show_bug.cgi?id=80151.
Could you please help to review it?

Thanks,
Zhonghui

Quoted 38 lines · Zhonghui

Hi,

Any comments for this new patch?

Thanks,
Zhonghui

Quoted 31 lines · Zhonghui

Hi,

Chris' patch is not enough to fix this bug. I made a patch as follows and verified it can work. Could you please give out some comments about this patch?

Thanks,
Zhonghui

Quoted 1 line

From 72d6f5b56fa04290fd3a055a3333de1d89e7c8d4 Mon Sep 17 00:00:00 2001

From: Fu Zhonghui <[email protected]>
Date: Sun, 20 Jul 2014 22:29:53 +0800
Subject: [PATCH] mmc: core: sdio: Fix unconditional wake_up_process() on sdio thread

781e989cf59 ("mmc: sdhci: convert to new SDIO IRQ handling") and bf3b5ec66bd ("mmc: sdio_irq: rework sdio irq handling") disabled the use of our own custom threaded IRQ handler, but left in an unconditional wake_up_process() on that handler at resume-time.

---
 drivers/mmc/core/sdio.c |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)
drivers/mmc/core/sdio.c +0 -0
index e636d9e..8369e56 100644
@@ -992,8 +992,18 @@ static int mmc_sdio_resume(struct mmc_host *host)
 		}
 	}
 
Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
drivers/mmc/core/sdio.c +3 -2
-	if (!err && host->sdio_irqs)
-		wake_up_process(host->sdio_irq_thread);
+	if (!err && host->sdio_irqs) {
+		if (!(host->caps2 & MMC_CAP2_SDIO_IRQ_NOTHREAD)) {
+			wake_up_process(host->sdio_irq_thread);
Quoted 8 lines

drivers/mmc/core/sdio.c static int mmc_sdio_resume(struct mmc_host *host) · line 1005

Quoted 8 lines
drivers/mmc/core/sdio.c +8 -0
+		} else {
+			mmc_release_host(host);
+			mmc_host_clk_hold(host);
+			host->ops->enable_sdio_irq(host, 1);
+			mmc_host_clk_release(host);
+			mmc_claim_host(host);
+		}
+	}

If you enable the sdio_irq, I think it needs to check whether MMC_CAP_SDIO_IRQ is set or not.

Best Regards,
Jaehoon Chung

Quoted 49 lines
Quoted 48 lines
Quoted 32 lines
drivers/mmc/core/sdio.c +1 -1
+
 	mmc_release_host(host);
 
 	host->pm_flags &= ~MMC_PM_KEEP_POWER;
-- 1.7.1
Quoted 23 lines · Jaehoon Chung

From: Chris Ball <[email protected]>
Subject: [PATCH] mmc: core: sdio: Fix unconditional wake_up_process() on sdio thread

781e989cf59 ("mmc: sdhci: convert to new SDIO IRQ handling") and bf3b5ec66bd ("mmc: sdio_irq: rework sdio irq handling") disabled the use of our own custom threaded IRQ handler, but left in an unconditional wake_up_process() on that handler at resume-time.

[Patch suggested by Jaehoon Chung]
---
 drivers/mmc/core/sdio.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/core/sdio.c +0 -0
index e636d9e..11cc4e0 100644
@@ -992,7 +992,8 @@ static int mmc_sdio_resume(struct mmc_host *host)
 		}
 	}
 
Quoted 11 lines

drivers/mmc/core/sdio.c static int mmc_sdio_resume(struct mmc_host *host) · line 1008

Quoted 6 lines
drivers/mmc/core/sdio.c +2 -1
-	if (!err && host->sdio_irqs)
+	if (!err && host->sdio_irqs &&
+			!(host->caps2 & MMC_CAP2_SDIO_IRQ_NOTHREAD))
 		wake_up_process(host->sdio_irq_thread);
 	mmc_release_host(host);
 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#14 lore raw

Re: One bug of SDHCI driver

Hi, Jaehoon

According to your comments, I created a new patch for this issue as follows:

Thanks,
Zhonghui

Quoted 1 line

From 6cee984e1d76ba0a3320430f8cf4318ab65fcf06 Mon Sep 17 00:00:00 2001

From: Fu Zhonghui <[email protected]>
Date: Tue, 5 Aug 2014 12:44:38 +0800
Subject: [PATCH] mmc: core: sdio: Fix unconditional wake_up_process() on sdio thread

781e989cf59 ("mmc: sdhci: convert to new SDIO IRQ handling") and bf3b5ec66bd ("mmc: sdio_irq: rework sdio irq handling") disabled the use of our own custom threaded IRQ handler, but left in an unconditional wake_up_process() on that handler at resume-time.

In addition, the check for MMC_CAP_SDIO_IRQ capability is added before enable sdio IRQ.

---
 drivers/mmc/core/sdio.c     |   14 ++++++++++++--
 drivers/mmc/core/sdio_irq.c |    4 ++--
 2 files changed, 14 insertions(+), 4 deletions(-)
drivers/mmc/core/sdio.c +12 -2
index e636d9e..e04a540 100644
@@ -992,8 +992,18 @@ static int mmc_sdio_resume(struct mmc_host *host)
 		}
 	}
 
-	if (!err && host->sdio_irqs)
-		wake_up_process(host->sdio_irq_thread);
+	if (!err && host->sdio_irqs) {
+		if (!(host->caps2 & MMC_CAP2_SDIO_IRQ_NOTHREAD)) {
+			wake_up_process(host->sdio_irq_thread);
+		} else if (host->caps & MMC_CAP_SDIO_IRQ) {
+			mmc_release_host(host);
+			mmc_host_clk_hold(host);
+			host->ops->enable_sdio_irq(host, 1);
+			mmc_host_clk_release(host);
+			mmc_claim_host(host);
+		}
+	}
+
 	mmc_release_host(host);
 
 	host->pm_flags &= ~MMC_PM_KEEP_POWER;
drivers/mmc/core/sdio_irq.c +2 -2
index 5cc13c8..696eca4 100644
@@ -208,7 +208,7 @@ static int sdio_card_irq_get(struct mmc_card *card)
 				host->sdio_irqs--;
 				return err;
 			}
-		} else {
+		} else if (host->caps & MMC_CAP_SDIO_IRQ) {
 			mmc_host_clk_hold(host);
 			host->ops->enable_sdio_irq(host, 1);
 			mmc_host_clk_release(host);
@@ -229,7 +229,7 @@ static int sdio_card_irq_put(struct mmc_card *card)
 		if (!(host->caps2 & MMC_CAP2_SDIO_IRQ_NOTHREAD)) {
 			atomic_set(&host->sdio_irq_thread_abort, 1);
 			kthread_stop(host->sdio_irq_thread);
-		} else {
+		} else if (host->caps & MMC_CAP_SDIO_IRQ) {
 			mmc_host_clk_hold(host);
 			host->ops->enable_sdio_irq(host, 0);
 			mmc_host_clk_release(host);

-- 1.7.1

Quoted 119 lines · Jaehoon Chung

Hi, Zhonghui.

Quoted 50 lines · Zhonghui

Hi,

In the resume function, SDIO irq must be enabled, or the interrupts from devices on SDIO bus can't be acknowledged. I also uploaded this new patch to https://bugzilla.kernel.org/show_bug.cgi?id=80151.
Could you please help to review it?

Thanks,
Zhonghui

Quoted 38 lines · Zhonghui

Hi,

Any comments for this new patch?

Thanks,
Zhonghui

Quoted 31 lines · Zhonghui

Hi,

Chris' patch is not enough to fix this bug. I made a patch as follows and verified it can work. Could you please give out some comments about this patch?

Thanks,
Zhonghui

Quoted 1 line

From 72d6f5b56fa04290fd3a055a3333de1d89e7c8d4 Mon Sep 17 00:00:00 2001

From: Fu Zhonghui <[email protected]>
Date: Sun, 20 Jul 2014 22:29:53 +0800
Subject: [PATCH] mmc: core: sdio: Fix unconditional wake_up_process() on sdio thread

781e989cf59 ("mmc: sdhci: convert to new SDIO IRQ handling") and bf3b5ec66bd ("mmc: sdio_irq: rework sdio irq handling") disabled the use of our own custom threaded IRQ handler, but left in an unconditional wake_up_process() on that handler at resume-time.

---
 drivers/mmc/core/sdio.c |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)
drivers/mmc/core/sdio.c +0 -0
index e636d9e..8369e56 100644
@@ -992,8 +992,18 @@ static int mmc_sdio_resume(struct mmc_host *host)
 		}
 	}
 
Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
drivers/mmc/core/sdio.c +3 -2
-	if (!err && host->sdio_irqs)
-		wake_up_process(host->sdio_irq_thread);
+	if (!err && host->sdio_irqs) {
+		if (!(host->caps2 & MMC_CAP2_SDIO_IRQ_NOTHREAD)) {
+			wake_up_process(host->sdio_irq_thread);
Quoted 8 lines

drivers/mmc/core/sdio.c static int mmc_sdio_resume(struct mmc_host *host) · line 1005

Quoted 8 lines
drivers/mmc/core/sdio.c +8 -0
+		} else {
+			mmc_release_host(host);
+			mmc_host_clk_hold(host);
+			host->ops->enable_sdio_irq(host, 1);
+			mmc_host_clk_release(host);
+			mmc_claim_host(host);
+		}
+	}

If you enable the sdio_irq, I think it needs to check whether MMC_CAP_SDIO_IRQ is set or not.

Best Regards,
Jaehoon Chung

Quoted 48 lines
Quoted 48 lines
Quoted 32 lines
drivers/mmc/core/sdio.c +1 -1
+
 	mmc_release_host(host);
 
 	host->pm_flags &= ~MMC_PM_KEEP_POWER;
-- 1.7.1
Quoted 23 lines · Jaehoon Chung

From: Chris Ball <[email protected]>
Subject: [PATCH] mmc: core: sdio: Fix unconditional wake_up_process() on sdio thread

781e989cf59 ("mmc: sdhci: convert to new SDIO IRQ handling") and bf3b5ec66bd ("mmc: sdio_irq: rework sdio irq handling") disabled the use of our own custom threaded IRQ handler, but left in an unconditional wake_up_process() on that handler at resume-time.

[Patch suggested by Jaehoon Chung]
---
 drivers/mmc/core/sdio.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/core/sdio.c +0 -0
index e636d9e..11cc4e0 100644
@@ -992,7 +992,8 @@ static int mmc_sdio_resume(struct mmc_host *host)
 		}
 	}
 
Quoted 11 lines

drivers/mmc/core/sdio.c static int mmc_sdio_resume(struct mmc_host *host) · line 999

Quoted 6 lines
drivers/mmc/core/sdio.c +2 -1
-	if (!err && host->sdio_irqs)
+	if (!err && host->sdio_irqs &&
+			!(host->caps2 & MMC_CAP2_SDIO_IRQ_NOTHREAD))
 		wake_up_process(host->sdio_irq_thread);
 	mmc_release_host(host);
 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#15 lore raw

Re: One bug of SDHCI driver

kindly reminder.

Thanks,
Zhonghui

Quoted 205 lines · Zhonghui

Hi, Jaehoon

According to your comments, I created a new patch for this issue as follows:

Thanks,
Zhonghui

From 6cee984e1d76ba0a3320430f8cf4318ab65fcf06 Mon Sep 17 00:00:00 2001
From: Fu Zhonghui <[email protected]>
Date: Tue, 5 Aug 2014 12:44:38 +0800
Subject: [PATCH] mmc: core: sdio: Fix unconditional wake_up_process() on sdio thread

781e989cf59 ("mmc: sdhci: convert to new SDIO IRQ handling") and bf3b5ec66bd ("mmc: sdio_irq: rework sdio irq handling") disabled the use of our own custom threaded IRQ handler, but left in an unconditional wake_up_process() on that handler at resume-time.

In addition, the check for MMC_CAP_SDIO_IRQ capability is added before enable sdio IRQ.

---
 drivers/mmc/core/sdio.c     |   14 ++++++++++++--
 drivers/mmc/core/sdio_irq.c |    4 ++--
 2 files changed, 14 insertions(+), 4 deletions(-)
drivers/mmc/core/sdio.c +12 -2
index e636d9e..e04a540 100644
@@ -992,8 +992,18 @@ static int mmc_sdio_resume(struct mmc_host *host)
 		}
 	}
 
-	if (!err && host->sdio_irqs)
-		wake_up_process(host->sdio_irq_thread);
+	if (!err && host->sdio_irqs) {
+		if (!(host->caps2 & MMC_CAP2_SDIO_IRQ_NOTHREAD)) {
+			wake_up_process(host->sdio_irq_thread);
+		} else if (host->caps & MMC_CAP_SDIO_IRQ) {
+			mmc_release_host(host);
+			mmc_host_clk_hold(host);
+			host->ops->enable_sdio_irq(host, 1);
+			mmc_host_clk_release(host);
+			mmc_claim_host(host);
+		}
+	}
+
 	mmc_release_host(host);
 
 	host->pm_flags &= ~MMC_PM_KEEP_POWER;
drivers/mmc/core/sdio_irq.c +2 -3
index 5cc13c8..696eca4 100644
@@ -208,7 +208,7 @@ static int sdio_card_irq_get(struct mmc_card *card)
 				host->sdio_irqs--;
 				return err;
 			}
-		} else {
+		} else if (host->caps & MMC_CAP_SDIO_IRQ) {
 			mmc_host_clk_hold(host);
 			host->ops->enable_sdio_irq(host, 1);
 			mmc_host_clk_release(host);
@@ -229,7 +229,7 @@ static int sdio_card_irq_put(struct mmc_card *card)
 		if (!(host->caps2 & MMC_CAP2_SDIO_IRQ_NOTHREAD)) {
 			atomic_set(&host->sdio_irq_thread_abort, 1);
 			kthread_stop(host->sdio_irq_thread);
-		} else {
+		} else if (host->caps & MMC_CAP_SDIO_IRQ) {
 			mmc_host_clk_hold(host);
 			host->ops->enable_sdio_irq(host, 0);
 			mmc_host_clk_release(host);
-- 1.7.1
Quoted 119 lines · Jaehoon Chung

Hi, Zhonghui.

Quoted 50 lines · Zhonghui

Hi,

In the resume function, SDIO irq must be enabled, or the interrupts from devices on SDIO bus can't be acknowledged. I also uploaded this new patch to https://bugzilla.kernel.org/show_bug.cgi?id=80151.
Could you please help to review it?

Thanks,
Zhonghui

Quoted 38 lines · Zhonghui

Hi,

Any comments for this new patch?

Thanks,
Zhonghui

Quoted 31 lines · Zhonghui

Hi,

Chris' patch is not enough to fix this bug. I made a patch as follows and verified it can work. Could you please give out some comments about this patch?

Thanks,
Zhonghui

Quoted 1 line

From 72d6f5b56fa04290fd3a055a3333de1d89e7c8d4 Mon Sep 17 00:00:00 2001

From: Fu Zhonghui <[email protected]>
Date: Sun, 20 Jul 2014 22:29:53 +0800
Subject: [PATCH] mmc: core: sdio: Fix unconditional wake_up_process() on sdio thread

781e989cf59 ("mmc: sdhci: convert to new SDIO IRQ handling") and bf3b5ec66bd ("mmc: sdio_irq: rework sdio irq handling") disabled the use of our own custom threaded IRQ handler, but left in an unconditional wake_up_process() on that handler at resume-time.

---
 drivers/mmc/core/sdio.c |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)
drivers/mmc/core/sdio.c +0 -0
index e636d9e..8369e56 100644
@@ -992,8 +992,18 @@ static int mmc_sdio_resume(struct mmc_host *host)
 		}
 	}
 
Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
drivers/mmc/core/sdio.c +3 -2
-	if (!err && host->sdio_irqs)
-		wake_up_process(host->sdio_irq_thread);
+	if (!err && host->sdio_irqs) {
+		if (!(host->caps2 & MMC_CAP2_SDIO_IRQ_NOTHREAD)) {
+			wake_up_process(host->sdio_irq_thread);
Quoted 8 lines

drivers/mmc/core/sdio.c static int mmc_sdio_resume(struct mmc_host *host) · line 1005

Quoted 8 lines
drivers/mmc/core/sdio.c +8 -0
+		} else {
+			mmc_release_host(host);
+			mmc_host_clk_hold(host);
+			host->ops->enable_sdio_irq(host, 1);
+			mmc_host_clk_release(host);
+			mmc_claim_host(host);
+		}
+	}

If you enable the sdio_irq, I think it needs to check whether MMC_CAP_SDIO_IRQ is set or not.

Best Regards,
Jaehoon Chung

Quoted 48 lines
Quoted 48 lines
Quoted 32 lines
drivers/mmc/core/sdio.c +1 -1
+
 	mmc_release_host(host);
 
 	host->pm_flags &= ~MMC_PM_KEEP_POWER;
-- 1.7.1
Quoted 23 lines · Jaehoon Chung

From: Chris Ball <[email protected]>
Subject: [PATCH] mmc: core: sdio: Fix unconditional wake_up_process() on sdio thread

781e989cf59 ("mmc: sdhci: convert to new SDIO IRQ handling") and bf3b5ec66bd ("mmc: sdio_irq: rework sdio irq handling") disabled the use of our own custom threaded IRQ handler, but left in an unconditional wake_up_process() on that handler at resume-time.

[Patch suggested by Jaehoon Chung]
---
 drivers/mmc/core/sdio.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/core/sdio.c +0 -0
index e636d9e..11cc4e0 100644
@@ -992,7 +992,8 @@ static int mmc_sdio_resume(struct mmc_host *host)
 		}
 	}
 
Quoted 11 lines

drivers/mmc/core/sdio.c static int mmc_sdio_resume(struct mmc_host *host) · line 1008

Quoted 6 lines
drivers/mmc/core/sdio.c +2 -1
-	if (!err && host->sdio_irqs)
+	if (!err && host->sdio_irqs &&
+			!(host->caps2 & MMC_CAP2_SDIO_IRQ_NOTHREAD))
 		wake_up_process(host->sdio_irq_thread);
 	mmc_release_host(host);
 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#16 lore raw

Re: One bug of SDHCI driver

Hi, everyone

I have posted this new patch in a separate mail. Many thanks for your comments.

Thanks,
Zhonghui

Quoted 211 lines · Zhonghui

kindly reminder.

Thanks,
Zhonghui

Quoted 205 lines · Zhonghui

Hi, Jaehoon

According to your comments, I created a new patch for this issue as follows:

Thanks,
Zhonghui

From 6cee984e1d76ba0a3320430f8cf4318ab65fcf06 Mon Sep 17 00:00:00 2001
From: Fu Zhonghui <[email protected]>
Date: Tue, 5 Aug 2014 12:44:38 +0800
Subject: [PATCH] mmc: core: sdio: Fix unconditional wake_up_process() on sdio thread

781e989cf59 ("mmc: sdhci: convert to new SDIO IRQ handling") and bf3b5ec66bd ("mmc: sdio_irq: rework sdio irq handling") disabled the use of our own custom threaded IRQ handler, but left in an unconditional wake_up_process() on that handler at resume-time.

In addition, the check for MMC_CAP_SDIO_IRQ capability is added before enable sdio IRQ.

---
 drivers/mmc/core/sdio.c     |   14 ++++++++++++--
 drivers/mmc/core/sdio_irq.c |    4 ++--
 2 files changed, 14 insertions(+), 4 deletions(-)
drivers/mmc/core/sdio.c +12 -2
index e636d9e..e04a540 100644
@@ -992,8 +992,18 @@ static int mmc_sdio_resume(struct mmc_host *host)
 		}
 	}
 
-	if (!err && host->sdio_irqs)
-		wake_up_process(host->sdio_irq_thread);
+	if (!err && host->sdio_irqs) {
+		if (!(host->caps2 & MMC_CAP2_SDIO_IRQ_NOTHREAD)) {
+			wake_up_process(host->sdio_irq_thread);
+		} else if (host->caps & MMC_CAP_SDIO_IRQ) {
+			mmc_release_host(host);
+			mmc_host_clk_hold(host);
+			host->ops->enable_sdio_irq(host, 1);
+			mmc_host_clk_release(host);
+			mmc_claim_host(host);
+		}
+	}
+
 	mmc_release_host(host);
 
 	host->pm_flags &= ~MMC_PM_KEEP_POWER;
drivers/mmc/core/sdio_irq.c +2 -3
index 5cc13c8..696eca4 100644
@@ -208,7 +208,7 @@ static int sdio_card_irq_get(struct mmc_card *card)
 				host->sdio_irqs--;
 				return err;
 			}
-		} else {
+		} else if (host->caps & MMC_CAP_SDIO_IRQ) {
 			mmc_host_clk_hold(host);
 			host->ops->enable_sdio_irq(host, 1);
 			mmc_host_clk_release(host);
@@ -229,7 +229,7 @@ static int sdio_card_irq_put(struct mmc_card *card)
 		if (!(host->caps2 & MMC_CAP2_SDIO_IRQ_NOTHREAD)) {
 			atomic_set(&host->sdio_irq_thread_abort, 1);
 			kthread_stop(host->sdio_irq_thread);
-		} else {
+		} else if (host->caps & MMC_CAP_SDIO_IRQ) {
 			mmc_host_clk_hold(host);
 			host->ops->enable_sdio_irq(host, 0);
 			mmc_host_clk_release(host);
-- 1.7.1
Quoted 119 lines · Jaehoon Chung

Hi, Zhonghui.

Quoted 50 lines · Zhonghui

Hi,

In the resume function, SDIO irq must be enabled, or the interrupts from devices on SDIO bus can't be acknowledged. I also uploaded this new patch to https://bugzilla.kernel.org/show_bug.cgi?id=80151.
Could you please help to review it?

Thanks,
Zhonghui

Quoted 38 lines · Zhonghui

Hi,

Any comments for this new patch?

Thanks,
Zhonghui

Quoted 31 lines · Zhonghui

Hi,

Chris' patch is not enough to fix this bug. I made a patch as follows and verified it can work. Could you please give out some comments about this patch?

Thanks,
Zhonghui

Quoted 1 line

From 72d6f5b56fa04290fd3a055a3333de1d89e7c8d4 Mon Sep 17 00:00:00 2001

From: Fu Zhonghui <[email protected]>
Date: Sun, 20 Jul 2014 22:29:53 +0800
Subject: [PATCH] mmc: core: sdio: Fix unconditional wake_up_process() on sdio thread

781e989cf59 ("mmc: sdhci: convert to new SDIO IRQ handling") and bf3b5ec66bd ("mmc: sdio_irq: rework sdio irq handling") disabled the use of our own custom threaded IRQ handler, but left in an unconditional wake_up_process() on that handler at resume-time.

---
 drivers/mmc/core/sdio.c |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)
drivers/mmc/core/sdio.c +0 -0
index e636d9e..8369e56 100644
@@ -992,8 +992,18 @@ static int mmc_sdio_resume(struct mmc_host *host)
 		}
 	}
 
Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
drivers/mmc/core/sdio.c +3 -2
-	if (!err && host->sdio_irqs)
-		wake_up_process(host->sdio_irq_thread);
+	if (!err && host->sdio_irqs) {
+		if (!(host->caps2 & MMC_CAP2_SDIO_IRQ_NOTHREAD)) {
+			wake_up_process(host->sdio_irq_thread);
Quoted 8 lines

drivers/mmc/core/sdio.c static int mmc_sdio_resume(struct mmc_host *host) · line 1005

Quoted 8 lines
drivers/mmc/core/sdio.c +8 -0
+		} else {
+			mmc_release_host(host);
+			mmc_host_clk_hold(host);
+			host->ops->enable_sdio_irq(host, 1);
+			mmc_host_clk_release(host);
+			mmc_claim_host(host);
+		}
+	}

If you enable the sdio_irq, I think it needs to check whether MMC_CAP_SDIO_IRQ is set or not.

Best Regards,
Jaehoon Chung

Quoted 48 lines
Quoted 48 lines
Quoted 32 lines
drivers/mmc/core/sdio.c +1 -1
+
 	mmc_release_host(host);
 
 	host->pm_flags &= ~MMC_PM_KEEP_POWER;
-- 1.7.1
Quoted 23 lines · Jaehoon Chung

From: Chris Ball <[email protected]>
Subject: [PATCH] mmc: core: sdio: Fix unconditional wake_up_process() on sdio thread

781e989cf59 ("mmc: sdhci: convert to new SDIO IRQ handling") and bf3b5ec66bd ("mmc: sdio_irq: rework sdio irq handling") disabled the use of our own custom threaded IRQ handler, but left in an unconditional wake_up_process() on that handler at resume-time.

[Patch suggested by Jaehoon Chung]
---
 drivers/mmc/core/sdio.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/core/sdio.c +0 -0
index e636d9e..11cc4e0 100644
@@ -992,7 +992,8 @@ static int mmc_sdio_resume(struct mmc_host *host)
 		}
 	}
 
Quoted 11 lines

drivers/mmc/core/sdio.c static int mmc_sdio_resume(struct mmc_host *host) · line 1008

Quoted 6 lines
drivers/mmc/core/sdio.c +2 -1
-	if (!err && host->sdio_irqs)
+	if (!err && host->sdio_irqs &&
+			!(host->caps2 & MMC_CAP2_SDIO_IRQ_NOTHREAD))
 		wake_up_process(host->sdio_irq_thread);
 	mmc_release_host(host);
 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/