From 3ca38e2fe3329d4d9563cf64d5b6a54772874205 Mon Sep 17 00:00:00 2001 From: Venkateswara Swamy Bandaru Date: Fri, 5 Aug 2016 14:51:19 +0530 Subject: [PATCH 1/2] qcacmn: Support for wifidown and wifiup without modules removal Release the iomem requested during the cleanup path. Successive request to iomem resource fails, if the ioremapped region is not released during the last cleanup Change-Id: Icc88647df8d21f9f230b784faa8e7fdaf5968814 Acked-by: Balamurugan Mahalingam CRs-Fixed: 1056971 --- hif/src/dispatcher/ahb_api.h | 1 + hif/src/dispatcher/multibus_ahb.c | 2 +- hif/src/snoc/if_ahb.c | 32 ++++++++++++++++++++++--------- 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/hif/src/dispatcher/ahb_api.h b/hif/src/dispatcher/ahb_api.h index 8ba0c754d2d9..2bba2ff92d8e 100644 --- a/hif/src/dispatcher/ahb_api.h +++ b/hif/src/dispatcher/ahb_api.h @@ -26,6 +26,7 @@ void hif_ahb_close(struct hif_softc *hif_ctx); void hif_ahb_disable_isr(struct hif_softc *hif_ctx); void hif_ahb_nointrs(struct hif_softc *scn); +void hif_ahb_reset_soc(struct hif_softc *hif_ctx); QDF_STATUS hif_ahb_enable_bus(struct hif_softc *ol_sc, struct device *dev, void *bdev, const hif_bus_id *bid, diff --git a/hif/src/dispatcher/multibus_ahb.c b/hif/src/dispatcher/multibus_ahb.c index b543e8fb420b..d1bee78d6070 100644 --- a/hif/src/dispatcher/multibus_ahb.c +++ b/hif/src/dispatcher/multibus_ahb.c @@ -38,7 +38,7 @@ QDF_STATUS hif_initialize_ahb_ops(struct hif_bus_ops *bus_ops) bus_ops->hif_bus_open = &hif_ahb_open; bus_ops->hif_bus_close = &hif_ahb_close; bus_ops->hif_bus_prevent_linkdown = &hif_dummy_bus_prevent_linkdown; - bus_ops->hif_reset_soc = &hif_dummy_reset_soc; + bus_ops->hif_reset_soc = &hif_ahb_reset_soc; bus_ops->hif_bus_suspend = &hif_dummy_bus_suspend; bus_ops->hif_bus_resume = &hif_dummy_bus_resume; bus_ops->hif_target_sleep_state_adjust = diff --git a/hif/src/snoc/if_ahb.c b/hif/src/snoc/if_ahb.c index dc6077841894..6f986fd14bbe 100644 --- a/hif/src/snoc/if_ahb.c +++ b/hif/src/snoc/if_ahb.c @@ -233,15 +233,29 @@ void hif_ahb_disable_bus(struct hif_softc *scn) struct hif_pci_softc *sc = HIF_GET_PCI_SOFTC(scn); void __iomem *mem; struct platform_device *pdev = (struct platform_device *)sc->pdev; + struct resource *memres = NULL; + int mem_pa_size = 0; /*Disable WIFI clock input*/ - hif_ahb_clk_enable_disable(&pdev->dev, 0); + if (sc->mem) { + memres = platform_get_resource(pdev, IORESOURCE_MEM, 0); + if (!memres) { + HIF_INFO("%s: Failed to get IORESOURCE_MEM\n", + __func__); + return; + } + mem_pa_size = memres->end - memres->start + 1; - hif_ahb_device_reset(scn); - mem = (void __iomem *)sc->mem; - if (mem) { - devm_iounmap(&pdev->dev, mem); - sc->mem = NULL; + hif_ahb_clk_enable_disable(&pdev->dev, 0); + + hif_ahb_device_reset(scn); + mem = (void __iomem *)sc->mem; + if (mem) { + devm_iounmap(&pdev->dev, mem); + devm_release_mem_region(&pdev->dev, scn->mem_pa, + mem_pa_size); + sc->mem = NULL; + } } scn->mem = NULL; } @@ -324,6 +338,7 @@ QDF_STATUS hif_ahb_enable_bus(struct hif_softc *ol_sc, sc->mem = mem; ol_sc->mem = mem; ol_sc->mem_pa = memres->start; + tgt_info = hif_get_target_info_handle((struct hif_opaque_softc *)ol_sc); tgt_info->target_type = target_type; @@ -362,10 +377,9 @@ err_cleanup1: * Return: void */ /* Function to reset SoC */ -void hif_ahb_reset_soc(struct hif_opaque_softc *hif_ctx) +void hif_ahb_reset_soc(struct hif_softc *hif_ctx) { - struct hif_pci_softc *sc = HIF_GET_PCI_SOFTC(hif_ctx); - hif_ahb_device_reset((struct hif_softc *)sc); + hif_ahb_device_reset(hif_ctx); } From b019e0da84e78eb723f9d64e46dfd0b0fc23bffd Mon Sep 17 00:00:00 2001 From: qcabuildsw Date: Fri, 2 Sep 2016 01:08:39 -0700 Subject: [PATCH 2/2] Release 5.1.0.23E Release 5.1.0.23E Change-Id: I6cb56ab1492e084f8b9f6a890776eb2e5010c1ac CRs-Fixed: 688141 --- VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.txt b/VERSION.txt index 0780595294c6..3b8ac520192a 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1,2 +1,2 @@ -Current Component wlan-cmn.driver.lnx.1.0 version 5.1.0.23D +Current Component wlan-cmn.driver.lnx.1.0 version 5.1.0.23E Matches Component wlan-cld3.driver.lnx.1.1 version 5.1.0.22C