Date:2011-11-17 08:08:48 (12 years 4 months ago)
Author:Xiangfu Liu
Commit:8fa1337cb972e5486141340da2ea2e066b497877
Message: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
Files: target/linux/xburst/patches-3.0/0034-Revert-mmc-sdio-optimized-SDIO-IRQ-handling-for-sing.patch (1 diff)

Change Details

target/linux/xburst/patches-3.0/0034-Revert-mmc-sdio-optimized-SDIO-IRQ-handling-for-sing.patch
1From 81734e6cd3cd75be1608717e9cd0a6cac54af528 Mon Sep 17 00:00:00 2001
2From: Xiangfu Liu <xiangfu@sharism.cc>
3Date: Thu, 17 Nov 2011 14:41:20 +0800
4Subject: [PATCH] Revert "mmc: sdio: optimized SDIO IRQ handling for single irq"
5
6This reverts commit 06e8935febe687e2a561707d4c7ca4245d261dbe.
7---
8 drivers/mmc/core/sdio_irq.c | 33 +--------------------------------
9 include/linux/mmc/card.h | 1 -
10 2 files changed, 1 insertions(+), 33 deletions(-)
11
12diff --git a/drivers/mmc/core/sdio_irq.c b/drivers/mmc/core/sdio_irq.c
13index 03ead02..b300161 100644
14--- a/drivers/mmc/core/sdio_irq.c
15@@ -31,17 +31,6 @@ static int process_sdio_pending_irqs(struct mmc_card *card)
16 {
17     int i, ret, count;
18     unsigned char pending;
19- struct sdio_func *func;
20-
21- /*
22- * Optimization, if there is only 1 function interrupt registered
23- * call irq handler directly
24- */
25- func = card->sdio_single_irq;
26- if (func) {
27- func->irq_handler(func);
28- return 1;
29- }
30
31     ret = mmc_io_rw_direct(card, 0, 0, SDIO_CCCR_INTx, 0, &pending);
32     if (ret) {
33@@ -53,7 +42,7 @@ static int process_sdio_pending_irqs(struct mmc_card *card)
34     count = 0;
35     for (i = 1; i <= 7; i++) {
36         if (pending & (1 << i)) {
37- func = card->sdio_func[i - 1];
38+ struct sdio_func *func = card->sdio_func[i - 1];
39             if (!func) {
40                 printk(KERN_WARNING "%s: pending IRQ for "
41                     "non-existent function\n",
42@@ -197,24 +186,6 @@ static int sdio_card_irq_put(struct mmc_card *card)
43     return 0;
44 }
45
46-/* If there is only 1 function registered set sdio_single_irq */
47-static void sdio_single_irq_set(struct mmc_card *card)
48-{
49- struct sdio_func *func;
50- int i;
51-
52- card->sdio_single_irq = NULL;
53- if ((card->host->caps & MMC_CAP_SDIO_IRQ) &&
54- card->host->sdio_irqs == 1)
55- for (i = 0; i < card->sdio_funcs; i++) {
56- func = card->sdio_func[i];
57- if (func && func->irq_handler) {
58- card->sdio_single_irq = func;
59- break;
60- }
61- }
62-}
63-
64 /**
65  * sdio_claim_irq - claim the IRQ for a SDIO function
66  * @func: SDIO function
67@@ -256,7 +227,6 @@ int sdio_claim_irq(struct sdio_func *func, sdio_irq_handler_t *handler)
68     ret = sdio_card_irq_get(func->card);
69     if (ret)
70         func->irq_handler = NULL;
71- sdio_single_irq_set(func->card);
72
73     return ret;
74 }
75@@ -281,7 +251,6 @@ int sdio_release_irq(struct sdio_func *func)
76     if (func->irq_handler) {
77         func->irq_handler = NULL;
78         sdio_card_irq_put(func->card);
79- sdio_single_irq_set(func->card);
80     }
81
82     ret = mmc_io_rw_direct(func->card, 0, 0, SDIO_CCCR_IENx, 0, &reg);
83diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
84index 6ad4355..5fa4f05 100644
85--- a/include/linux/mmc/card.h
86@@ -208,7 +208,6 @@ struct mmc_card {
87     struct sdio_cccr cccr; /* common card info */
88     struct sdio_cis cis; /* common tuple info */
89     struct sdio_func *sdio_func[SDIO_MAX_FUNCS]; /* SDIO functions (devices) */
90- struct sdio_func *sdio_single_irq; /* SDIO function when only one IRQ active */
91     unsigned num_info; /* number of info strings */
92     const char **info; /* info strings */
93     struct sdio_func_tuple *tuples; /* unknown common tuples */
94--
951.7.4.1
96

Archive Download the corresponding diff file



interactive