mirror of https://gitee.com/openkylin/linux.git
ath6kl: propagate errors on hifEnableFunc() failures
This will be passed along to the SDIO probe routine when it fails. This will generate better error code to the user when loading the module if it fails. Cc: Naveen Singh <nsingh@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
0c804c5a57
commit
4f56a12dd5
|
@ -1012,7 +1012,7 @@ static int hifEnableFunc(struct hif_device *device, struct sdio_func *func)
|
||||||
if (ret) {
|
if (ret) {
|
||||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("AR6000: failed to enable 4-bit ASYNC IRQ mode %d \n",ret));
|
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("AR6000: failed to enable 4-bit ASYNC IRQ mode %d \n",ret));
|
||||||
sdio_release_host(func);
|
sdio_release_host(func);
|
||||||
return A_ERROR;
|
return ret;
|
||||||
}
|
}
|
||||||
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: 4-bit ASYNC IRQ mode enabled\n"));
|
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: 4-bit ASYNC IRQ mode enabled\n"));
|
||||||
}
|
}
|
||||||
|
@ -1023,14 +1023,14 @@ static int hifEnableFunc(struct hif_device *device, struct sdio_func *func)
|
||||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERROR, ("AR6000: %s(), Unable to enable AR6K: 0x%X\n",
|
AR_DEBUG_PRINTF(ATH_DEBUG_ERROR, ("AR6000: %s(), Unable to enable AR6K: 0x%X\n",
|
||||||
__FUNCTION__, ret));
|
__FUNCTION__, ret));
|
||||||
sdio_release_host(func);
|
sdio_release_host(func);
|
||||||
return A_ERROR;
|
return ret;
|
||||||
}
|
}
|
||||||
ret = sdio_set_block_size(func, HIF_MBOX_BLOCK_SIZE);
|
ret = sdio_set_block_size(func, HIF_MBOX_BLOCK_SIZE);
|
||||||
sdio_release_host(func);
|
sdio_release_host(func);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERROR, ("AR6000: %s(), Unable to set block size 0x%x AR6K: 0x%X\n",
|
AR_DEBUG_PRINTF(ATH_DEBUG_ERROR, ("AR6000: %s(), Unable to set block size 0x%x AR6K: 0x%X\n",
|
||||||
__FUNCTION__, HIF_MBOX_BLOCK_SIZE, ret));
|
__FUNCTION__, HIF_MBOX_BLOCK_SIZE, ret));
|
||||||
return A_ERROR;
|
return ret;
|
||||||
}
|
}
|
||||||
device->is_disabled = false;
|
device->is_disabled = false;
|
||||||
/* create async I/O thread */
|
/* create async I/O thread */
|
||||||
|
@ -1041,7 +1041,7 @@ static int hifEnableFunc(struct hif_device *device, struct sdio_func *func)
|
||||||
"AR6K Async");
|
"AR6K Async");
|
||||||
if (IS_ERR(device->async_task)) {
|
if (IS_ERR(device->async_task)) {
|
||||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERROR, ("AR6000: %s(), to create async task\n", __FUNCTION__));
|
AR_DEBUG_PRINTF(ATH_DEBUG_ERROR, ("AR6000: %s(), to create async task\n", __FUNCTION__));
|
||||||
return A_ERROR;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: start async task\n"));
|
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: start async task\n"));
|
||||||
wake_up_process(device->async_task );
|
wake_up_process(device->async_task );
|
||||||
|
@ -1056,14 +1056,14 @@ static int hifEnableFunc(struct hif_device *device, struct sdio_func *func)
|
||||||
} else {
|
} else {
|
||||||
taskFunc = enable_task;
|
taskFunc = enable_task;
|
||||||
taskName = "AR6K enable";
|
taskName = "AR6K enable";
|
||||||
ret = A_PENDING;
|
ret = -ENOMEM;
|
||||||
#endif /* CONFIG_PM */
|
#endif /* CONFIG_PM */
|
||||||
}
|
}
|
||||||
/* create resume thread */
|
/* create resume thread */
|
||||||
pTask = kthread_create(taskFunc, (void *)device, taskName);
|
pTask = kthread_create(taskFunc, (void *)device, taskName);
|
||||||
if (IS_ERR(pTask)) {
|
if (IS_ERR(pTask)) {
|
||||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERROR, ("AR6000: %s(), to create enabel task\n", __FUNCTION__));
|
AR_DEBUG_PRINTF(ATH_DEBUG_ERROR, ("AR6000: %s(), to create enabel task\n", __FUNCTION__));
|
||||||
return A_ERROR;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
wake_up_process(pTask);
|
wake_up_process(pTask);
|
||||||
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifEnableFunc\n"));
|
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifEnableFunc\n"));
|
||||||
|
|
Loading…
Reference in New Issue