diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2017-02-24 18:27:58 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-02-24 18:27:58 -0800 |
| commit | be058b686b5e18fd19de0ebbc837e5f75417544d (patch) | |
| tree | 34feb6957b9a6dda5f870eb4100a922a305f167a | |
| parent | c9dafea956a90f0778af1f568b18ac2f6ebe728a (diff) | |
| parent | 844d3ff2d76d02def2fa7a71e6f159898d9e94b9 (diff) | |
Merge "qcacld-2.0: Do proper cleanup when bmi download fails" into wlan-cld2.driver.lnx.1.0-dev
| -rw-r--r-- | CORE/SERVICES/HIF/sdio/linux/if_ath_sdio.c | 4 | ||||
| -rw-r--r-- | CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c | 17 |
2 files changed, 18 insertions, 3 deletions
diff --git a/CORE/SERVICES/HIF/sdio/linux/if_ath_sdio.c b/CORE/SERVICES/HIF/sdio/linux/if_ath_sdio.c index 3786d71036c4..53392c301a93 100644 --- a/CORE/SERVICES/HIF/sdio/linux/if_ath_sdio.c +++ b/CORE/SERVICES/HIF/sdio/linux/if_ath_sdio.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -265,6 +265,8 @@ ath_hif_sdio_probe(void *context, void *hif_handle) err_attach2: athdiag_procfs_remove(); + if (sc->ol_sc->ramdump_base) + hif_release_ramdump_mem(sc->ol_sc->ramdump_base); hif_deinit_adf_ctx(ol_sc); err_attach1: A_FREE(ol_sc); diff --git a/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c b/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c index 48a3762874ee..119194fc98b5 100644 --- a/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c +++ b/CORE/SERVICES/HIF/sdio/linux/native_sdio/src/hif.c @@ -1784,7 +1784,12 @@ TODO: MMC SDIO3.0 Setting should also be modified in ReInit() function when Powe #endif ret = hifEnableFunc(device, func); - return (ret == A_OK || ret == A_PENDING) ? 0 : -1; + if (ret == A_OK || ret == A_PENDING) { + return 0; + } else { + delHifDevice(device); + return -1; + } } @@ -2088,9 +2093,17 @@ static A_STATUS hifEnableFunc(HIF_DEVICE *device, struct sdio_func *func) ret = osdrvCallbacks.deviceInsertedHandler( osdrvCallbacks.context,device); /* start up inform DRV layer */ - if (ret != A_OK) + if (ret != A_OK) { AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6k: Device rejected error:%d \n", ret)); + /* + * Disable the SDIO func & Reset the sdio + * for automated tests to move ahead, where + * the card does not need to be removed at + * the end of the test. + */ + hifDisableFunc(device, func); + } #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) && defined(CONFIG_PM) } else { AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, |
