hi,
With compat wireless on 2.6.35 running on nexus S(also known as crespo or
herring) I've the dmesg full of
[ 109.999238] mmc2:0001:2: pending IRQ with no handler
to make it find the card I've done the a wireless activator that can be found
here:
http://git.freesmartphone.org/?p=linux-2.6.git;a=commit;h=50ad0092e17490671d44884052545f43c4261234
Is the activator wrong? (there is no runtime PM in 2.6.35 as far as I know).
Denis.
Hi Denis,
On 11/22/2011 11:46 AM, Denis 'GNUtoo' Carikli wrote:
> * adding an if 0 in brcmf_sdcard_intr_reg removes the problematic dmesg
> message:
> int brcmf_sdcard_intr_reg(struct brcmf_sdio_dev *sdiodev)
> {
> brcmf_dbg(TRACE, "Entering\n");
> #if 0
> sdio_claim_host(sdiodev->func[1]);
> sdio_claim_irq(sdiodev->func[1], brcmf_sdioh_irqhandler);
> sdio_release_host(sdiodev->func[1]);
> #endif
> return 0;
> }
> but then:
> # ifconfig wlan0 up
> ifconfig: SIOCSIFFLAGS: Operation not permitted
> (with rfkill state ok (soft = 0, hard = 0, state = 1) and beeing root.
Root cause for the mmc complain is that there is no handler for function
2 interrupt. 4329 generate a SDIO interrupt when there are something
available for the driver to retrieve from the dongle. It will flag both
function 1 and function 2 at the same time. They are identical. A empty
dummy irq handler register to function 2 irq will make the warning go
away. FWIW, it doesn't affect anything here since they have been taken
care in function 1 irq handler. I will submit a patch too add the dummy
handler.
Thanks,
Franky
Some more infos:
* The version of compat wireless used is the following:
compat-wireless-2011-11-21
* adding an if 0 in brcmf_sdcard_intr_reg removes the problematic dmesg
message:
int brcmf_sdcard_intr_reg(struct brcmf_sdio_dev *sdiodev)
{
brcmf_dbg(TRACE, "Entering\n");
#if 0
sdio_claim_host(sdiodev->func[1]);
sdio_claim_irq(sdiodev->func[1], brcmf_sdioh_irqhandler);
sdio_release_host(sdiodev->func[1]);
#endif
return 0;
}
but then:
# ifconfig wlan0 up
ifconfig: SIOCSIFFLAGS: Operation not permitted
(with rfkill state ok (soft = 0, hard = 0, state = 1) and beeing root.
Denis.
>Root cause for the mmc complain is that there is no handler for function
>2 interrupt. 4329 generate a SDIO interrupt when there are something
>available for the driver to retrieve from the dongle. It will flag both
>function 1 and function 2 at the same time. They are identical. A empty
>dummy irq handler register to function 2 irq will make the warning go
>away. FWIW, it doesn't affect anything here since they have been taken
>care in function 1 irq handler.
ok,thanks for the explanation.
>I will submit a patch too add the dummy handler.
Thanks a lot.
Denis.
Hi,
>I will submit a patch too add the dummy handler.
Since the patch hasn't shown up yet, I decided to give a try,
But I failed:
The patch which will follow blocks the phone(ssh doens't respond
anymore), I really wonder what's wrong with it since it does
something very similar to the bcm4329 driver.
The last printk are theses ones:
[ 63.436157] wifi_set_power = 1
[ 63.641585] wifi_set_carddetect = 1
[ 63.646195] sdhci_s3c_force_presence_change : Enter
[ 63.780660] mmc2: queuing unknown CIS tuple 0x80 (50 bytes)
[ 63.796865] mmc2: queuing unknown CIS tuple 0x80 (7 bytes)
[ 63.843426] mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
[ 63.851883] mmc2: new SDIO card at address 0001
Denis.
Hi,
With the following patch instead of mine:
brcm80211: fmac: register a dummy irq handler for SDIO function 2
it still fails the same way.
I added that:
#define BCMDBG 1
after:
#include "dhd_proto.h"
#include "dhd_dbg.h"
in:
drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c
and:
insmod brcmfmac.ko brcmf_msg_level=8192
But it wasn't more verbose so I added MMC debug and I got that:
[ 101.531001] mmc2: starting CMD52 arg 00205000 flags 00000195
[ 101.531149] sdhci [sdhci_irq()]: *** mmc2 got interrupt: 0x00000001
[ 101.531232] mmc2: req done (CMD52): 0: 00001000 00000000 00000000 00000000
[ 101.531381] mmc2: starting CMD52 arg 00205200 flags 00000195
[ 101.531468] sdhci [sdhci_irq()]: *** mmc2 got interrupt: 0x00000001
[ 101.531615] mmc2: req done (CMD52): 0: 00001000 00000000 00000000 00000000
[ 101.531701] mmc2: starting CMD52 arg 00205400 flags 00000195
[ 101.531851] sdhci [sdhci_irq()]: *** mmc2 got interrupt: 0x00000001
[ 101.531934] mmc2: req done (CMD52): 0: 00001000 00000000 00000000 00000000
[ 101.532084] mmc2: starting CMD52 arg 00205600 flags 00000195
[ 101.533235] sdhci [sdhci_irq()]: *** mmc2 got interrupt: 0x00000001
[ 101.533321] mmc2: req done (CMD52): 0: 00001000 00000000 00000000 00000000
[ 101.533473] mmc2: starting CMD52 arg 00205800 flags 00000195
[ 101.533560] sdhci [sdhci_irq()]: *** mmc2 got interrupt: 0x00000001
[ 101.533707] mmc2: req done (CMD52): 0: 00001000 00000000 00000000 00000000
[ 101.533794] mmc2: starting CMD52 arg 00205a00 flags 00000195
[ 101.533944] sdhci [sdhci_irq()]: *** mmc2 got interrupt: 0x00000001
[ 101.534027] mmc2: req done (CMD52): 0: 00001000 00000000 00000000 00000000
[ 101.534177] mmc2: starting CMD52 arg 00205c00 flags 00000195
[ 101.534327] sdhci [sdhci_irq()]: *** mmc2 got interrupt: 0x00000001
[ 101.534411] mmc2: req done (CMD52): 0: 00001000 00000000 00000000 00000000
[ 101.534562] mmc2: starting CMD52 arg 00205e00 flags 00000195
--- Then it blocks here ---
Denis.
Signed-off-by: Denis 'GNUtoo' Carikli <[email protected]>
---
drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
index 74933dc..62cb779 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
@@ -52,10 +52,19 @@ static void brcmf_sdioh_irqhandler(struct sdio_func *func)
sdio_claim_host(func);
}
+static void brcmf_sdioh_dummy_irqhandler(struct sdio_func *func)
+{
+ brcmf_dbg(TRACE, "*** DUMMY IRQHandler\n");
+}
+
int brcmf_sdcard_intr_reg(struct brcmf_sdio_dev *sdiodev)
{
brcmf_dbg(TRACE, "Entering\n");
+ sdio_claim_host(sdiodev->func[2]);
+ sdio_claim_irq(sdiodev->func[2], brcmf_sdioh_dummy_irqhandler);
+ sdio_release_host(sdiodev->func[2]);
+
sdio_claim_host(sdiodev->func[1]);
sdio_claim_irq(sdiodev->func[1], brcmf_sdioh_irqhandler);
sdio_release_host(sdiodev->func[1]);
@@ -71,6 +80,10 @@ int brcmf_sdcard_intr_dereg(struct brcmf_sdio_dev *sdiodev)
sdio_release_irq(sdiodev->func[1]);
sdio_release_host(sdiodev->func[1]);
+ sdio_claim_host(sdiodev->func[2]);
+ sdio_release_irq(sdiodev->func[2]);
+ sdio_release_host(sdiodev->func[2]);
+
return 0;
}
--
1.7.4.1
Hi,
>I saw the patch you sent. I have one queued up internally but am happy
>to take yours. Does the patch work or not?
No it doesn't work as the phone freeze(maybe for another reason tough).
I think you should rather send your patch.
>Did you try to enable more debug trace? Looks like sdio probe has never
>been called.
I'll try tomorrow, thanks a lot.
Denis.
Hi Denis,
On 12/18/2011 03:33 AM, Denis 'GNUtoo' Carikli wrote:
> Hi,
> With the following patch instead of mine:
> brcm80211: fmac: register a dummy irq handler for SDIO function 2
> it still fails the same way.
Indeed there is no big difference from yours. We tested it on X86 and
OMAP panda board.
> I added that:
> #define BCMDBG 1
> after:
> #include "dhd_proto.h"
> #include "dhd_dbg.h"
> in:
> drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c
> and:
> insmod brcmfmac.ko brcmf_msg_level=8192
Could you try to load the driver by insmod brcmfmac.ko
brcmf_msg_level=0x7 and send me the log?
> But it wasn't more verbose so I added MMC debug and I got that:
>
> [ 101.534177] mmc2: starting CMD52 arg 00205c00 flags 00000195
> [ 101.534327] sdhci [sdhci_irq()]: *** mmc2 got interrupt: 0x00000001
> [ 101.534411] mmc2: req done (CMD52): 0: 00001000 00000000 00000000 00000000
> [ 101.534562] mmc2: starting CMD52 arg 00205e00 flags 00000195
> --- Then it blocks here ---
Looks like it hangs in the middle of downloading firmware.
Thanks,
Franky
Hi Denis,
On 12/10/2011 09:51 AM, Denis 'GNUtoo' Carikli wrote:
>> I will submit a patch too add the dummy handler.
> Since the patch hasn't shown up yet, I decided to give a try,
> But I failed:
I saw the patch you sent. I have one queued up internally but am happy
to take yours. Does the patch work or not?
> The patch which will follow blocks the phone(ssh doens't respond
> anymore), I really wonder what's wrong with it since it does
> something very similar to the bcm4329 driver.
> The last printk are theses ones:
> [ 63.436157] wifi_set_power = 1
> [ 63.641585] wifi_set_carddetect = 1
> [ 63.646195] sdhci_s3c_force_presence_change : Enter
> [ 63.780660] mmc2: queuing unknown CIS tuple 0x80 (50 bytes)
> [ 63.796865] mmc2: queuing unknown CIS tuple 0x80 (7 bytes)
> [ 63.843426] mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
> [ 63.851883] mmc2: new SDIO card at address 0001
Did you try to enable more debug trace? Looks like sdio probe has never
been called.
Franky