Skip to content

Commit efe02b8

Browse files
author
Adham Abozaeid
committed
staging: wilc1000: High latency on handling FW interrupts
With pm_runtime enabled, the host shutsdown its SD clock which causes high latency on handling interrupts on SAMA5D4 and new kernels. The impact of that was high ping latency when pinging from other STAs to WILC. Closes #13 Signed-off-by: Adham Abozaeid <[email protected]>
1 parent 42b52a5 commit efe02b8

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

wilc/linux_wlan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ static int linux_wlan_start_firmware(struct net_device *dev)
731731
PRINT_INFO(vif->ndev, INIT_DBG, "Waiting for FW to get ready ...\n");
732732

733733
if (!wait_for_completion_timeout(&wilc->sync_event,
734-
msecs_to_jiffies(1500))) {
734+
msecs_to_jiffies(500))) {
735735
PRINT_INFO(vif->ndev, INIT_DBG, "Firmware start timed out\n");
736736
return -ETIME;
737737
}

wilc/wilc_sdio.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <linux/mmc/host.h>
99
#include <linux/mmc/card.h>
1010
#include <linux/module.h>
11+
#include <linux/pm_runtime.h>
1112

1213
#include "wilc_wfi_netdevice.h"
1314
#include "wilc_wlan.h"
@@ -734,6 +735,10 @@ static int sdio_init(struct wilc *wilc, bool resume)
734735

735736
dev_info(&func->dev, "SDIO speed: %d\n",
736737
func->card->host->ios.clock);
738+
739+
/* Patch for sdio interrupt latency issue */
740+
pm_runtime_get_sync(mmc_dev(func->card->host));
741+
737742
init_waitqueue_head(&sdio_intr_waitqueue);
738743
sdio_priv->irq_gpio = (wilc->io_type == HIF_SDIO_GPIO_IRQ);
739744

0 commit comments

Comments
 (0)