diff options
| -rw-r--r-- | VERSION.txt | 2 | ||||
| -rw-r--r-- | hif/src/dispatcher/multibus.c | 1 | ||||
| -rw-r--r-- | hif/src/pcie/if_pci.c | 60 |
3 files changed, 31 insertions, 32 deletions
diff --git a/VERSION.txt b/VERSION.txt index 1cbbd76e196e..8e0703dcbff0 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1,2 +1,2 @@ -Current Component wlan-cmn.driver.lnx.1.0 version 5.1.0.27S +Current Component wlan-cmn.driver.lnx.1.0 version 5.1.0.27U Matches Component wlan-cld3.driver.lnx.1.1 version 5.1.0.22D diff --git a/hif/src/dispatcher/multibus.c b/hif/src/dispatcher/multibus.c index c8369dcc52af..0862fcdd6d63 100644 --- a/hif/src/dispatcher/multibus.c +++ b/hif/src/dispatcher/multibus.c @@ -140,6 +140,7 @@ QDF_STATUS hif_bus_open(struct hif_softc *hif_sc, break; case QDF_BUS_TYPE_SDIO: status = hif_initialize_sdio_ops(hif_sc); + break; case QDF_BUS_TYPE_USB: status = hif_initialize_usb_ops(&hif_sc->bus_ops); break; diff --git a/hif/src/pcie/if_pci.c b/hif/src/pcie/if_pci.c index 21a6b83edad1..07416f881d13 100644 --- a/hif/src/pcie/if_pci.c +++ b/hif/src/pcie/if_pci.c @@ -985,7 +985,7 @@ static int hif_pci_pm_runtime_debugfs_show(struct seq_file *s, void *data) "SUSPENDED"}; unsigned int msecs_age; int pm_state = atomic_read(&sc->pm_state); - unsigned long timer_expires, flags; + unsigned long timer_expires; struct hif_pm_runtime_lock *ctx; seq_printf(s, "%30s: %s\n", "Runtime PM state", @@ -1025,9 +1025,9 @@ static int hif_pci_pm_runtime_debugfs_show(struct seq_file *s, void *data) msecs_age / 1000, msecs_age % 1000); } - spin_lock_irqsave(&sc->runtime_lock, flags); + spin_lock_bh(&sc->runtime_lock); if (list_empty(&sc->prevent_suspend_list)) { - spin_unlock_irqrestore(&sc->runtime_lock, flags); + spin_unlock_bh(&sc->runtime_lock); return 0; } @@ -1039,7 +1039,7 @@ static int hif_pci_pm_runtime_debugfs_show(struct seq_file *s, void *data) seq_puts(s, " "); } seq_puts(s, "\n"); - spin_unlock_irqrestore(&sc->runtime_lock, flags); + spin_unlock_bh(&sc->runtime_lock); return 0; } @@ -1199,7 +1199,6 @@ static void hif_pm_runtime_open(struct hif_pci_softc *sc) */ static void hif_pm_runtime_sanitize_on_exit(struct hif_pci_softc *sc) { - unsigned long flags; struct hif_pm_runtime_lock *ctx, *tmp; if (atomic_read(&sc->dev->power.usage_count) != 1) @@ -1207,13 +1206,13 @@ static void hif_pm_runtime_sanitize_on_exit(struct hif_pci_softc *sc) else return; - spin_lock_irqsave(&sc->runtime_lock, flags); + spin_lock_bh(&sc->runtime_lock); list_for_each_entry_safe(ctx, tmp, &sc->prevent_suspend_list, list) { - spin_unlock_irqrestore(&sc->runtime_lock, flags); + spin_unlock_bh(&sc->runtime_lock); hif_pm_runtime_allow_suspend(GET_HIF_OPAQUE_HDL(sc), ctx); - spin_lock_irqsave(&sc->runtime_lock, flags); + spin_lock_bh(&sc->runtime_lock); } - spin_unlock_irqrestore(&sc->runtime_lock, flags); + spin_unlock_bh(&sc->runtime_lock); /* ensure 1 and only 1 usage count so that when the wlan * driver is re-insmodded runtime pm won't be @@ -1239,14 +1238,13 @@ static int __hif_pm_runtime_allow_suspend(struct hif_pci_softc *hif_sc, */ static void hif_pm_runtime_sanitize_on_ssr_exit(struct hif_pci_softc *sc) { - unsigned long flags; struct hif_pm_runtime_lock *ctx, *tmp; - spin_lock_irqsave(&sc->runtime_lock, flags); + spin_lock_bh(&sc->runtime_lock); list_for_each_entry_safe(ctx, tmp, &sc->prevent_suspend_list, list) { __hif_pm_runtime_allow_suspend(sc, ctx); } - spin_unlock_irqrestore(&sc->runtime_lock, flags); + spin_unlock_bh(&sc->runtime_lock); } /** @@ -3728,7 +3726,6 @@ int hif_pm_runtime_put(struct hif_opaque_softc *hif_ctx) struct hif_softc *scn = HIF_GET_SOFTC(hif_ctx); struct hif_pci_softc *sc = HIF_GET_PCI_SOFTC(hif_ctx); int pm_state, usage_count; - unsigned long flags; char *error = NULL; if (NULL == scn) { @@ -3749,9 +3746,7 @@ int hif_pm_runtime_put(struct hif_opaque_softc *hif_ctx) } if (error) { - spin_lock_irqsave(&sc->runtime_lock, flags); hif_pci_runtime_pm_warn(sc, error); - spin_unlock_irqrestore(&sc->runtime_lock, flags); return -EINVAL; } @@ -3880,11 +3875,10 @@ static int __hif_pm_runtime_allow_suspend(struct hif_pci_softc *hif_sc, static void hif_pm_runtime_lock_timeout_fn(unsigned long data) { struct hif_pci_softc *hif_sc = (struct hif_pci_softc *)data; - unsigned long flags; unsigned long timer_expires; struct hif_pm_runtime_lock *context, *temp; - spin_lock_irqsave(&hif_sc->runtime_lock, flags); + spin_lock_bh(&hif_sc->runtime_lock); timer_expires = hif_sc->runtime_timer_expires; @@ -3912,7 +3906,7 @@ static void hif_pm_runtime_lock_timeout_fn(unsigned long data) } } - spin_unlock_irqrestore(&hif_sc->runtime_lock, flags); + spin_unlock_bh(&hif_sc->runtime_lock); } int hif_pm_runtime_prevent_suspend(struct hif_opaque_softc *ol_sc, @@ -3921,7 +3915,6 @@ int hif_pm_runtime_prevent_suspend(struct hif_opaque_softc *ol_sc, struct hif_softc *sc = HIF_GET_SOFTC(ol_sc); struct hif_pci_softc *hif_sc = HIF_GET_PCI_SOFTC(ol_sc); struct hif_pm_runtime_lock *context = data; - unsigned long flags; if (!sc->hif_config.enable_runtime_pm) return 0; @@ -3929,10 +3922,13 @@ int hif_pm_runtime_prevent_suspend(struct hif_opaque_softc *ol_sc, if (!context) return -EINVAL; - spin_lock_irqsave(&hif_sc->runtime_lock, flags); + if (in_irq()) + WARN_ON(1); + + spin_lock_bh(&hif_sc->runtime_lock); context->timeout = 0; __hif_pm_runtime_prevent_suspend(hif_sc, context); - spin_unlock_irqrestore(&hif_sc->runtime_lock, flags); + spin_unlock_bh(&hif_sc->runtime_lock); return 0; } @@ -3944,15 +3940,16 @@ int hif_pm_runtime_allow_suspend(struct hif_opaque_softc *ol_sc, struct hif_pci_softc *hif_sc = HIF_GET_PCI_SOFTC(ol_sc); struct hif_pm_runtime_lock *context = data; - unsigned long flags; - if (!sc->hif_config.enable_runtime_pm) return 0; if (!context) return -EINVAL; - spin_lock_irqsave(&hif_sc->runtime_lock, flags); + if (in_irq()) + WARN_ON(1); + + spin_lock_bh(&hif_sc->runtime_lock); __hif_pm_runtime_allow_suspend(hif_sc, context); @@ -3968,7 +3965,7 @@ int hif_pm_runtime_allow_suspend(struct hif_opaque_softc *ol_sc, hif_sc->runtime_timer_expires = 0; } - spin_unlock_irqrestore(&hif_sc->runtime_lock, flags); + spin_unlock_bh(&hif_sc->runtime_lock); return 0; } @@ -3997,7 +3994,6 @@ int hif_pm_runtime_prevent_suspend_timeout(struct hif_opaque_softc *ol_sc, int ret = 0; unsigned long expires; - unsigned long flags; struct hif_pm_runtime_lock *context = lock; if (hif_is_load_or_unload_in_progress(sc)) { @@ -4017,6 +4013,9 @@ int hif_pm_runtime_prevent_suspend_timeout(struct hif_opaque_softc *ol_sc, if (!context) return -EINVAL; + if (in_irq()) + WARN_ON(1); + /* * Don't use internal timer if the timeout is less than auto suspend * delay. @@ -4030,7 +4029,7 @@ int hif_pm_runtime_prevent_suspend_timeout(struct hif_opaque_softc *ol_sc, expires = jiffies + msecs_to_jiffies(delay); expires += !expires; - spin_lock_irqsave(&hif_sc->runtime_lock, flags); + spin_lock_bh(&hif_sc->runtime_lock); context->timeout = delay; ret = __hif_pm_runtime_prevent_suspend(hif_sc, context); @@ -4044,7 +4043,7 @@ int hif_pm_runtime_prevent_suspend_timeout(struct hif_opaque_softc *ol_sc, hif_sc->runtime_timer_expires = expires; } - spin_unlock_irqrestore(&hif_sc->runtime_lock, flags); + spin_unlock_bh(&hif_sc->runtime_lock); HIF_ERROR("%s: pm_state: %s delay: %dms ret: %d\n", __func__, hif_pm_runtime_state_to_string( @@ -4089,7 +4088,6 @@ int hif_runtime_lock_init(qdf_runtime_lock_t *lock, const char *name) void hif_runtime_lock_deinit(struct hif_opaque_softc *hif_ctx, struct hif_pm_runtime_lock *data) { - unsigned long flags; struct hif_pm_runtime_lock *context = data; struct hif_pci_softc *sc = HIF_GET_PCI_SOFTC(hif_ctx); @@ -4103,9 +4101,9 @@ void hif_runtime_lock_deinit(struct hif_opaque_softc *hif_ctx, * Ensure to delete the context list entry and reduce the usage count * before freeing the context if context is active. */ - spin_lock_irqsave(&sc->runtime_lock, flags); + spin_lock_bh(&sc->runtime_lock); __hif_pm_runtime_allow_suspend(sc, context); - spin_unlock_irqrestore(&sc->runtime_lock, flags); + spin_unlock_bh(&sc->runtime_lock); qdf_mem_free(context); } |
