summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2009-07-28 12:35:59 -0700
committerDmitry Shmidt <dimitrysh@google.com>2009-07-28 12:35:59 -0700
commitf0b45cb49603e543c2075f00dc8170a288585bc7 (patch)
tree2c48f7288d8d79da22ba7c882ab1ba3a74a5d0f2
parent3eccf36b8b2676516532475bfd3cb7943aea918c (diff)
downloadti-f0b45cb49603e543c2075f00dc8170a288585bc7.tar.gz
Fix sdio_reset_comm() frequent call on flaky HW
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
-rw-r--r--[-rwxr-xr-x]sta_dk_4_0_4_32/pform/linux/src/chip_stat.c0
-rw-r--r--sta_dk_4_0_4_32/pform/linux/src/esta_drv.c26
-rw-r--r--[-rwxr-xr-x]sta_dk_4_0_4_32/pform/linux/src/mmc_tnetw1150_api.c0
-rw-r--r--[-rwxr-xr-x]sta_dk_4_0_4_32/pform/linux/src/tnetw_sdio.c0
4 files changed, 16 insertions, 10 deletions
diff --git a/sta_dk_4_0_4_32/pform/linux/src/chip_stat.c b/sta_dk_4_0_4_32/pform/linux/src/chip_stat.c
index d0f8928..d0f8928 100755..100644
--- a/sta_dk_4_0_4_32/pform/linux/src/chip_stat.c
+++ b/sta_dk_4_0_4_32/pform/linux/src/chip_stat.c
diff --git a/sta_dk_4_0_4_32/pform/linux/src/esta_drv.c b/sta_dk_4_0_4_32/pform/linux/src/esta_drv.c
index 32c8627..669e9cc 100644
--- a/sta_dk_4_0_4_32/pform/linux/src/esta_drv.c
+++ b/sta_dk_4_0_4_32/pform/linux/src/esta_drv.c
@@ -1534,7 +1534,14 @@ static void tiwlan_destroy_drv(tiwlan_net_dev_t *drv)
}
else
del_timer_sync(&drv->poll_timer);
-
+#ifdef DM_USE_WORKQUEUE
+ flush_work(&drv->tirq);
+ flush_work(&drv->tw);
+ flush_work(&drv->txmit);
+#if defined(CONFIG_TROUT_PWRSINK) || defined(CONFIG_HTC_PWRSINK)
+ cancel_delayed_work_sync(&drv->trxw);
+#endif
+#endif
/* Unload all modules (free memory) & destroy timers */
configMgr_UnloadModules (drv->adapter.CoreHalCtx);
@@ -2022,18 +2029,16 @@ static int __init tiwlan_module_init(void)
/* rc = tiwlan_create_drv(0, 0, 0, 0, 0, TROUT_IRQ, NULL, NULL); -- Called in probe */
tiwlan_calibration = create_proc_entry("calibration", 0644, NULL);
- if (tiwlan_calibration == NULL) {
- remove_proc_entry(TIWLAN_DBG_PROC, NULL);
- return -EINVAL;
+ if (tiwlan_calibration) {
+ tiwlan_calibration->size = tiwlan_get_nvs_size();
+ tiwlan_calibration->read_proc = tiwlan_calibration_read_proc;
+ tiwlan_calibration->write_proc = tiwlan_calibration_write_proc;
}
- tiwlan_calibration->size = tiwlan_get_nvs_size();
- tiwlan_calibration->read_proc = tiwlan_calibration_read_proc;
- tiwlan_calibration->write_proc = tiwlan_calibration_write_proc;
-
if (!wait_for_completion_timeout(&sdio_wait, msecs_to_jiffies(10000))) {
printk(KERN_ERR "%s: Timed out waiting for device detect\n", __func__);
remove_proc_entry(TIWLAN_DBG_PROC, NULL);
- remove_proc_entry("calibration", NULL);
+ if (tiwlan_calibration)
+ remove_proc_entry("calibration", NULL);
sdio_unregister_driver(&tiwlan_sdio_drv);
#ifdef CONFIG_WIFI_CONTROL_FUNC
wifi_del_dev();
@@ -2072,7 +2077,8 @@ static void __exit tiwlan_module_cleanup(void)
}
remove_proc_entry(TIWLAN_DBG_PROC, NULL);
#ifdef TIWLAN_MSM7000
- remove_proc_entry("calibration", NULL);
+ if(tiwlan_calibration)
+ remove_proc_entry("calibration", NULL);
sdio_unregister_driver(&tiwlan_sdio_drv);
#ifdef CONFIG_WIFI_CONTROL_FUNC
wifi_del_dev();
diff --git a/sta_dk_4_0_4_32/pform/linux/src/mmc_tnetw1150_api.c b/sta_dk_4_0_4_32/pform/linux/src/mmc_tnetw1150_api.c
index 4efee19..4efee19 100755..100644
--- a/sta_dk_4_0_4_32/pform/linux/src/mmc_tnetw1150_api.c
+++ b/sta_dk_4_0_4_32/pform/linux/src/mmc_tnetw1150_api.c
diff --git a/sta_dk_4_0_4_32/pform/linux/src/tnetw_sdio.c b/sta_dk_4_0_4_32/pform/linux/src/tnetw_sdio.c
index 51171d5..51171d5 100755..100644
--- a/sta_dk_4_0_4_32/pform/linux/src/tnetw_sdio.c
+++ b/sta_dk_4_0_4_32/pform/linux/src/tnetw_sdio.c