Root/target/linux/xburst/patches-3.0/0034-Revert-mmc-sdio-optimized-SDIO-IRQ-handling-for-sing.patch

Source at commit 8fa1337cb972e5486141340da2ea2e066b497877 created 8 years 8 months ago.
By Xiangfu Liu, this commit break the ks7010 driver. for more information please read "SDIO single IRQ optimization breaks libertas" linux-mmc mailing list
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+++ b/drivers/mmc/core/sdio_irq.c
16@@ -31,17 +31,6 @@ static int process_sdio_pending_irqs(struct mmc_card *card)
17 {
18     int i, ret, count;
19     unsigned char pending;
20- struct sdio_func *func;
21-
22- /*
23- * Optimization, if there is only 1 function interrupt registered
24- * call irq handler directly
25- */
26- func = card->sdio_single_irq;
27- if (func) {
28- func->irq_handler(func);
29- return 1;
30- }
31 
32     ret = mmc_io_rw_direct(card, 0, 0, SDIO_CCCR_INTx, 0, &pending);
33     if (ret) {
34@@ -53,7 +42,7 @@ static int process_sdio_pending_irqs(struct mmc_card *card)
35     count = 0;
36     for (i = 1; i <= 7; i++) {
37         if (pending & (1 << i)) {
38- func = card->sdio_func[i - 1];
39+ struct sdio_func *func = card->sdio_func[i - 1];
40             if (!func) {
41                 printk(KERN_WARNING "%s: pending IRQ for "
42                     "non-existent function\n",
43@@ -197,24 +186,6 @@ static int sdio_card_irq_put(struct mmc_card *card)
44     return 0;
45 }
46 
47-/* If there is only 1 function registered set sdio_single_irq */
48-static void sdio_single_irq_set(struct mmc_card *card)
49-{
50- struct sdio_func *func;
51- int i;
52-
53- card->sdio_single_irq = NULL;
54- if ((card->host->caps & MMC_CAP_SDIO_IRQ) &&
55- card->host->sdio_irqs == 1)
56- for (i = 0; i < card->sdio_funcs; i++) {
57- func = card->sdio_func[i];
58- if (func && func->irq_handler) {
59- card->sdio_single_irq = func;
60- break;
61- }
62- }
63-}
64-
65 /**
66  * sdio_claim_irq - claim the IRQ for a SDIO function
67  * @func: SDIO function
68@@ -256,7 +227,6 @@ int sdio_claim_irq(struct sdio_func *func, sdio_irq_handler_t *handler)
69     ret = sdio_card_irq_get(func->card);
70     if (ret)
71         func->irq_handler = NULL;
72- sdio_single_irq_set(func->card);
73 
74     return ret;
75 }
76@@ -281,7 +251,6 @@ int sdio_release_irq(struct sdio_func *func)
77     if (func->irq_handler) {
78         func->irq_handler = NULL;
79         sdio_card_irq_put(func->card);
80- sdio_single_irq_set(func->card);
81     }
82 
83     ret = mmc_io_rw_direct(func->card, 0, 0, SDIO_CCCR_IENx, 0, &reg);
84diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
85index 6ad4355..5fa4f05 100644
86--- a/include/linux/mmc/card.h
87+++ b/include/linux/mmc/card.h
88@@ -208,7 +208,6 @@ struct mmc_card {
89     struct sdio_cccr cccr; /* common card info */
90     struct sdio_cis cis; /* common tuple info */
91     struct sdio_func *sdio_func[SDIO_MAX_FUNCS]; /* SDIO functions (devices) */
92- struct sdio_func *sdio_single_irq; /* SDIO function when only one IRQ active */
93     unsigned num_info; /* number of info strings */
94     const char **info; /* info strings */
95     struct sdio_func_tuple *tuples; /* unknown common tuples */
96--
971.7.4.1
98
99

Archive Download this file



interactive