- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
we have a custom TI OMAP3 based Linux 4.9.x setup. We a running in a problem where the CYW4343W dosn't answer over SDIO after setting WL_REG_ON to low and again high. The only way to re-enable the CYW4343W is to completely remove the module (Laird Sterling-LWB) from the MMC slot and insert the module again.
The Linux MMC driver polls the module via broken-cd attribute in the Linux device tree. The polling is viewable on the SDIO CMD/CLK line via oscilloscope.
Kernel log when inserting the module:
[ 61.530151] mmc0: queuing unknown CIS tuple 0x80 (2 bytes)
[ 61.538909] mmc0: queuing unknown CIS tuple 0x80 (3 bytes)
[ 61.552703] mmc0: queuing unknown CIS tuple 0x80 (3 bytes)
[ 61.566436] mmc0: queuing unknown CIS tuple 0x80 (7 bytes)
[ 61.755645] mmc0: new high speed SDIO card at address 0001
Kernel log when setting WL_REG_ON low
[ 122.085510] mmc0: card 0001 removed
Kernel log when setting WL_REG_ON high
........ nothing .......
How can I re-enable the module?
Many thanks for help!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
see if this addresses you issue:
laird: brcmfmac - enable MMC detection after driver unloads or fails
A previous commit from upstream set the MMC_CAP_NONREMOVABLE bit as part
of a larger WOW enhancement. This causes an issue if the driver is to be
unloaded and reloaded as the state of the MMC is left so that card
detect is disabled.
Enable MMC's card detect when the driver is unloaded or fails to load.
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
index c3b32fdf6a9a..168d40c82748 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
@@ -1199,6 +1199,7 @@ static int brcmf_ops_sdio_probe(struct sdio_func *func,
fail:
dev_set_drvdata(&func->dev, NULL);
dev_set_drvdata(&sdiodev->func[1]->dev, NULL);
+ sdiodev->func[2]->card->host->caps &= ~MMC_CAP_NONREMOVABLE;
kfree(sdiodev->func[0]);
kfree(sdiodev);
kfree(bus_if);
@@ -1226,6 +1227,7 @@ static void brcmf_ops_sdio_remove(struct sdio_func *func)
return;
/* only proceed with rest of cleanup if func 1 */
+ sdiodev->func[2]->card->host->caps &= ~MMC_CAP_NONREMOVABLE;
brcmf_sdiod_remove(sdiodev);
dev_set_drvdata(&sdiodev->func[1]->dev, NULL);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Could you provide version of brcmfmac that you are currentlty using.?
Just to understand,
1.Is the fmac completetly down after setting WL_REG_ON High?
2.Do you need to do a complete system reboot to get it up?
3.Did you force a re-scan of the SDIO bus from user-space?
Try doing a manual ubind and bind sequence on the SDIO driver.
Regards,
Vinayak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
we are using the Linux 4.9.x main line brcmfmac driver - but this should be not the problem, because the module is not recognized from the MMC host controller.
> 1.Is the fmac completetly down after setting WL_REG_ON High?
yes
> 2.Do you need to do a complete system reboot to get it up?
This doesn't help. I've to plug-out and plug-in the module to get it work.
> 3.Did you force a re-scan of the SDIO bus from user-space?
How can I do this?
Regards,
Sven
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
see if this addresses you issue:
laird: brcmfmac - enable MMC detection after driver unloads or fails
A previous commit from upstream set the MMC_CAP_NONREMOVABLE bit as part
of a larger WOW enhancement. This causes an issue if the driver is to be
unloaded and reloaded as the state of the MMC is left so that card
detect is disabled.
Enable MMC's card detect when the driver is unloaded or fails to load.
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
index c3b32fdf6a9a..168d40c82748 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
@@ -1199,6 +1199,7 @@ static int brcmf_ops_sdio_probe(struct sdio_func *func,
fail:
dev_set_drvdata(&func->dev, NULL);
dev_set_drvdata(&sdiodev->func[1]->dev, NULL);
+ sdiodev->func[2]->card->host->caps &= ~MMC_CAP_NONREMOVABLE;
kfree(sdiodev->func[0]);
kfree(sdiodev);
kfree(bus_if);
@@ -1226,6 +1227,7 @@ static void brcmf_ops_sdio_remove(struct sdio_func *func)
return;
/* only proceed with rest of cleanup if func 1 */
+ sdiodev->func[2]->card->host->caps &= ~MMC_CAP_NONREMOVABLE;
brcmf_sdiod_remove(sdiodev);
dev_set_drvdata(&sdiodev->func[1]->dev, NULL);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks ErBe_1728341