mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-23 23:46:16 +02:00
this commit break the ks7010 driver.
for more information please read "SDIO single IRQ optimization breaks libertas" linux-mmc mailing list we should fix this in ks7010 driver. commit this revert first. fix later
This commit is contained in:
parent
90f7279151
commit
8fa1337cb9
@ -0,0 +1,98 @@
|
||||
From 81734e6cd3cd75be1608717e9cd0a6cac54af528 Mon Sep 17 00:00:00 2001
|
||||
From: Xiangfu Liu <xiangfu@sharism.cc>
|
||||
Date: Thu, 17 Nov 2011 14:41:20 +0800
|
||||
Subject: [PATCH] Revert "mmc: sdio: optimized SDIO IRQ handling for single irq"
|
||||
|
||||
This reverts commit 06e8935febe687e2a561707d4c7ca4245d261dbe.
|
||||
---
|
||||
drivers/mmc/core/sdio_irq.c | 33 +--------------------------------
|
||||
include/linux/mmc/card.h | 1 -
|
||||
2 files changed, 1 insertions(+), 33 deletions(-)
|
||||
|
||||
diff --git a/drivers/mmc/core/sdio_irq.c b/drivers/mmc/core/sdio_irq.c
|
||||
index 03ead02..b300161 100644
|
||||
--- a/drivers/mmc/core/sdio_irq.c
|
||||
+++ b/drivers/mmc/core/sdio_irq.c
|
||||
@@ -31,17 +31,6 @@ static int process_sdio_pending_irqs(struct mmc_card *card)
|
||||
{
|
||||
int i, ret, count;
|
||||
unsigned char pending;
|
||||
- struct sdio_func *func;
|
||||
-
|
||||
- /*
|
||||
- * Optimization, if there is only 1 function interrupt registered
|
||||
- * call irq handler directly
|
||||
- */
|
||||
- func = card->sdio_single_irq;
|
||||
- if (func) {
|
||||
- func->irq_handler(func);
|
||||
- return 1;
|
||||
- }
|
||||
|
||||
ret = mmc_io_rw_direct(card, 0, 0, SDIO_CCCR_INTx, 0, &pending);
|
||||
if (ret) {
|
||||
@@ -53,7 +42,7 @@ static int process_sdio_pending_irqs(struct mmc_card *card)
|
||||
count = 0;
|
||||
for (i = 1; i <= 7; i++) {
|
||||
if (pending & (1 << i)) {
|
||||
- func = card->sdio_func[i - 1];
|
||||
+ struct sdio_func *func = card->sdio_func[i - 1];
|
||||
if (!func) {
|
||||
printk(KERN_WARNING "%s: pending IRQ for "
|
||||
"non-existent function\n",
|
||||
@@ -197,24 +186,6 @@ static int sdio_card_irq_put(struct mmc_card *card)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-/* If there is only 1 function registered set sdio_single_irq */
|
||||
-static void sdio_single_irq_set(struct mmc_card *card)
|
||||
-{
|
||||
- struct sdio_func *func;
|
||||
- int i;
|
||||
-
|
||||
- card->sdio_single_irq = NULL;
|
||||
- if ((card->host->caps & MMC_CAP_SDIO_IRQ) &&
|
||||
- card->host->sdio_irqs == 1)
|
||||
- for (i = 0; i < card->sdio_funcs; i++) {
|
||||
- func = card->sdio_func[i];
|
||||
- if (func && func->irq_handler) {
|
||||
- card->sdio_single_irq = func;
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
-}
|
||||
-
|
||||
/**
|
||||
* sdio_claim_irq - claim the IRQ for a SDIO function
|
||||
* @func: SDIO function
|
||||
@@ -256,7 +227,6 @@ int sdio_claim_irq(struct sdio_func *func, sdio_irq_handler_t *handler)
|
||||
ret = sdio_card_irq_get(func->card);
|
||||
if (ret)
|
||||
func->irq_handler = NULL;
|
||||
- sdio_single_irq_set(func->card);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -281,7 +251,6 @@ int sdio_release_irq(struct sdio_func *func)
|
||||
if (func->irq_handler) {
|
||||
func->irq_handler = NULL;
|
||||
sdio_card_irq_put(func->card);
|
||||
- sdio_single_irq_set(func->card);
|
||||
}
|
||||
|
||||
ret = mmc_io_rw_direct(func->card, 0, 0, SDIO_CCCR_IENx, 0, ®);
|
||||
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
|
||||
index 6ad4355..5fa4f05 100644
|
||||
--- a/include/linux/mmc/card.h
|
||||
+++ b/include/linux/mmc/card.h
|
||||
@@ -208,7 +208,6 @@ struct mmc_card {
|
||||
struct sdio_cccr cccr; /* common card info */
|
||||
struct sdio_cis cis; /* common tuple info */
|
||||
struct sdio_func *sdio_func[SDIO_MAX_FUNCS]; /* SDIO functions (devices) */
|
||||
- struct sdio_func *sdio_single_irq; /* SDIO function when only one IRQ active */
|
||||
unsigned num_info; /* number of info strings */
|
||||
const char **info; /* info strings */
|
||||
struct sdio_func_tuple *tuples; /* unknown common tuples */
|
||||
--
|
||||
1.7.4.1
|
||||
|
Loading…
Reference in New Issue
Block a user