qcacmn: Replace obsolete HIF_ERROR() with hif_err()

Replace obsolete HIF_ERROR() with hif_err().

Change-Id: I9260b47d11c1820bb05d9a7e2bf50d5257ba85ae
CRs-Fixed: 2779720
Dieser Commit ist enthalten in:
Srinivas Girigowda
2020-09-17 13:43:07 -07:00
committet von snandini
Ursprung abb7ffcac0
Commit 9667b145c6
32 geänderte Dateien mit 428 neuen und 538 gelöschten Zeilen

Datei anzeigen

@@ -122,8 +122,7 @@ out:
if (copy_to_user(buf, read_buffer, count)) {
qdf_mem_free(read_buffer);
HIF_ERROR("%s: copy_to_user error in /proc/%s",
__func__, PROCFS_NAME);
hif_err("copy_to_user error in /proc/%s", PROCFS_NAME);
return -EFAULT;
}
qdf_mem_free(read_buffer);
@@ -153,8 +152,7 @@ static ssize_t ath_procfs_diag_write(struct file *file,
if (copy_from_user(write_buffer, buf, count)) {
qdf_mem_free(write_buffer);
HIF_ERROR("%s: copy_to_user error in /proc/%s",
__func__, PROCFS_NAME);
hif_err("copy_to_user error in /proc/%s", PROCFS_NAME);
return -EFAULT;
}
@@ -229,8 +227,7 @@ int athdiag_procfs_init(void *scn)
proc_dir = proc_mkdir(PROCFS_DIR, NULL);
if (!proc_dir) {
remove_proc_entry(PROCFS_DIR, NULL);
HIF_ERROR("%s: Error: Could not initialize /proc/%s",
__func__, PROCFS_DIR);
hif_err("Could not initialize /proc/%s", PROCFS_DIR);
return -ENOMEM;
}
@@ -238,8 +235,7 @@ int athdiag_procfs_init(void *scn)
&athdiag_fops, (void *)scn);
if (!proc_file) {
remove_proc_entry(PROCFS_NAME, proc_dir);
HIF_ERROR("%s: Could not initialize /proc/%s",
__func__, PROCFS_NAME);
hif_err("Could not initialize /proc/%s", PROCFS_NAME);
return -ENOMEM;
}

Datei anzeigen

@@ -221,8 +221,7 @@ QDF_STATUS hif_exchange_bmi_msg(struct hif_opaque_softc *hif_ctx,
if (qdf_semaphore_acquire_timeout
(&transaction->bmi_transaction_sem,
HIF_EXCHANGE_BMI_MSG_TIMEOUT)) {
HIF_ERROR("%s: Fatal error, BMI transaction timeout. Please check the HW interface!!",
__func__);
hif_err("BMI transaction timeout. Please check the HW interface!!");
qdf_mem_free(transaction);
return QDF_STATUS_E_TIMEOUT;
}
@@ -239,8 +238,7 @@ QDF_STATUS hif_exchange_bmi_msg(struct hif_opaque_softc *hif_ctx,
&completed_nbytes, &id,
&flags) != QDF_STATUS_SUCCESS) {
if (i++ > BMI_RSP_TO_MILLISEC) {
HIF_ERROR("%s:error, can't get bmi response",
__func__);
hif_err("Can't get bmi response");
status = QDF_STATUS_E_BUSY;
break;
}

Datei anzeigen

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2019 The Linux Foundation. All rights reserved.
* Copyright (c) 2015-2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -163,7 +163,7 @@ QDF_STATUS hif_diag_read_mem(struct hif_opaque_softc *hif_ctx,
ce_diag = hif_state->ce_diag;
if (!ce_diag) {
HIF_ERROR("%s: DIAG CE not present", __func__);
hif_err("DIAG CE not present");
return QDF_STATUS_E_INVAL;
}
/* not supporting diag ce on srng based systems, therefore we know this
@@ -306,7 +306,7 @@ done:
if (status == QDF_STATUS_SUCCESS)
qdf_mem_copy(data, data_buf, orig_nbytes);
else
HIF_ERROR("%s failure (0x%x)", __func__, address);
hif_err("Failure (0x%x)", address);
if (data_buf)
qdf_mem_free_consistent(scn->qdf_dev, scn->qdf_dev->dev,
@@ -368,7 +368,7 @@ QDF_STATUS hif_diag_write_mem(struct hif_opaque_softc *hif_ctx,
ce_diag = hif_state->ce_diag;
if (!ce_diag) {
HIF_ERROR("%s: DIAG CE not present", __func__);
hif_err("DIAG CE not present");
return QDF_STATUS_E_INVAL;
}
/* not supporting diag ce on srng based systems, therefore we know this
@@ -495,8 +495,7 @@ done:
}
if (status != QDF_STATUS_SUCCESS) {
HIF_ERROR("%s failure (0x%llx)", __func__,
(uint64_t)ce_phy_addr);
hif_err("Failure (0x%llx)", (uint64_t)ce_phy_addr);
}
return status;

Datei anzeigen

@@ -132,7 +132,7 @@ void hif_trigger_dump(struct hif_opaque_softc *hif_ctx,
break;
#endif
default:
HIF_ERROR("%s: Invalid htc dump command", __func__);
hif_err("Invalid htc dump command: %d", cmd_id);
break;
}
}
@@ -840,7 +840,7 @@ static inline
void hif_select_ce_map_qcn7605(struct service_to_pipe **tgt_svc_map_to_use,
uint32_t *sz_tgt_svc_map_to_use)
{
HIF_ERROR("%s: QCN7605 not supported", __func__);
hif_err("QCN7605 not supported");
}
#endif
@@ -983,7 +983,7 @@ static void ce_ring_test_initial_indexes(int ce_id, struct CE_ring_state *ring,
char *type)
{
if (ring->write_index != 0 || ring->sw_index != 0)
HIF_ERROR("ce %d, %s, initial sw_index = %d, initial write_index =%d",
hif_err("ce %d, %s, initial sw_index = %d, initial write_index =%d",
ce_id, type, ring->sw_index, ring->write_index);
if (ring->write_index != ring->sw_index)
QDF_BUG(0);
@@ -1013,9 +1013,8 @@ static QDF_STATUS ce_alloc_desc_ring(struct hif_softc *scn, unsigned int CE_id,
scn->qdf_dev,
nentries * desc_size + CE_DESC_RING_ALIGN);
if (!scn->ipa_ce_ring) {
HIF_ERROR(
"%s: Failed to allocate memory for IPA ce ring",
__func__);
hif_err(
"Failed to allocate memory for IPA ce ring");
return QDF_STATUS_E_NOMEM;
}
}
@@ -1034,8 +1033,8 @@ static QDF_STATUS ce_alloc_desc_ring(struct hif_softc *scn, unsigned int CE_id,
&ce_ring->is_ring_prealloc);
if (!ce_ring->base_addr_owner_space_unaligned) {
HIF_ERROR("%s: Failed to allocate DMA memory for ce ring id : %u",
__func__, CE_id);
hif_err("Failed to allocate DMA memory for ce ring id: %u",
CE_id);
return QDF_STATUS_E_NOMEM;
}
}
@@ -1088,8 +1087,8 @@ static QDF_STATUS ce_alloc_desc_ring(struct hif_softc *scn, unsigned int CE_id,
&ce_ring->is_ring_prealloc);
if (!ce_ring->base_addr_owner_space_unaligned) {
HIF_ERROR("%s: Failed to allocate DMA memory for ce ring id : %u",
__func__, CE_id);
hif_err("Failed to allocate DMA memory for ce ring id: %u",
CE_id);
return QDF_STATUS_E_NOMEM;
}
return QDF_STATUS_SUCCESS;
@@ -1258,8 +1257,7 @@ static struct CE_ring_state *ce_alloc_ring_state(struct CE_state *CE_state,
ce_ring, nentries,
desc_size) !=
QDF_STATUS_SUCCESS) {
HIF_ERROR("%s: ring has no DMA mem",
__func__);
hif_err("ring has no DMA mem");
qdf_mem_free(ce_ring);
return NULL;
}
@@ -1312,7 +1310,7 @@ int hif_ce_bus_early_suspend(struct hif_softc *scn)
&ul_pipe, &dl_pipe,
&ul_is_polled, &dl_is_polled);
if (status) {
HIF_ERROR("%s: pipe_mapping failure", __func__);
hif_err("pipe_mapping failure");
return status;
}
@@ -1669,7 +1667,7 @@ struct CE_handle *ce_init(struct hif_softc *scn,
* CE_state is allocated locally free
* CE_State and return error.
*/
HIF_ERROR("%s: src ring has no mem", __func__);
hif_err("src ring has no mem");
if (malloc_CE_state) {
/* allocated CE_state locally */
qdf_mem_free(CE_state);
@@ -1726,8 +1724,7 @@ struct CE_handle *ce_init(struct hif_softc *scn,
* or src ring is allocated locally free
* CE_State and src ring and return error.
*/
HIF_ERROR("%s: dest ring has no mem",
__func__);
hif_err("dest ring has no mem");
goto error_no_dma_mem;
}
@@ -2116,8 +2113,8 @@ hif_send_head(struct hif_opaque_softc *hif_ctx,
unsigned int mux_id = 0;
if (nbytes > qdf_nbuf_len(nbuf)) {
HIF_ERROR("%s: nbytes:%d nbuf_len:%d", __func__, nbytes,
(uint32_t)qdf_nbuf_len(nbuf));
hif_err("nbytes: %d nbuf_len: %d", nbytes,
(uint32_t)qdf_nbuf_len(nbuf));
QDF_ASSERT(0);
}
@@ -2155,8 +2152,8 @@ hif_send_head(struct hif_opaque_softc *hif_ctx,
CE_SEND_FLAG_SWAP_DISABLE,
data_attr);
if (status != QDF_STATUS_SUCCESS) {
HIF_ERROR("%s: error, frag_num %d larger than limit",
__func__, nfrags);
hif_err("frag_num: %d larger than limit (status=%d)",
nfrags, status);
return status;
}
bytes -= frag_bytes;
@@ -2174,7 +2171,7 @@ hif_send_head(struct hif_opaque_softc *hif_ctx,
qdf_spin_unlock_bh(&pipe_info->completion_freeq_lock);
if (qdf_unlikely(!ce_hdl)) {
HIF_ERROR("%s: error CE handle is null", __func__);
hif_err("CE handle is null");
return A_ERROR;
}
@@ -2288,9 +2285,7 @@ static inline void hif_ce_do_recv(struct hif_msg_callbacks *msg_callbacks,
rxCompletionHandler(msg_callbacks->Context,
netbuf, pipe_info->pipe_num);
} else {
HIF_ERROR("%s: Invalid Rx msg buf:%pK nbytes:%d",
__func__, netbuf, nbytes);
hif_err("Invalid Rx msg buf: %pK nbytes: %d", netbuf, nbytes);
qdf_nbuf_free(netbuf);
}
}
@@ -2367,14 +2362,14 @@ static int hif_completion_thread_startup(struct HIF_CE_state *hif_state)
/* daemonize("hif_compl_thread"); */
if (scn->ce_count == 0) {
HIF_ERROR("%s: Invalid ce_count", __func__);
hif_err("ce_count is 0");
return -EINVAL;
}
if (!hif_msg_callbacks ||
!hif_msg_callbacks->rxCompletionHandler ||
!hif_msg_callbacks->txCompletionHandler) {
HIF_ERROR("%s: no completion handler registered", __func__);
hif_err("no completion handler registered");
return -EFAULT;
}
@@ -2454,7 +2449,7 @@ void hif_dump_pipe_debug_count(struct hif_softc *scn)
int pipe_num;
if (!hif_state) {
HIF_ERROR("%s hif_state is NULL", __func__);
hif_err("hif_state is NULL");
return;
}
for (pipe_num = 0; pipe_num < scn->ce_count; pipe_num++) {
@@ -2465,9 +2460,9 @@ void hif_dump_pipe_debug_count(struct hif_softc *scn)
if (pipe_info->nbuf_alloc_err_count > 0 ||
pipe_info->nbuf_dma_err_count > 0 ||
pipe_info->nbuf_ce_enqueue_err_count)
HIF_ERROR(
"%s: pipe_id = %d, recv_bufs_needed = %d, nbuf_alloc_err_count = %u, nbuf_dma_err_count = %u, nbuf_ce_enqueue_err_count = %u",
__func__, pipe_info->pipe_num,
hif_err(
"pipe_id = %d, recv_bufs_needed = %d, nbuf_alloc_err_count = %u, nbuf_dma_err_count = %u, nbuf_ce_enqueue_err_count = %u",
pipe_info->pipe_num,
atomic_read(&pipe_info->recv_bufs_needed),
pipe_info->nbuf_alloc_err_count,
pipe_info->nbuf_dma_err_count,
@@ -2662,7 +2657,7 @@ QDF_STATUS hif_start(struct hif_opaque_softc *hif_ctx)
qdf_status = hif_post_recv_buffers(scn);
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
/* cleanup is done in hif_ce_disable */
HIF_ERROR("%s:failed to post buffers", __func__);
hif_err("Failed to post buffers");
return qdf_status;
}
@@ -3189,7 +3184,7 @@ static inline
void hif_set_ce_config_qcn7605(struct hif_softc *scn,
struct HIF_CE_state *hif_state)
{
HIF_ERROR("QCN7605 not supported");
hif_err("QCN7605 not supported");
}
#endif
@@ -3771,7 +3766,7 @@ u32 shadow_sr_wr_ind_addr(struct hif_softc *scn, u32 ctrl_addr)
addr = SHADOW_VALUE7;
break;
default:
HIF_ERROR("invalid CE ctrl_addr (CE=%d)", ce);
hif_err("Invalid CE ctrl_addr (CE=%d)", ce);
QDF_ASSERT(0);
}
return addr;
@@ -3809,7 +3804,7 @@ u32 shadow_dst_wr_ind_addr(struct hif_softc *scn, u32 ctrl_addr)
addr = SHADOW_VALUE23;
break;
default:
HIF_ERROR("invalid CE ctrl_addr (CE=%d)", ce);
hif_err("Invalid CE ctrl_addr (CE=%d)", ce);
QDF_ASSERT(0);
}
@@ -3833,7 +3828,7 @@ u32 shadow_sr_wr_ind_addr(struct hif_softc *scn, u32 ctrl_addr)
addr = SHADOW_VALUE5;
break;
default:
HIF_ERROR("invalid CE ctrl_addr (CE=%d)", ce);
hif_err("Invalid CE ctrl_addr (CE=%d)", ce);
QDF_ASSERT(0);
}
return addr;
@@ -3873,7 +3868,7 @@ u32 shadow_dst_wr_ind_addr(struct hif_softc *scn, u32 ctrl_addr)
addr = SHADOW_VALUE23;
break;
default:
HIF_ERROR("invalid CE ctrl_addr (CE=%d)", ce);
hif_err("Invalid CE ctrl_addr (CE=%d)", ce);
QDF_ASSERT(0);
}
@@ -3968,8 +3963,8 @@ inline uint32_t DEBUG_CE_SRC_RING_READ_IDX_GET(struct hif_softc *scn,
srri_from_ddr = SRRI_FROM_DDR_ADDR(VADDR_FOR_CE(scn, CE_ctrl_addr));
if (read_from_hw != srri_from_ddr) {
HIF_ERROR("%s: error: read from ddr = %d actual read from register = %d, CE_MISC_INT_STATUS_GET = 0x%x",
__func__, srri_from_ddr, read_from_hw,
hif_err("read from ddr = %d actual read from register = %d, CE_MISC_INT_STATUS_GET = 0x%x",
srri_from_ddr, read_from_hw,
CE_MISC_INT_STATUS_GET(scn, CE_ctrl_addr));
QDF_ASSERT(0);
}
@@ -3987,7 +3982,7 @@ inline uint32_t DEBUG_CE_DEST_RING_READ_IDX_GET(struct hif_softc *scn,
drri_from_ddr = DRRI_FROM_DDR_ADDR(VADDR_FOR_CE(scn, CE_ctrl_addr));
if (read_from_hw != drri_from_ddr) {
HIF_ERROR("error: read from ddr = %d actual read from register = %d, CE_MISC_INT_STATUS_GET = 0x%x",
hif_err("read from ddr = %d actual read from register = %d, CE_MISC_INT_STATUS_GET = 0x%x",
drri_from_ddr, read_from_hw,
CE_MISC_INT_STATUS_GET(scn, CE_ctrl_addr));
QDF_ASSERT(0);
@@ -4025,10 +4020,10 @@ int hif_dump_ce_registers(struct hif_softc *scn)
ce_reg_word_size * sizeof(uint32_t));
if (status != QDF_STATUS_SUCCESS) {
HIF_ERROR("Dumping CE register failed!");
hif_err("Dumping CE register failed!");
return -EACCES;
}
HIF_ERROR("CE%d=>\n", i);
hif_debug("CE%d=>", i);
qdf_trace_hex_dump(QDF_MODULE_ID_HIF, QDF_TRACE_LEVEL_DEBUG,
(uint8_t *) &ce_reg_values[0],
ce_reg_word_size * sizeof(uint32_t));
@@ -4246,7 +4241,7 @@ int hif_get_wake_ce_id(struct hif_softc *scn, uint8_t *ce_id)
&ul_pipe, &dl_pipe,
&ul_is_polled, &dl_is_polled);
if (status) {
HIF_ERROR("%s: failed to map pipe: %d", __func__, status);
hif_err("Failed to map pipe: %d", status);
return status;
}

Datei anzeigen

@@ -501,7 +501,7 @@ qdf_nbuf_t ce_batch_send(struct CE_handle *ce_tx_hdl, qdf_nbuf_t msdu,
if (deltacount < 2) {
if (sendhead)
return msdu;
HIF_ERROR("%s: Out of descriptors", __func__);
hif_err("Out of descriptors");
src_ring->write_index = write_index;
war_ce_src_ring_write_idx_set(scn, ctrl_addr,
write_index);
@@ -625,9 +625,8 @@ QDF_STATUS ce_send_single(struct CE_handle *ce_tx_hdl, qdf_nbuf_t msdu,
if (qdf_unlikely(CE_RING_DELTA(nentries_mask, write_index,
sw_index-1) < 1)) {
/* ol_tx_stats_inc_ring_error(sc->scn->pdev_txrx_handle, 1); */
HIF_ERROR("%s: ce send fail %d %d %d", __func__, nentries_mask,
write_index, sw_index);
hif_err("ce send fail %d %d %d", nentries_mask,
write_index, sw_index);
return QDF_STATUS_E_RESOURCES;
}
@@ -1090,9 +1089,8 @@ more_watermarks:
goto more_completions;
} else {
if (!ce_srng_based(scn)) {
HIF_ERROR(
"%s:Potential infinite loop detected during Rx processing nentries_mask:0x%x sw read_idx:0x%x hw read_idx:0x%x",
__func__,
hif_err(
"Potential infinite loop detected during Rx processing nentries_mask:0x%x sw read_idx:0x%x hw read_idx:0x%x",
CE_state->dest_ring->nentries_mask,
CE_state->dest_ring->sw_index,
CE_DEST_RING_READ_IDX_GET(scn,
@@ -1109,9 +1107,8 @@ more_watermarks:
goto more_completions;
} else {
if (!ce_srng_based(scn)) {
HIF_ERROR(
"%s:Potential infinite loop detected during send completion nentries_mask:0x%x sw read_idx:0x%x hw read_idx:0x%x",
__func__,
hif_err(
"Potential infinite loop detected during send completion nentries_mask:0x%x sw read_idx:0x%x hw read_idx:0x%x",
CE_state->src_ring->nentries_mask,
CE_state->src_ring->sw_index,
CE_SRC_RING_READ_IDX_GET(scn,
@@ -1144,7 +1141,7 @@ int ce_per_engine_service(struct hif_softc *scn, unsigned int CE_id)
return CE_state->receive_count;
if (Q_TARGET_ACCESS_BEGIN(scn) < 0) {
HIF_ERROR("[premature rc=0]");
hif_err("[premature rc=0]");
return 0; /* no work done */
}
@@ -1164,7 +1161,7 @@ int ce_per_engine_service(struct hif_softc *scn, unsigned int CE_id)
qdf_spin_unlock(&CE_state->ce_index_lock);
if (Q_TARGET_ACCESS_END(scn) < 0)
HIF_ERROR("<--[premature rc=%d]", CE_state->receive_count);
hif_err("<--[premature rc=%d]", CE_state->receive_count);
return CE_state->receive_count;
}
qdf_export_symbol(ce_per_engine_service);
@@ -1286,13 +1283,13 @@ ce_send_cb_register(struct CE_handle *copyeng,
struct HIF_CE_state *hif_state;
if (!CE_state) {
HIF_ERROR("%s: Error CE state = NULL", __func__);
hif_err("Error CE state = NULL");
return;
}
scn = CE_state->scn;
hif_state = HIF_GET_CE_STATE(scn);
if (!hif_state) {
HIF_ERROR("%s: Error HIF state = NULL", __func__);
hif_err("Error HIF state = NULL");
return;
}
CE_state->send_context = ce_send_context;
@@ -1324,13 +1321,13 @@ ce_recv_cb_register(struct CE_handle *copyeng,
struct HIF_CE_state *hif_state;
if (!CE_state) {
HIF_ERROR("%s: ERROR CE state = NULL", __func__);
hif_err("ERROR CE state = NULL");
return;
}
scn = CE_state->scn;
hif_state = HIF_GET_CE_STATE(scn);
if (!hif_state) {
HIF_ERROR("%s: Error HIF state = NULL", __func__);
hif_err("Error HIF state = NULL");
return;
}
CE_state->recv_context = CE_recv_context;

Datei anzeigen

@@ -484,8 +484,8 @@ more_data:
if (more_comp_cnt++ < CE_TXRX_COMP_CHECK_THRESHOLD) {
goto more_data;
} else {
HIF_ERROR("%s:Potential infinite loop detected during Rx processing nentries_mask:0x%x sw read_idx:0x%x hw read_idx:0x%x",
__func__, nentries_mask,
hif_err("Potential infinite loop detected during Rx processing nentries_mask:0x%x sw read_idx:0x%x hw read_idx:0x%x",
nentries_mask,
ce_state->dest_ring->sw_index,
CE_DEST_RING_READ_IDX_GET(scn, ctrl_addr));
}

Datei anzeigen

@@ -931,8 +931,7 @@ static void ce_prepare_shadow_register_v2_cfg_srng(struct hif_softc *scn,
int *num_shadow_registers_configured)
{
if (!scn->hal_soc) {
HIF_ERROR("%s: hal not initialized: not initializing shadow config",
__func__);
hif_err("hal not initialized: not initializing shadow config");
return;
}
@@ -940,8 +939,7 @@ static void ce_prepare_shadow_register_v2_cfg_srng(struct hif_softc *scn,
num_shadow_registers_configured);
if (*num_shadow_registers_configured != 0) {
HIF_ERROR("%s: hal shadow register configuration allready constructed",
__func__);
hif_err("hal shadow register configuration allready constructed");
/* return with original configuration*/
return;

Datei anzeigen

@@ -62,14 +62,14 @@ static void reschedule_ce_tasklet_work_handler(struct work_struct *work)
struct HIF_CE_state *hif_ce_state;
if (!scn) {
HIF_ERROR("%s: tasklet scn is null", __func__);
hif_err("tasklet scn is null");
return;
}
hif_ce_state = HIF_GET_CE_STATE(scn);
if (scn->hif_init_done == false) {
HIF_ERROR("%s: wlan driver is unloaded", __func__);
hif_err("wlan driver is unloaded");
return;
}
if (hif_ce_state->tasklets[ce_work->id].inited)
@@ -362,8 +362,8 @@ static void ce_tasklet(unsigned long data)
HIF_CE_TASKLET_ENTRY, NULL, NULL, -1, 0);
if (qdf_atomic_read(&scn->link_suspended)) {
HIF_ERROR("%s: ce %d tasklet fired after link suspend.",
__func__, tasklet_entry->ce_id);
hif_err("ce %d tasklet fired after link suspend",
tasklet_entry->ce_id);
QDF_BUG(0);
}
@@ -465,8 +465,8 @@ int hif_drain_tasklets(struct hif_softc *scn)
while ((tasklet_cnt = qdf_atomic_read(&scn->active_tasklet_cnt))) {
if (++ce_drain_wait_cnt > HIF_CE_DRAIN_WAIT_CNT) {
HIF_ERROR("%s: CE still not done with access: %d",
__func__, tasklet_cnt);
hif_err("CE still not done with access: %d",
tasklet_cnt);
return -EFAULT;
}
@@ -496,7 +496,7 @@ static bool hif_interrupt_is_ut_resume(struct hif_softc *scn, int ce_id)
/* ensure passed ce_id matches wake ce_id */
errno = hif_get_wake_ce_id(scn, &wake_ce_id);
if (errno) {
HIF_ERROR("%s: failed to get wake CE Id: %d", __func__, errno);
hif_err("Failed to get wake CE Id: %d", errno);
return false;
}
@@ -626,13 +626,13 @@ irqreturn_t ce_dispatch_interrupt(int ce_id,
struct hif_opaque_softc *hif_hdl = GET_HIF_OPAQUE_HDL(scn);
if (tasklet_entry->ce_id != ce_id) {
HIF_ERROR("%s: ce_id (expect %d, received %d) does not match",
__func__, tasklet_entry->ce_id, ce_id);
hif_err("ce_id (expect %d, received %d) does not match",
tasklet_entry->ce_id, ce_id);
return IRQ_NONE;
}
if (unlikely(ce_id >= CE_COUNT_MAX)) {
HIF_ERROR("%s: ce_id=%d > CE_COUNT_MAX=%d",
__func__, tasklet_entry->ce_id, CE_COUNT_MAX);
hif_err("ce_id=%d > CE_COUNT_MAX=%d",
tasklet_entry->ce_id, CE_COUNT_MAX);
return IRQ_NONE;
}
@@ -708,8 +708,7 @@ QDF_STATUS ce_unregister_irq(struct HIF_CE_state *hif_ce_state, uint32_t mask)
ret = hif_napi_event(GET_HIF_OPAQUE_HDL(scn),
NAPI_EVT_INT_STATE, (void *)0);
if (ret != 0)
HIF_ERROR("%s: napi_event INT_STATE returned %d",
__func__, ret);
hif_err("napi_event INT_STATE returned %d", ret);
/* this is not fatal, continue */
/* filter mask to free only for ce's with irq registered */
@@ -719,9 +718,9 @@ QDF_STATUS ce_unregister_irq(struct HIF_CE_state *hif_ce_state, uint32_t mask)
ret = pld_ce_free_irq(scn->qdf_dev->dev, id,
&hif_ce_state->tasklets[id]);
if (ret < 0)
HIF_ERROR(
"%s: pld_unregister_irq error - ce_id = %d, ret = %d",
__func__, id, ret);
hif_err(
"pld_unregister_irq error - ce_id = %d, ret = %d",
id, ret);
}
ce_disable_polling(scn->ce_id_to_state[id]);
}
@@ -757,9 +756,9 @@ QDF_STATUS ce_register_irq(struct HIF_CE_state *hif_ce_state, uint32_t mask)
irqflags, ce_name[id],
&hif_ce_state->tasklets[id]);
if (ret) {
HIF_ERROR(
"%s: cannot register CE %d irq handler, ret = %d",
__func__, id, ret);
hif_err(
"cannot register CE %d irq handler, ret = %d",
id, ret);
ce_unregister_irq(hif_ce_state, done_mask);
return QDF_STATUS_E_FAULT;
}

Datei anzeigen

@@ -357,8 +357,7 @@ int hif_dummy_bus_reset_resume(struct hif_softc *hif_ctx)
int hif_dummy_map_ce_to_irq(struct hif_softc *scn, int ce_id)
{
HIF_ERROR("%s: hif_map_ce_to_irq is not implemented on this platform",
__func__);
hif_err("hif_map_ce_to_irq is not implemented on this platform");
QDF_BUG(0);
return -(1);
}

Datei anzeigen

@@ -82,7 +82,7 @@ static QDF_STATUS hif_verify_basic_ops(struct hif_softc *hif_sc)
for (i = 0; i < NUM_OPS; i++) {
if (!ops_array[i]) {
HIF_ERROR("%s: function %d is null", __func__, i);
hif_err("ops_array[%d] is null", i);
status = QDF_STATUS_E_NOSUPPORT;
}
}
@@ -153,7 +153,7 @@ QDF_STATUS hif_bus_open(struct hif_softc *hif_sc,
}
if (status != QDF_STATUS_SUCCESS) {
HIF_ERROR("%s: %d not supported", __func__, bus_type);
hif_err("bus_type: %d not supported", bus_type);
return status;
}

Datei anzeigen

@@ -94,7 +94,7 @@ int hif_snoc_get_context_size(void);
#else
static inline QDF_STATUS hif_initialize_snoc_ops(struct hif_bus_ops *hif_sc)
{
HIF_ERROR("%s: not supported", __func__);
hif_warn("not supported");
return QDF_STATUS_E_NOSUPPORT;
}
/**
@@ -114,7 +114,7 @@ int hif_pci_get_context_size(void);
#else
static inline QDF_STATUS hif_initialize_pci_ops(struct hif_softc *hif_sc)
{
HIF_ERROR("%s: not supported", __func__);
hif_warn("not supported");
return QDF_STATUS_E_NOSUPPORT;
}
/**
@@ -146,7 +146,7 @@ int hif_ipci_get_context_size(void);
#else
static inline QDF_STATUS hif_initialize_ipci_ops(struct hif_softc *hif_sc)
{
HIF_ERROR("%s: not supported", __func__);
hif_warn("not supported");
return QDF_STATUS_E_NOSUPPORT;
}
@@ -172,7 +172,7 @@ int hif_ahb_get_context_size(void);
*/
static inline QDF_STATUS hif_initialize_ahb_ops(struct hif_bus_ops *bus_ops)
{
HIF_ERROR("%s: not supported", __func__);
hif_warn("not supported");
return QDF_STATUS_E_NOSUPPORT;
}
@@ -199,7 +199,7 @@ int hif_sdio_get_context_size(void);
static inline QDF_STATUS hif_initialize_sdio_ops(struct hif_softc *hif_sc)
{
HIF_ERROR("%s: not supported", __func__);
hif_warn("not supported");
return QDF_STATUS_E_NOSUPPORT;
}
@@ -222,7 +222,7 @@ int hif_usb_get_context_size(void);
#else
static inline QDF_STATUS hif_initialize_usb_ops(struct hif_bus_ops *bus_ops)
{
HIF_ERROR("%s: not supported", __func__);
hif_warn("not supported");
return QDF_STATUS_E_NOSUPPORT;
}
/**

Datei anzeigen

@@ -809,7 +809,7 @@ QDF_STATUS hif_configure_ext_group_interrupts(struct hif_opaque_softc *hif_ctx)
int i, status;
if (scn->ext_grp_irq_configured) {
HIF_ERROR("%s Called after ext grp irq configured\n", __func__);
hif_err("Called after ext grp irq configured");
return QDF_STATUS_E_FAILURE;
}
@@ -823,7 +823,7 @@ QDF_STATUS hif_configure_ext_group_interrupts(struct hif_opaque_softc *hif_ctx)
status = hif_grp_irq_configure(scn, hif_ext_group);
}
if (status != 0) {
HIF_ERROR("%s: failed for group %d", __func__, i);
hif_err("Failed for group %d", i);
hif_ext_group->irq_enabled = false;
}
}
@@ -964,17 +964,17 @@ QDF_STATUS hif_register_ext_group(struct hif_opaque_softc *hif_ctx,
struct hif_exec_context *hif_ext_group;
if (scn->ext_grp_irq_configured) {
HIF_ERROR("%s Called after ext grp irq configured\n", __func__);
hif_err("Called after ext grp irq configured");
return QDF_STATUS_E_FAILURE;
}
if (hif_state->hif_num_extgroup >= HIF_MAX_GROUP) {
HIF_ERROR("%s Max groups reached\n", __func__);
hif_err("Max groups: %d reached", hif_state->hif_num_extgroup);
return QDF_STATUS_E_FAILURE;
}
if (numirq >= HIF_MAX_GRP_IRQ) {
HIF_ERROR("%s invalid numirq\n", __func__);
hif_err("Invalid numirq: %d", numirq);
return QDF_STATUS_E_FAILURE;
}

Datei anzeigen

@@ -200,8 +200,8 @@ int hif_exec_event(struct hif_opaque_softc *hif_ctx, enum qca_napi_event event,
break;
}
default: {
HIF_ERROR("%s: unknown event: %d (data=0x%0lx)",
__func__, event, (unsigned long) data);
hif_err("Unknown event: %d (data=0x%0lx)",
event, (unsigned long) data);
break;
} /* default */
}; /* switch */

Datei anzeigen

@@ -256,8 +256,7 @@ void hif_save_htc_htt_config_endpoint(struct hif_opaque_softc *hif_ctx,
struct hif_softc *scn = HIF_GET_SOFTC(hif_ctx);
if (!scn) {
HIF_ERROR("%s: error: scn or scn->hif_sc is NULL!",
__func__);
hif_err("scn or scn->hif_sc is NULL!");
return;
}
@@ -646,16 +645,13 @@ struct hif_opaque_softc *hif_open(qdf_device_t qdf_ctx,
int bus_context_size = hif_bus_get_context_size(bus_type);
if (bus_context_size == 0) {
HIF_ERROR("%s: context size 0 not allowed", __func__);
hif_err("context size 0 not allowed");
return NULL;
}
scn = (struct hif_softc *)qdf_mem_malloc(bus_context_size);
if (!scn) {
HIF_ERROR("%s: cannot alloc memory for HIF context of size:%d",
__func__, bus_context_size);
if (!scn)
return GET_HIF_OPAQUE_HDL(scn);
}
scn->qdf_dev = qdf_ctx;
scn->hif_con_param = mode;
@@ -672,8 +668,8 @@ struct hif_opaque_softc *hif_open(qdf_device_t qdf_ctx,
hif_set_event_hist_mask(GET_HIF_OPAQUE_HDL(scn));
status = hif_bus_open(scn, bus_type);
if (status != QDF_STATUS_SUCCESS) {
HIF_ERROR("%s: hif_bus_open error = %d, bus_type = %d",
__func__, status, bus_type);
hif_err("hif_bus_open error = %d, bus_type = %d",
status, bus_type);
qdf_mem_free(scn);
scn = NULL;
}
@@ -710,7 +706,7 @@ void hif_close(struct hif_opaque_softc *hif_ctx)
struct hif_softc *scn = HIF_GET_SOFTC(hif_ctx);
if (!scn) {
HIF_ERROR("%s: hif_opaque_softc is NULL", __func__);
hif_err("hif_opaque_softc is NULL");
return;
}
@@ -861,25 +857,24 @@ QDF_STATUS hif_enable(struct hif_opaque_softc *hif_ctx, struct device *dev,
struct hif_softc *scn = HIF_GET_SOFTC(hif_ctx);
if (!scn) {
HIF_ERROR("%s: hif_ctx = NULL", __func__);
hif_err("hif_ctx = NULL");
return QDF_STATUS_E_NULL_VALUE;
}
status = hif_enable_bus(scn, dev, bdev, bid, type);
if (status != QDF_STATUS_SUCCESS) {
HIF_ERROR("%s: hif_enable_bus error = %d",
__func__, status);
hif_err("hif_enable_bus error = %d", status);
return status;
}
status = hif_hal_attach(scn);
if (status != QDF_STATUS_SUCCESS) {
HIF_ERROR("%s: hal attach failed", __func__);
hif_err("hal attach failed");
goto disable_bus;
}
if (hif_bus_configure(scn)) {
HIF_ERROR("%s: Target probe failed.", __func__);
hif_err("Target probe failed");
status = QDF_STATUS_E_FAILURE;
goto hal_detach;
}
@@ -974,7 +969,7 @@ static void hif_crash_shutdown_dump_bus_register(void *hif_ctx)
return;
if (hif_dump_registers(scn))
HIF_ERROR("Failed to dump bus registers!");
hif_err("Failed to dump bus registers!");
}
/**
@@ -1006,7 +1001,7 @@ void hif_crash_shutdown(struct hif_opaque_softc *hif_ctx)
}
if (hif_is_load_or_unload_in_progress(scn)) {
HIF_ERROR("%s: Load/unload is in progress, ignore!", __func__);
hif_err("Load/unload is in progress, ignore!");
return;
}
@@ -1099,8 +1094,8 @@ int hif_get_device_type(uint32_t device_id,
break;
default:
HIF_ERROR("%s: error - dev_id = 0x%x, rev_id = 0x%x",
__func__, device_id, revision_id);
hif_err("dev_id = 0x%x, rev_id = 0x%x",
device_id, revision_id);
ret = -ENODEV;
goto end;
}
@@ -1217,14 +1212,13 @@ int hif_get_device_type(uint32_t device_id,
break;
default:
HIF_ERROR("%s: Unsupported device ID = 0x%x!",
__func__, device_id);
hif_err("Unsupported device ID = 0x%x!", device_id);
ret = -ENODEV;
break;
}
if (*target_type == TARGET_TYPE_UNKNOWN) {
HIF_ERROR("%s: Unsupported target_type!", __func__);
hif_err("Unsupported target_type!");
ret = -ENODEV;
}
end:
@@ -1287,7 +1281,7 @@ void hif_offld_flush_cb_register(struct hif_opaque_softc *scn,
if (hif_napi_enabled(scn, -1))
hif_napi_rx_offld_flush_cb_register(scn, offld_flush_handler);
else
HIF_ERROR("NAPI not enabled\n");
hif_err("NAPI not enabled");
}
qdf_export_symbol(hif_offld_flush_cb_register);
@@ -1296,7 +1290,7 @@ void hif_offld_flush_cb_deregister(struct hif_opaque_softc *scn)
if (hif_napi_enabled(scn, -1))
hif_napi_rx_offld_flush_cb_deregister(scn);
else
HIF_ERROR("NAPI not enabled\n");
hif_err("NAPI not enabled");
}
qdf_export_symbol(hif_offld_flush_cb_deregister);

Datei anzeigen

@@ -65,7 +65,7 @@ QDF_STATUS hif_ce_fastpath_cb_register(struct hif_opaque_softc *hif_ctx,
int i;
if (!scn) {
HIF_ERROR("%s: scn is NULL", __func__);
hif_err("scn is NULL");
QDF_ASSERT(0);
return QDF_STATUS_E_FAILURE;
}

Datei anzeigen

@@ -66,7 +66,7 @@ enum napi_decision_vector {
*/
static int hif_rxthread_napi_poll(struct napi_struct *napi, int budget)
{
HIF_ERROR("This napi_poll should not be polled as we don't schedule it");
hif_err("This napi_poll should not be polled as we don't schedule it");
QDF_ASSERT(0);
return 0;
}
@@ -156,7 +156,7 @@ int hif_napi_create(struct hif_opaque_softc *hif_ctx,
rc = hif_napi_cpu_init(hif_ctx);
if (rc != 0 && rc != -EALREADY) {
HIF_ERROR("NAPI_initialization failed,. %d", rc);
hif_err("NAPI_initialization failed(rc=%d)", rc);
rc = napid->ce_map;
goto hnc_err;
} else
@@ -267,7 +267,7 @@ void hif_napi_rx_offld_flush_cb_register(struct hif_opaque_softc *hif_hdl,
struct qca_napi_info *napii;
if (!scn) {
HIF_ERROR("%s: hif_state NULL!", __func__);
hif_err("hif_state NULL!");
QDF_ASSERT(0);
return;
}
@@ -293,7 +293,7 @@ void hif_napi_rx_offld_flush_cb_deregister(struct hif_opaque_softc *hif_hdl)
struct qca_napi_info *napii;
if (!scn) {
HIF_ERROR("%s: hif_state NULL!", __func__);
hif_err("hif_state NULL!");
QDF_ASSERT(0);
return;
}
@@ -342,15 +342,13 @@ int hif_napi_destroy(struct hif_opaque_softc *hif_ctx,
NAPI_DEBUG("-->(id=%d, force=%d)", id, force);
if (0 == (hif->napi_data.state & HIF_NAPI_INITED)) {
HIF_ERROR("%s: NAPI not initialized or entry %d not created",
__func__, id);
hif_err("NAPI not initialized or entry %d not created", id);
rc = -EINVAL;
} else if (0 == (hif->napi_data.ce_map & (0x01 << ce))) {
HIF_ERROR("%s: NAPI instance %d (pipe %d) not created",
__func__, id, ce);
hif_err("NAPI instance %d (pipe %d) not created", id, ce);
if (hif->napi_data.napis[ce])
HIF_ERROR("%s: memory allocated but ce_map not set %d (pipe %d)",
__func__, id, ce);
hif_err("memory allocated but ce_map not set %d (pipe %d)",
id, ce);
rc = -EINVAL;
} else {
struct qca_napi_data *napid;
@@ -360,8 +358,7 @@ int hif_napi_destroy(struct hif_opaque_softc *hif_ctx,
napii = napid->napis[ce];
if (!napii) {
if (napid->ce_map & (0x01 << ce))
HIF_ERROR("%s: napii & ce_map out of sync(ce %d)",
__func__, ce);
hif_err("napii & ce_map out of sync(ce %d)", ce);
return -EINVAL;
}
@@ -373,8 +370,7 @@ int hif_napi_destroy(struct hif_opaque_softc *hif_ctx,
__func__, id);
NAPI_DEBUG("NAPI %d force disabled", id);
} else {
HIF_ERROR("%s: Cannot destroy active NAPI %d",
__func__, id);
hif_err("Cannot destroy active NAPI %d", id);
rc = -EPERM;
}
}
@@ -642,8 +638,8 @@ int hif_napi_event(struct hif_opaque_softc *hif_ctx, enum qca_napi_event event,
break;
}
default: {
HIF_ERROR("%s: unknown event: %d (data=0x%0lx)",
__func__, event, (unsigned long) data);
hif_err("Unknown event: %d (data=0x%0lx)",
event, (unsigned long) data);
break;
} /* default */
}; /* switch */
@@ -780,8 +776,7 @@ bool hif_napi_schedule(struct hif_opaque_softc *hif_ctx, int ce_id)
napii = scn->napi_data.napis[ce_id];
if (qdf_unlikely(!napii)) {
HIF_ERROR("%s, scheduling unallocated napi (ce:%d)",
__func__, ce_id);
hif_err("scheduling unallocated napi (ce:%d)", ce_id);
qdf_atomic_dec(&scn->active_tasklet_cnt);
return false;
}
@@ -840,8 +835,7 @@ bool hif_napi_correct_cpu(struct qca_napi_info *napi_info)
irq_modify_status(napi_info->irq, 0, IRQ_NO_BALANCING);
if (rc)
HIF_ERROR("error setting irq affinity hint: %d",
rc);
hif_err("Setting irq affinity hint: %d", rc);
else
napi_info->stats[cpu].cpu_corrected++;
}
@@ -902,7 +896,7 @@ int hif_napi_poll(struct hif_opaque_softc *hif_ctx,
struct CE_state *ce_state = NULL;
if (unlikely(!hif)) {
HIF_ERROR("%s: hif context is NULL", __func__);
hif_err("hif context is NULL");
QDF_ASSERT(0);
goto out;
}
@@ -936,10 +930,10 @@ int hif_napi_poll(struct hif_opaque_softc *hif_ctx,
(QCA_NAPI_BUDGET / QCA_NAPI_NUM_BUCKETS);
if (bucket >= QCA_NAPI_NUM_BUCKETS) {
bucket = QCA_NAPI_NUM_BUCKETS - 1;
HIF_ERROR("Bad bucket#(%d) > QCA_NAPI_NUM_BUCKETS(%d)"
" normalized %d, napi budget %d",
bucket, QCA_NAPI_NUM_BUCKETS,
normalized, QCA_NAPI_BUDGET);
hif_err("Bad bucket#(%d) > QCA_NAPI_NUM_BUCKETS(%d)"
" normalized %d, napi budget %d",
bucket, QCA_NAPI_NUM_BUCKETS,
normalized, QCA_NAPI_BUDGET);
}
napi_info->stats[cpu].napi_budget_uses[bucket]++;
} else {

Datei anzeigen

@@ -619,8 +619,7 @@ static void __hif_runtime_pm_set_state(struct hif_softc *scn,
struct hif_runtime_pm_ctx *rpm_ctx = hif_bus_get_rpm_ctx(scn);
if (!rpm_ctx) {
HIF_ERROR("%s: HIF_CTX not initialized",
__func__);
hif_err("HIF_CTX not initialized");
return;
}
@@ -748,7 +747,7 @@ int hif_pre_runtime_suspend(struct hif_opaque_softc *hif_ctx)
struct hif_softc *scn = HIF_GET_SOFTC(hif_ctx);
if (!hif_can_suspend_link(hif_ctx)) {
HIF_ERROR("Runtime PM not supported for link up suspend");
hif_err("Runtime PM not supported for link up suspend");
return -EINVAL;
}
@@ -811,7 +810,7 @@ int hif_runtime_suspend(struct hif_opaque_softc *hif_ctx)
errno = hif_bus_suspend(hif_ctx);
if (errno) {
HIF_ERROR("%s: failed bus suspend: %d", __func__, errno);
hif_err("Failed bus suspend: %d", errno);
return errno;
}
@@ -819,7 +818,7 @@ int hif_runtime_suspend(struct hif_opaque_softc *hif_ctx)
errno = hif_bus_suspend_noirq(hif_ctx);
if (errno) {
HIF_ERROR("%s: failed bus suspend noirq: %d", __func__, errno);
hif_err("Failed bus suspend noirq: %d", errno);
hif_pm_runtime_set_monitor_wake_intr(hif_ctx, 0);
goto bus_resume;
}
@@ -878,7 +877,7 @@ int hif_runtime_resume(struct hif_opaque_softc *hif_ctx)
QDF_BUG(!hif_bus_resume_noirq(hif_ctx));
errno = hif_bus_resume(hif_ctx);
if (errno)
HIF_ERROR("%s: failed runtime resume: %d", __func__, errno);
hif_err("Failed runtime resume: %d", errno);
return errno;
}
@@ -1209,8 +1208,7 @@ int hif_pm_runtime_put(struct hif_opaque_softc *hif_ctx,
char *error = NULL;
if (!scn) {
HIF_ERROR("%s: Could not do runtime put, scn is null",
__func__);
hif_err("Could not do runtime put, scn is null");
return -EFAULT;
}
@@ -1560,7 +1558,7 @@ void hif_runtime_lock_deinit(struct hif_opaque_softc *hif_ctx,
struct hif_pm_runtime_lock *context = data;
if (!context) {
HIF_ERROR("Runtime PM wakelock context is NULL");
hif_err("Runtime PM wakelock context is NULL");
return;
}

Datei anzeigen

@@ -83,7 +83,7 @@ void hif_ipci_clear_stats(struct hif_softc *hif_ctx)
struct hif_ipci_softc *ipci_ctx = HIF_GET_IPCI_SOFTC(hif_ctx);
if (!ipci_ctx) {
HIF_ERROR("%s, hif_ctx null", __func__);
hif_err("hif_ctx null");
return;
}
hif_clear_ce_stats(&ipci_ctx->ce_sc);
@@ -131,8 +131,7 @@ int hif_ipci_bus_configure(struct hif_softc *hif_sc)
status = hif_wlan_enable(hif_sc);
if (status) {
HIF_ERROR("%s: hif_wlan_enable error = %d",
__func__, status);
hif_err("hif_wlan_enable error = %d", status);
goto timer_free;
}
@@ -170,7 +169,7 @@ timer_free:
qdf_timer_free(&hif_state->sleep_timer);
hif_state->sleep_timer_init = false;
HIF_ERROR("%s: failed, status = %d", __func__, status);
hif_err("Failed, status = %d", status);
return status;
}
@@ -298,8 +297,7 @@ void hif_ipci_prevent_linkdown(struct hif_softc *scn, bool flag)
errno = pld_wlan_pm_control(scn->qdf_dev->dev, flag);
if (errno)
HIF_ERROR("%s: Failed pld_wlan_pm_control; errno %d",
__func__, errno);
hif_err("Failed pld_wlan_pm_control; errno %d", errno);
}
#else
void hif_ipci_prevent_linkdown(struct hif_softc *scn, bool flag)
@@ -365,7 +363,7 @@ int hif_ipci_dump_registers(struct hif_softc *hif_ctx)
status = hif_dump_ce_registers(scn);
if (status)
HIF_ERROR("%s: Dump CE Registers Failed", __func__);
hif_err("Dump CE Registers Failed");
return 0;
}
@@ -546,8 +544,7 @@ int hif_ipci_configure_grp_irq(struct hif_softc *scn,
"wlan_EXT_GRP",
hif_ext_group);
if (ret) {
HIF_ERROR("%s: request_irq failed ret = %d",
__func__, ret);
hif_err("request_irq failed ret = %d", ret);
return -EFAULT;
}
hif_ext_group->os_irq[j] = irq;
@@ -572,8 +569,7 @@ int hif_configure_irq(struct hif_softc *scn)
goto end;
if (ret < 0) {
HIF_ERROR("%s: hif_ipci_configure_irq error = %d",
__func__, ret);
hif_err("hif_ipci_configure_irq error = %d", ret);
return ret;
}
end:
@@ -662,15 +658,14 @@ QDF_STATUS hif_ipci_enable_bus(struct hif_softc *ol_sc,
int device_id = QCA6750_DEVICE_ID;
if (!ol_sc) {
HIF_ERROR("%s: hif_ctx is NULL", __func__);
hif_err("hif_ctx is NULL");
return QDF_STATUS_E_NOMEM;
}
ret = qdf_set_dma_coherent_mask(dev,
DMA_COHERENT_MASK_DEFAULT);
if (ret) {
HIF_ERROR("%s: failed to set dma mask error = %d",
__func__, ret);
hif_err("Failed to set dma mask error = %d", ret);
return qdf_status_from_os_return(ret);
}
@@ -683,7 +678,7 @@ QDF_STATUS hif_ipci_enable_bus(struct hif_softc *ol_sc,
ret = hif_get_device_type(device_id, revision_id,
&hif_type, &target_type);
if (ret < 0) {
HIF_ERROR("%s: invalid device id/revision_id", __func__);
hif_err("Invalid device id/revision_id");
return QDF_STATUS_E_ABORTED;
}
HIF_TRACE("%s: hif_type = 0x%x, target_type = 0x%x",
@@ -695,7 +690,7 @@ QDF_STATUS hif_ipci_enable_bus(struct hif_softc *ol_sc,
tgt_info->target_type = target_type;
if (!ol_sc->mem_pa) {
HIF_ERROR("%s: ERROR - BAR0 uninitialized", __func__);
hif_err("BAR0 uninitialized");
return QDF_STATUS_E_ABORTED;
}

Datei anzeigen

@@ -168,7 +168,7 @@ static inline int hif_get_pci_slot(struct hif_softc *scn)
pci_id = of_get_pci_domain_nr(pcie_node);
#endif
if (pci_id < 0 || pci_id >= WLAN_CFG_MAX_PCIE_GROUPS) {
HIF_ERROR("pci_id:%d is invalid", pci_id);
hif_err("pci_id: %d is invalid", pci_id);
QDF_ASSERT(0);
return 0;
}
@@ -322,52 +322,41 @@ irqreturn_t hif_pci_legacy_ce_interrupt_handler(int irq, void *arg)
PCIE_INTR_ENABLE_ADDRESS));
if (tmp == 0xdeadbeef) {
HIF_ERROR("BUG(%s): SoC returns 0xdeadbeef!!",
__func__);
hif_err("SoC returns 0xdeadbeef!!");
pci_read_config_word(sc->pdev, PCI_VENDOR_ID, &val);
HIF_ERROR("%s: PCI Vendor ID = 0x%04x",
__func__, val);
hif_err("PCI Vendor ID = 0x%04x", val);
pci_read_config_word(sc->pdev, PCI_DEVICE_ID, &val);
HIF_ERROR("%s: PCI Device ID = 0x%04x",
__func__, val);
hif_err("PCI Device ID = 0x%04x", val);
pci_read_config_word(sc->pdev, PCI_COMMAND, &val);
HIF_ERROR("%s: PCI Command = 0x%04x", __func__,
val);
hif_err("PCI Command = 0x%04x", val);
pci_read_config_word(sc->pdev, PCI_STATUS, &val);
HIF_ERROR("%s: PCI Status = 0x%04x", __func__,
val);
hif_err("PCI Status = 0x%04x", val);
pci_read_config_dword(sc->pdev, PCI_BASE_ADDRESS_0,
&bar0);
HIF_ERROR("%s: PCI BAR0 = 0x%08x", __func__,
bar0);
hif_err("PCI BAR0 = 0x%08x", bar0);
HIF_ERROR("%s: RTC_STATE_ADDRESS = 0x%08x",
__func__,
hif_read32_mb(sc, sc->mem +
PCIE_LOCAL_BASE_ADDRESS
+ RTC_STATE_ADDRESS));
HIF_ERROR("%s: PCIE_SOC_WAKE_ADDRESS = 0x%08x",
__func__,
hif_read32_mb(sc, sc->mem +
PCIE_LOCAL_BASE_ADDRESS
+ PCIE_SOC_WAKE_ADDRESS));
HIF_ERROR("%s: 0x80008 = 0x%08x, 0x8000c = 0x%08x",
__func__,
hif_read32_mb(sc, sc->mem + 0x80008),
hif_read32_mb(sc, sc->mem + 0x8000c));
HIF_ERROR("%s: 0x80010 = 0x%08x, 0x80014 = 0x%08x",
__func__,
hif_read32_mb(sc, sc->mem + 0x80010),
hif_read32_mb(sc, sc->mem + 0x80014));
HIF_ERROR("%s: 0x80018 = 0x%08x, 0x8001c = 0x%08x",
__func__,
hif_read32_mb(sc, sc->mem + 0x80018),
hif_read32_mb(sc, sc->mem + 0x8001c));
hif_err("RTC_STATE_ADDRESS = 0x%08x",
hif_read32_mb(sc, sc->mem +
PCIE_LOCAL_BASE_ADDRESS
+ RTC_STATE_ADDRESS));
hif_err("PCIE_SOC_WAKE_ADDRESS = 0x%08x",
hif_read32_mb(sc, sc->mem +
PCIE_LOCAL_BASE_ADDRESS
+ PCIE_SOC_WAKE_ADDRESS));
hif_err("0x80008 = 0x%08x, 0x8000c = 0x%08x",
hif_read32_mb(sc, sc->mem + 0x80008),
hif_read32_mb(sc, sc->mem + 0x8000c));
hif_err("0x80010 = 0x%08x, 0x80014 = 0x%08x",
hif_read32_mb(sc, sc->mem + 0x80010),
hif_read32_mb(sc, sc->mem + 0x80014));
hif_err("0x80018 = 0x%08x, 0x8001c = 0x%08x",
hif_read32_mb(sc, sc->mem + 0x80018),
hif_read32_mb(sc, sc->mem + 0x8001c));
QDF_BUG(0);
}
@@ -527,7 +516,7 @@ static void hif_pci_device_reset(struct hif_pci_softc *sc)
if (!mem)
return;
HIF_ERROR("%s: Reset Device", __func__);
hif_err("Reset Device");
/*
* NB: If we try to write SOC_GLOBAL_RESET_ADDRESS without first
@@ -738,8 +727,8 @@ int hif_check_soc_status(struct hif_opaque_softc *hif_ctx)
/* Check device ID from PCIe configuration space for link status */
pfrm_read_config_word(sc->pdev, PCI_DEVICE_ID, &device_id);
if (device_id != sc->devid) {
HIF_ERROR("%s: device ID does match (read 0x%x, expect 0x%x)",
__func__, device_id, sc->devid);
hif_err("Device ID does match (read 0x%x, expect 0x%x)",
device_id, sc->devid);
return -EACCES;
}
@@ -758,14 +747,13 @@ int hif_check_soc_status(struct hif_opaque_softc *hif_ctx)
/* Check if taget can be woken up */
while (!hif_targ_is_awake(scn, sc->mem)) {
if (timeout_count >= PCIE_WAKE_TIMEOUT) {
HIF_ERROR("%s: wake up timeout, %08x, %08x",
__func__,
hif_err("wake up timeout, %08x, %08x",
hif_read32_mb(sc, sc->mem +
PCIE_LOCAL_BASE_ADDRESS +
RTC_STATE_ADDRESS),
PCIE_LOCAL_BASE_ADDRESS +
RTC_STATE_ADDRESS),
hif_read32_mb(sc, sc->mem +
PCIE_LOCAL_BASE_ADDRESS +
PCIE_SOC_WAKE_ADDRESS));
PCIE_LOCAL_BASE_ADDRESS +
PCIE_SOC_WAKE_ADDRESS));
return -EACCES;
}
@@ -941,7 +929,7 @@ int hif_pci_dump_registers(struct hif_softc *hif_ctx)
status = hif_dump_ce_registers(scn);
if (status)
HIF_ERROR("%s: Dump CE Registers Failed", __func__);
hif_err("Dump CE Registers Failed");
/* dump non copy engine pci registers */
__hif_pci_dump_registers(scn);
@@ -958,12 +946,12 @@ static void reschedule_tasklet_work_handler(void *arg)
struct hif_softc *scn = HIF_GET_SOFTC(sc);
if (!scn) {
HIF_ERROR("%s: hif_softc is NULL\n", __func__);
hif_err("hif_softc is NULL");
return;
}
if (scn->hif_init_done == false) {
HIF_ERROR("%s: wlan driver is unloaded", __func__);
hif_err("wlan driver is unloaded");
return;
}
@@ -1020,8 +1008,7 @@ static void hif_disable_power_gating(struct hif_opaque_softc *hif_ctx)
struct hif_pci_softc *sc = HIF_GET_PCI_SOFTC(hif_ctx);
if (!scn) {
HIF_ERROR("%s: Could not disable ASPM scn is null",
__func__);
hif_err("Could not disable ASPM scn is null");
return;
}
@@ -1039,8 +1026,7 @@ static void hif_disable_power_gating(struct hif_opaque_softc *hif_ctx)
static void hif_enable_power_gating(struct hif_pci_softc *sc)
{
if (!sc) {
HIF_ERROR("%s: Could not disable ASPM scn is null",
__func__);
hif_err("Could not disable ASPM scn is null");
return;
}
@@ -1065,7 +1051,7 @@ void hif_pci_enable_power_management(struct hif_softc *hif_sc,
uint32_t mode;
if (!pci_ctx) {
HIF_ERROR("%s, hif_ctx null", __func__);
hif_err("hif_ctx null");
return;
}
@@ -1086,8 +1072,7 @@ void hif_pci_enable_power_management(struct hif_softc *hif_sc,
!ce_srng_based(hif_sc)) {
/* allow sleep for PCIE_AWAKE_WHILE_DRIVER_LOAD feature */
if (hif_pci_target_sleep_state_adjust(hif_sc, true, false) < 0)
HIF_ERROR("%s, failed to set target to sleep",
__func__);
hif_err("Failed to set target to sleep");
}
}
@@ -1104,7 +1089,7 @@ void hif_pci_disable_power_management(struct hif_softc *hif_ctx)
struct hif_pci_softc *pci_ctx = HIF_GET_PCI_SOFTC(hif_ctx);
if (!pci_ctx) {
HIF_ERROR("%s, hif_ctx null", __func__);
hif_err("hif_ctx null");
return;
}
@@ -1116,7 +1101,7 @@ void hif_pci_display_stats(struct hif_softc *hif_ctx)
struct hif_pci_softc *pci_ctx = HIF_GET_PCI_SOFTC(hif_ctx);
if (!pci_ctx) {
HIF_ERROR("%s, hif_ctx null", __func__);
hif_err("hif_ctx null");
return;
}
hif_display_ce_stats(hif_ctx);
@@ -1129,7 +1114,7 @@ void hif_pci_clear_stats(struct hif_softc *hif_ctx)
struct hif_pci_softc *pci_ctx = HIF_GET_PCI_SOFTC(hif_ctx);
if (!pci_ctx) {
HIF_ERROR("%s, hif_ctx null", __func__);
hif_err("hif_ctx null");
return;
}
hif_clear_ce_stats(&pci_ctx->ce_sc);
@@ -1446,7 +1431,7 @@ static int hif_set_hia(struct hif_softc *scn)
host_interest_area = 0;
i++;
if (i > HIF_HIA_MAX_POLL_LOOP && (i % 1000 == 0))
HIF_ERROR("%s: poll timeout(%d)", __func__, i);
hif_err("poll timeout: %d", i);
} else {
host_interest_area &= (~0x01);
hif_write32_mb(scn, scn->mem + 0x113014, 0);
@@ -1455,12 +1440,12 @@ static int hif_set_hia(struct hif_softc *scn)
}
if (i >= HIF_HIA_MAX_POLL_LOOP) {
HIF_ERROR("%s: hia polling timeout", __func__);
hif_err("hia polling timeout");
return -EIO;
}
if (host_interest_area == 0) {
HIF_ERROR("%s: host_interest_area = 0", __func__);
hif_err("host_interest_area = 0");
return -EIO;
}
@@ -1483,13 +1468,13 @@ static int hif_set_hia(struct hif_softc *scn)
rv = hif_diag_read_access(hif_hdl, interconnect_targ_addr,
&pcie_state_targ_addr);
if (rv != QDF_STATUS_SUCCESS) {
HIF_ERROR("%s: interconnect_targ_addr = 0x%0x, ret = %d",
__func__, interconnect_targ_addr, rv);
hif_err("interconnect_targ_addr = 0x%0x, ret = %d",
interconnect_targ_addr, rv);
goto done;
}
if (pcie_state_targ_addr == 0) {
rv = QDF_STATUS_E_FAILURE;
HIF_ERROR("%s: pcie state addr is 0", __func__);
hif_err("pcie state addr is 0");
goto done;
}
pipe_cfg_addr = pcie_state_targ_addr +
@@ -1499,13 +1484,12 @@ static int hif_set_hia(struct hif_softc *scn)
pipe_cfg_addr,
&pipe_cfg_targ_addr);
if (rv != QDF_STATUS_SUCCESS) {
HIF_ERROR("%s: pipe_cfg_addr = 0x%0x, ret = %d",
__func__, pipe_cfg_addr, rv);
hif_err("pipe_cfg_addr = 0x%0x, ret = %d", pipe_cfg_addr, rv);
goto done;
}
if (pipe_cfg_targ_addr == 0) {
rv = QDF_STATUS_E_FAILURE;
HIF_ERROR("%s: pipe cfg addr is 0", __func__);
hif_err("pipe cfg addr is 0");
goto done;
}
@@ -1514,7 +1498,7 @@ static int hif_set_hia(struct hif_softc *scn)
target_ce_config_sz);
if (rv != QDF_STATUS_SUCCESS) {
HIF_ERROR("%s: write pipe cfg (%d)", __func__, rv);
hif_err("write pipe cfg: %d", rv);
goto done;
}
@@ -1524,12 +1508,12 @@ static int hif_set_hia(struct hif_softc *scn)
svc_to_pipe_map),
&svc_to_pipe_map);
if (rv != QDF_STATUS_SUCCESS) {
HIF_ERROR("%s: get svc/pipe map (%d)", __func__, rv);
hif_err("get svc/pipe map: %d", rv);
goto done;
}
if (svc_to_pipe_map == 0) {
rv = QDF_STATUS_E_FAILURE;
HIF_ERROR("%s: svc_to_pipe map is 0", __func__);
hif_err("svc_to_pipe map is 0");
goto done;
}
@@ -1538,7 +1522,7 @@ static int hif_set_hia(struct hif_softc *scn)
(uint8_t *) target_service_to_ce_map,
target_service_to_ce_map_sz);
if (rv != QDF_STATUS_SUCCESS) {
HIF_ERROR("%s: write svc/pipe map (%d)", __func__, rv);
hif_err("write svc/pipe map: %d", rv);
goto done;
}
@@ -1548,7 +1532,7 @@ static int hif_set_hia(struct hif_softc *scn)
config_flags),
&pcie_config_flags);
if (rv != QDF_STATUS_SUCCESS) {
HIF_ERROR("%s: get pcie config_flags (%d)", __func__, rv);
hif_err("get pcie config_flags: %d", rv);
goto done;
}
#if (CONFIG_PCIE_ENABLE_L1_CLOCK_GATE)
@@ -1567,7 +1551,7 @@ static int hif_set_hia(struct hif_softc *scn)
(uint8_t *) &pcie_config_flags,
sizeof(pcie_config_flags));
if (rv != QDF_STATUS_SUCCESS) {
HIF_ERROR("%s: write pcie config_flags (%d)", __func__, rv);
hif_err("write pcie config_flags: %d", rv);
goto done;
}
@@ -1581,7 +1565,7 @@ static int hif_set_hia(struct hif_softc *scn)
rv = hif_diag_read_access(hif_hdl, ealloc_targ_addr,
&ealloc_value);
if (rv != QDF_STATUS_SUCCESS) {
HIF_ERROR("%s: get early alloc val (%d)", __func__, rv);
hif_err("get early alloc val: %d", rv);
goto done;
}
@@ -1594,7 +1578,7 @@ static int hif_set_hia(struct hif_softc *scn)
CHIP_ID_ADDRESS |
RTC_SOC_BASE_ADDRESS, &chip_id);
if (rv != QDF_STATUS_SUCCESS) {
HIF_ERROR("%s: get chip id val (%d)", __func__, rv);
hif_err("get chip id val: %d", rv);
goto done;
}
if (CHIP_ID_VERSION_GET(chip_id) == 0xD) {
@@ -1630,7 +1614,7 @@ static int hif_set_hia(struct hif_softc *scn)
ealloc_targ_addr,
ealloc_value);
if (rv != QDF_STATUS_SUCCESS) {
HIF_ERROR("%s: set early alloc val (%d)", __func__, rv);
hif_err("set early alloc val: %d", rv);
goto done;
}
#endif
@@ -1650,7 +1634,7 @@ static int hif_set_hia(struct hif_softc *scn)
rv = hif_diag_read_access(hif_hdl, flag2_targ_addr,
&flag2_value);
if (rv != QDF_STATUS_SUCCESS) {
HIF_ERROR("%s: get option val (%d)", __func__, rv);
hif_err("get option val: %d", rv);
goto done;
}
@@ -1658,7 +1642,7 @@ static int hif_set_hia(struct hif_softc *scn)
rv = hif_diag_write_access(hif_hdl, flag2_targ_addr,
flag2_value);
if (rv != QDF_STATUS_SUCCESS) {
HIF_ERROR("%s: set option val (%d)", __func__, rv);
hif_err("set option val: %d", rv);
goto done;
}
@@ -1696,8 +1680,7 @@ int hif_pci_bus_configure(struct hif_softc *hif_sc)
status = hif_wlan_enable(hif_sc);
if (status) {
HIF_ERROR("%s: hif_wlan_enable error = %d",
__func__, status);
hif_err("hif_wlan_enable error: %d", status);
goto timer_free;
}
@@ -1777,7 +1760,7 @@ timer_free:
qdf_timer_free(&hif_state->sleep_timer);
hif_state->sleep_timer_init = false;
HIF_ERROR("%s: failed, status = %d", __func__, status);
hif_err("Failed, status: %d", status);
return status;
}
@@ -1805,9 +1788,9 @@ static int hif_enable_pci_nopld(struct hif_pci_softc *sc,
pci_read_config_word(pdev, PCI_DEVICE_ID, &device_id);
if (device_id != id->device) {
HIF_ERROR(
"%s: dev id mismatch, config id = 0x%x, probing id = 0x%x",
__func__, device_id, id->device);
hif_err(
"dev id mismatch, config id = 0x%x, probing id = 0x%x",
device_id, id->device);
/* pci link is down, so returing with error code */
return -EIO;
}
@@ -1817,20 +1800,19 @@ static int hif_enable_pci_nopld(struct hif_pci_softc *sc,
*/
#if (!defined(__LINUX_ARM_ARCH__))
if (pci_assign_resource(pdev, BAR_NUM)) {
HIF_ERROR("%s: pci_assign_resource error", __func__);
hif_err("pci_assign_resource error");
return -EIO;
}
#endif
if (pci_enable_device(pdev)) {
HIF_ERROR("%s: pci_enable_device error",
__func__);
hif_err("pci_enable_device error");
return -EIO;
}
/* Request MMIO resources */
ret = pci_request_region(pdev, BAR_NUM, "ath");
if (ret) {
HIF_ERROR("%s: PCI MMIO reservation error", __func__);
hif_err("PCI MMIO reservation error");
ret = -EIO;
goto err_region;
}
@@ -1841,24 +1823,23 @@ static int hif_enable_pci_nopld(struct hif_pci_softc *sc,
*/
ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
if (ret) {
HIF_ERROR("%s: Cannot enable 64-bit pci DMA", __func__);
hif_err("Cannot enable 64-bit pci DMA");
goto err_dma;
}
ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
if (ret) {
HIF_ERROR("%s: Cannot enable 64-bit DMA", __func__);
hif_err("Cannot enable 64-bit DMA");
goto err_dma;
}
#else
ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
if (ret) {
HIF_ERROR("%s: Cannot enable 32-bit pci DMA", __func__);
hif_err("Cannot enable 32-bit pci DMA");
goto err_dma;
}
ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
if (ret) {
HIF_ERROR("%s: Cannot enable 32-bit consistent DMA!",
__func__);
hif_err("Cannot enable 32-bit consistent DMA!");
goto err_dma;
}
#endif
@@ -1871,7 +1852,7 @@ static int hif_enable_pci_nopld(struct hif_pci_softc *sc,
/* Arrange for access to Target SoC registers. */
mem = pci_iomap(pdev, BAR_NUM, 0);
if (!mem) {
HIF_ERROR("%s: PCI iomap error", __func__);
hif_err("PCI iomap error");
ret = -EIO;
goto err_iomap;
}
@@ -1934,7 +1915,7 @@ static void hif_disable_pci(struct hif_pci_softc *sc)
struct hif_softc *ol_sc = HIF_GET_SOFTC(sc);
if (!ol_sc) {
HIF_ERROR("%s: ol_sc = NULL", __func__);
hif_err("ol_sc = NULL");
return;
}
hif_pci_device_reset(sc);
@@ -1967,7 +1948,7 @@ static int hif_pci_probe_tgt_wakeup(struct hif_pci_softc *sc)
PCIE_SOC_WAKE_ADDRESS, PCIE_SOC_WAKE_V_MASK);
while (!hif_targ_is_awake(scn, sc->mem)) {
if (0 == targ_awake_limit) {
HIF_ERROR("%s: target awake timeout", __func__);
hif_err("target awake timeout");
ret = -EAGAIN;
goto end;
}
@@ -2002,8 +1983,7 @@ static int hif_pci_probe_tgt_wakeup(struct hif_pci_softc *sc)
PCIE_SOC_WAKE_ADDRESS, PCIE_SOC_WAKE_RESET);
if (fw_indicator & FW_IND_INITIALIZED) {
HIF_ERROR("%s: Target is in an unknown state. EAGAIN",
__func__);
hif_err("Target is in an unknown state. EAGAIN");
ret = -EAGAIN;
goto end;
}
@@ -2027,7 +2007,7 @@ static int hif_pci_configure_legacy_irq(struct hif_pci_softc *sc)
hif_pci_legacy_ce_interrupt_handler, IRQF_SHARED,
"wlan_pci", sc);
if (ret) {
HIF_ERROR("%s: request_irq failed, ret = %d", __func__, ret);
hif_err("request_irq failed, ret: %d", ret);
goto end;
}
scn->wake_irq = sc->pdev->irq;
@@ -2289,8 +2269,7 @@ void hif_pci_prevent_linkdown(struct hif_softc *scn, bool flag)
errno = pld_wlan_pm_control(scn->qdf_dev->dev, flag);
if (errno)
HIF_ERROR("%s: Failed pld_wlan_pm_control; errno %d",
__func__, errno);
hif_err("Failed pld_wlan_pm_control; errno %d", errno);
}
#else
void hif_pci_prevent_linkdown(struct hif_softc *scn, bool flag)
@@ -2341,7 +2320,7 @@ static int __hif_check_link_status(struct hif_softc *scn)
struct hif_driver_state_callbacks *cbk = hif_get_callbacks_handle(scn);
if (!sc) {
HIF_ERROR("%s: HIF Bus Context is Invalid", __func__);
hif_err("HIF Bus Context is Invalid");
return -EINVAL;
}
@@ -2350,15 +2329,15 @@ static int __hif_check_link_status(struct hif_softc *scn)
if (dev_id == sc->devid)
return 0;
HIF_ERROR("%s: Invalid PCIe Config Space; PCIe link down dev_id:0x%04x",
__func__, dev_id);
hif_err("Invalid PCIe Config Space; PCIe link down dev_id:0x%04x",
dev_id);
scn->recovery = true;
if (cbk && cbk->set_recovery_in_progress)
cbk->set_recovery_in_progress(cbk->context, true);
else
HIF_ERROR("%s: Driver Global Recovery is not set", __func__);
hif_err("Driver Global Recovery is not set");
pld_is_pci_link_down(sc->dev);
return -EACCES;
@@ -2504,38 +2483,37 @@ static int hif_log_soc_wakeup_timeout(struct hif_pci_softc *sc)
struct hif_driver_state_callbacks *cbk = hif_get_callbacks_handle(scn);
A_target_id_t pci_addr = scn->mem;
HIF_ERROR("%s: keep_awake_count = %d",
__func__, hif_state->keep_awake_count);
hif_info("keep_awake_count = %d", hif_state->keep_awake_count);
pfrm_read_config_word(sc->pdev, PCI_VENDOR_ID, &val);
HIF_ERROR("%s: PCI Vendor ID = 0x%04x", __func__, val);
hif_info("PCI Vendor ID = 0x%04x", val);
pfrm_read_config_word(sc->pdev, PCI_DEVICE_ID, &val);
HIF_ERROR("%s: PCI Device ID = 0x%04x", __func__, val);
hif_info("PCI Device ID = 0x%04x", val);
pfrm_read_config_word(sc->pdev, PCI_COMMAND, &val);
HIF_ERROR("%s: PCI Command = 0x%04x", __func__, val);
hif_info("PCI Command = 0x%04x", val);
pfrm_read_config_word(sc->pdev, PCI_STATUS, &val);
HIF_ERROR("%s: PCI Status = 0x%04x", __func__, val);
hif_info("PCI Status = 0x%04x", val);
pfrm_read_config_dword(sc->pdev, PCI_BASE_ADDRESS_0, &bar);
HIF_ERROR("%s: PCI BAR 0 = 0x%08x", __func__, bar);
hif_info("PCI BAR 0 = 0x%08x", bar);
HIF_ERROR("%s: SOC_WAKE_ADDR 0%08x", __func__,
hif_read32_mb(scn, pci_addr + PCIE_LOCAL_BASE_ADDRESS +
PCIE_SOC_WAKE_ADDRESS));
hif_info("SOC_WAKE_ADDR 0%08x",
hif_read32_mb(scn, pci_addr + PCIE_LOCAL_BASE_ADDRESS +
PCIE_SOC_WAKE_ADDRESS));
HIF_ERROR("%s: RTC_STATE_ADDR 0x%08x", __func__,
hif_read32_mb(scn, pci_addr + PCIE_LOCAL_BASE_ADDRESS +
hif_info("RTC_STATE_ADDR 0x%08x",
hif_read32_mb(scn, pci_addr + PCIE_LOCAL_BASE_ADDRESS +
RTC_STATE_ADDRESS));
HIF_ERROR("%s:error, wakeup target", __func__);
hif_info("wakeup target");
hif_msm_pcie_debug_info(sc);
if (!cfg->enable_self_recovery)
@@ -2598,7 +2576,7 @@ int hif_pci_target_sleep_state_adjust(struct hif_softc *scn,
return -EACCES;
if (qdf_atomic_read(&scn->link_suspended)) {
HIF_ERROR("%s:invalid access, PCIe link is down", __func__);
hif_err("Invalid access, PCIe link is down");
debug = true;
QDF_ASSERT(0);
return -EACCES;
@@ -2606,8 +2584,7 @@ int hif_pci_target_sleep_state_adjust(struct hif_softc *scn,
if (debug) {
wait_for_it = true;
HIF_ERROR("%s: doing debug for invalid access, PCIe link is suspended",
__func__);
hif_err("Invalid access, PCIe link is suspended");
QDF_ASSERT(0);
}
@@ -2680,8 +2657,7 @@ int hif_pci_target_sleep_state_adjust(struct hif_softc *scn,
if (debug && hif_state->verified_awake) {
debug = 0;
HIF_ERROR("%s: INTR_ENABLE_REG = 0x%08x, INTR_CAUSE_REG = 0x%08x, CPU_INTR_REG = 0x%08x, INTR_CLR_REG = 0x%08x, CE_INTERRUPT_SUMMARY_REG = 0x%08x",
__func__,
hif_err("INTR_ENABLE_REG = 0x%08x, INTR_CAUSE_REG = 0x%08x, CPU_INTR_REG = 0x%08x, INTR_CLR_REG = 0x%08x, CE_INTERRUPT_SUMMARY_REG = 0x%08x",
hif_read32_mb(sc, sc->mem + SOC_CORE_BASE_ADDRESS +
PCIE_INTR_ENABLE_ADDRESS),
hif_read32_mb(sc, sc->mem + SOC_CORE_BASE_ADDRESS +
@@ -2767,8 +2743,8 @@ void hif_target_dump_access_log(void)
for (idx = 0; idx < len; idx++) {
cur_idx = (start_idx + idx) % PCIE_ACCESS_LOG_NUM;
HIF_ERROR("%s: idx:%d sn:%u wr:%d addr:%pK val:%u.",
__func__, idx,
hif_debug("idx:%d sn:%u wr:%d addr:%pK val:%u",
idx,
pcie_access_log[cur_idx].seqnum,
pcie_access_log[cur_idx].is_write,
pcie_access_log[cur_idx].addr,
@@ -3119,8 +3095,7 @@ int hif_pci_configure_grp_irq(struct hif_softc *scn,
dp_irqname[pci_slot][hif_ext_group->grp_id],
hif_ext_group);
if (ret) {
HIF_ERROR("%s: request_irq failed ret = %d",
__func__, ret);
hif_err("request_irq failed ret = %d", ret);
return -EFAULT;
}
hif_ext_group->os_irq[j] = irq;
@@ -3173,8 +3148,7 @@ int hif_configure_irq(struct hif_softc *scn)
break;
}
if (ret < 0) {
HIF_ERROR("%s: hif_pci_configure_legacy_irq error = %d",
__func__, ret);
hif_err("hif_pci_configure_legacy_irq error = %d", ret);
return ret;
}
end:
@@ -3376,7 +3350,7 @@ QDF_STATUS hif_pci_enable_bus(struct hif_softc *ol_sc,
struct hif_target_info *tgt_info;
if (!ol_sc) {
HIF_ERROR("%s: hif_ctx is NULL", __func__);
hif_err("hif_ctx is NULL");
return QDF_STATUS_E_NOMEM;
}
/* Following print is used by various tools to identify
@@ -3395,8 +3369,7 @@ QDF_STATUS hif_pci_enable_bus(struct hif_softc *ol_sc,
again:
ret = sc->hif_enable_pci(sc, pdev, id);
if (ret < 0) {
HIF_ERROR("%s: ERROR - hif_enable_pci error = %d",
__func__, ret);
hif_err("hif_enable_pci error = %d", ret);
goto err_enable_pci;
}
HIF_TRACE("%s: hif_enable_pci done", __func__);
@@ -3412,7 +3385,7 @@ again:
ret = hif_get_device_type(id->device, revision_id,
&hif_type, &target_type);
if (ret < 0) {
HIF_ERROR("%s: invalid device id/revision_id", __func__);
hif_err("Invalid device id/revision_id");
goto err_tgtstate;
}
HIF_TRACE("%s: hif_type = 0x%x, target_type = 0x%x",
@@ -3436,8 +3409,7 @@ again:
} else {
ret = hif_pci_probe_tgt_wakeup(sc);
if (ret < 0) {
HIF_ERROR("%s: ERROR - hif_pci_prob_wakeup error = %d",
__func__, ret);
hif_err("hif_pci_prob_wakeup error = %d", ret);
if (ret == -EAGAIN)
probe_again++;
goto err_tgtstate;
@@ -3446,7 +3418,7 @@ again:
}
if (!ol_sc->mem_pa) {
HIF_ERROR("%s: ERROR - BAR0 uninitialized", __func__);
hif_err("BAR0 uninitialized");
ret = -EIO;
goto err_tgtstate;
}
@@ -3463,7 +3435,7 @@ again:
err_tgtstate:
hif_disable_pci(sc);
sc->pci_enabled = false;
HIF_ERROR("%s: error, hif_disable_pci done", __func__);
hif_err("hif_disable_pci done");
return QDF_STATUS_E_ABORTED;
err_enable_pci:

Datei anzeigen

@@ -60,7 +60,7 @@ QDF_STATUS hif_start(struct hif_opaque_softc *hif_ctx)
HIF_ENTER();
ret = hif_sdio_bus_configure(hif_sc);
if (ret) {
HIF_ERROR("%s: hif_sdio_bus_configure failed", __func__);
hif_err("hif_sdio_bus_configure failed");
return QDF_STATUS_E_FAILURE;
}

Datei anzeigen

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013-2019 The Linux Foundation. All rights reserved.
* Copyright (c) 2013-2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -104,7 +104,7 @@ struct hif_sdio_device *hif_dev_create(struct hif_sdio_dev *hif_device,
HIF_DEVICE_SET_HTC_CONTEXT,
(void *)pdev, sizeof(pdev));
if (status != QDF_STATUS_SUCCESS)
HIF_ERROR("%s: set context failed", __func__);
hif_err("set context failed");
A_MEMCPY(&pdev->hif_callbacks, callbacks, sizeof(*callbacks));
@@ -127,7 +127,7 @@ void hif_dev_destroy(struct hif_sdio_device *pdev)
HIF_DEVICE_SET_HTC_CONTEXT,
(void *)NULL, 0);
if (status != QDF_STATUS_SUCCESS)
HIF_ERROR("%s: set context failed", __func__);
hif_err("set context failed");
qdf_mem_free(pdev);
}
@@ -149,7 +149,7 @@ struct hif_sdio_device *hif_dev_from_hif(struct hif_sdio_dev *hif_device)
(void **)&pdev,
sizeof(struct hif_sdio_device));
if (status != QDF_STATUS_SUCCESS)
HIF_ERROR("%s: set context failed", __func__);
hif_err("set context failed");
return pdev;
}
@@ -226,7 +226,7 @@ QDF_STATUS hif_dev_setup(struct hif_sdio_device *pdev)
status = hif_dev_setup_device(pdev);
if (status != QDF_STATUS_SUCCESS) {
HIF_ERROR("%s: device specific setup failed", __func__);
hif_err("device specific setup failed");
return QDF_STATUS_E_INVAL;
}

Datei anzeigen

@@ -138,7 +138,7 @@ void hif_get_target_revision(struct hif_softc *ol_sc)
rv = hif_diag_read_access(hif_hdl,
(CHIP_ID_ADDRESS | RTC_SOC_BASE_ADDRESS), &chip_id);
if (rv != QDF_STATUS_SUCCESS) {
HIF_ERROR("%s[%d]: get chip id fail\n", __func__, __LINE__);
hif_err("get chip id fail");
} else {
ol_sc_local->target_info.target_revision =
CHIP_ID_REVISION_GET(chip_id);
@@ -162,7 +162,7 @@ QDF_STATUS hif_sdio_enable_bus(struct hif_softc *ol_sc, struct device *dev,
const struct sdio_device_id *id = (const struct sdio_device_id *)bid;
if (hif_sdio_device_inserted(ol_sc, dev, id)) {
HIF_ERROR("wlan: %s hif_sdio_device_inserted failed", __func__);
hif_err("hif_sdio_device_inserted failed");
return QDF_STATUS_E_NOMEM;
}
@@ -270,7 +270,7 @@ int hif_check_fw_reg(struct hif_opaque_softc *hif_ctx)
if (hif_diag_read_access(hif_ctx, FW_INDICATOR_ADDRESS,
&fw_indication) != QDF_STATUS_SUCCESS) {
HIF_ERROR("%s Get fw indication failed\n", __func__);
hif_err("Get fw indication failed");
return 1;
}
HIF_INFO("%s: fw indication is 0x%x def 0x%x.\n", __func__,

Datei anzeigen

@@ -108,8 +108,7 @@ void hif_sdio_quirk_force_drive_strength(struct hif_softc *ol_sc,
err = func0_cmd52_read_byte(func->card, addr, &value);
if (err) {
HIF_ERROR("%s: read driver strength 0x%02X fail %d\n",
__func__, addr, err);
hif_err("read driver strength 0x%02X fail %d", addr, err);
return;
}
@@ -117,9 +116,8 @@ void hif_sdio_quirk_force_drive_strength(struct hif_softc *ol_sc,
value = (value & ~mask) | SDIO_DTSx_SET_TYPE_D;
err = func0_cmd52_write_byte(func->card, addr, value);
if (err) {
HIF_ERROR("%s: write driver strength failed", __func__);
HIF_ERROR("%s: 0x%02X to 0x%02X failed: %d\n", __func__,
(uint32_t)value, addr, err);
hif_err("Write driver strength 0x%02X to 0x%02X failed: %d",
(uint32_t)value, addr, err);
return;
}
@@ -127,8 +125,7 @@ void hif_sdio_quirk_force_drive_strength(struct hif_softc *ol_sc,
addr = CCCR_SDIO_DRIVER_STRENGTH_ENABLE_ADDR;
err = func0_cmd52_read_byte(func->card, addr, &value);
if (err) {
HIF_ERROR("%s Read CCCR 0x%02X failed: %d\n",
__func__, addr, err);
hif_err("Read CCCR 0x%02X failed: %d", addr, err);
return;
}
@@ -138,8 +135,8 @@ void hif_sdio_quirk_force_drive_strength(struct hif_softc *ol_sc,
CCCR_SDIO_DRIVER_STRENGTH_ENABLE_D;
err = func0_cmd52_write_byte(func->card, addr, value);
if (err)
HIF_ERROR("%s Write CCCR 0x%02X to 0x%02X failed: %d\n",
__func__, addr, value, err);
hif_err("Write CCCR 0x%02X to 0x%02X failed: %d",
addr, value, err);
}
/**
@@ -264,11 +261,10 @@ void hif_sdio_quirk_write_cccr(struct hif_softc *ol_sc, struct sdio_func *func)
err = func0_cmd52_write_byte(func->card, writecccr1,
writecccr1value);
if (err)
HIF_ERROR("%s Write CCCR 0x%02X to 0x%02X failed: %d\n",
__func__,
(unsigned int)writecccr1,
(unsigned int)writecccr1value,
err);
hif_err("Write CCCR 0x%02X to 0x%02X failed: %d",
(unsigned int)writecccr1,
(unsigned int)writecccr1value,
err);
else
HIF_INFO("%s Write CCCR 0x%02X to 0x%02X OK\n",
__func__,
@@ -280,11 +276,10 @@ void hif_sdio_quirk_write_cccr(struct hif_softc *ol_sc, struct sdio_func *func)
err = func0_cmd52_write_byte(func->card, writecccr2,
writecccr2value);
if (err)
HIF_ERROR("%s Write CCCR 0x%02X to 0x%02X failed: %d\n",
__func__,
(unsigned int)writecccr2,
(unsigned int)writecccr2value,
err);
hif_err("Write CCCR 0x%02X to 0x%02X failed: %d",
(unsigned int)writecccr2,
(unsigned int)writecccr2value,
err);
else
HIF_INFO("%s Write CCCR 0x%02X to 0x%02X OK\n",
__func__,
@@ -295,11 +290,10 @@ void hif_sdio_quirk_write_cccr(struct hif_softc *ol_sc, struct sdio_func *func)
err = func0_cmd52_write_byte(func->card, writecccr3,
writecccr3value);
if (err)
HIF_ERROR("%s Write CCCR 0x%02X to 0x%02X failed: %d\n",
__func__,
(unsigned int)writecccr3,
(unsigned int)writecccr3value,
err);
hif_err("Write CCCR 0x%02X to 0x%02X failed: %d",
(unsigned int)writecccr3,
(unsigned int)writecccr3value,
err);
else
HIF_INFO("%s Write CCCR 0x%02X to 0x%02X OK\n",
__func__,
@@ -310,11 +304,10 @@ void hif_sdio_quirk_write_cccr(struct hif_softc *ol_sc, struct sdio_func *func)
err = func0_cmd52_write_byte(func->card, writecccr4,
writecccr4value);
if (err)
HIF_ERROR("%s Write CCCR 0x%02X to 0x%02X failed: %d\n",
__func__,
(unsigned int)writecccr4,
(unsigned int)writecccr4value,
err);
hif_err("Write CCCR 0x%02X to 0x%02X failed: %d",
(unsigned int)writecccr4,
(unsigned int)writecccr4value,
err);
else
HIF_INFO("%s Write CCCR 0x%02X to 0x%02X OK\n",
__func__,
@@ -344,12 +337,12 @@ int hif_sdio_quirk_mod_strength(struct hif_softc *ol_sc, struct sdio_func *func)
return 0;
if (!scn) {
HIF_ERROR("%s: scn is null", __func__);
hif_err("scn is null");
return -1;
}
if (!scn->hostdef) {
HIF_ERROR("%s: scn->hostdef is null", __func__);
hif_err("scn->hostdef is null");
return -1;
}
@@ -361,8 +354,7 @@ int hif_sdio_quirk_mod_strength(struct hif_softc *ol_sc, struct sdio_func *func)
value = 0x0FFF;
ret = sdio_memcpy_toio(func, addr, &value, 4);
if (ret) {
HIF_ERROR("%s write 0x%x 0x%x error:%d\n",
__func__, addr, value, ret);
hif_err("write 0x%x 0x%x error:%d", addr, value, ret);
break;
}
HIF_INFO("%s: addr 0x%x val 0x%x", __func__, addr, value);
@@ -371,8 +363,7 @@ int hif_sdio_quirk_mod_strength(struct hif_softc *ol_sc, struct sdio_func *func)
value = 0x50F8;
ret = sdio_memcpy_toio(func, addr, &value, 4);
if (ret) {
HIF_ERROR("%s write 0x%x 0x%x error:%d\n",
__func__, addr, value, ret);
hif_err("write 0x%x 0x%x error:%d", addr, value, ret);
break;
}
HIF_INFO("%s: addr 0x%x val 0x%x\n", __func__, addr, value);
@@ -392,7 +383,7 @@ static int hif_cmd52_write_byte_8bit(struct sdio_func *func)
#else
static int hif_cmd52_write_byte_8bit(struct sdio_func *func)
{
HIF_ERROR("%s: 8BIT Bus Width not supported\n", __func__);
hif_err("8BIT Bus Width not supported");
return QDF_STATUS_E_FAILURE;
}
#endif
@@ -478,8 +469,7 @@ QDF_STATUS hif_sdio_set_bus_width(struct hif_softc *ol_sc,
SDIO_CCCR_IF,
data);
if (ret)
HIF_ERROR("%s: Bus Width 0x%x failed %d\n",
__func__, data, ret);
hif_err("Bus Width 0x%x failed %d", data, ret);
device->host->ios.bus_width = MMC_BUS_WIDTH_1;
device->host->ops->set_ios(device->host,
&device->host->ios);
@@ -490,8 +480,7 @@ QDF_STATUS hif_sdio_set_bus_width(struct hif_softc *ol_sc,
SDIO_CCCR_IF,
data);
if (ret)
HIF_ERROR("%s: Bus Width 0x%x failed: %d\n",
__func__, data, ret);
hif_err("Bus Width 0x%x failed: %d", data, ret);
device->host->ios.bus_width = MMC_BUS_WIDTH_4;
device->host->ops->set_ios(device->host,
&device->host->ios);
@@ -499,14 +488,12 @@ QDF_STATUS hif_sdio_set_bus_width(struct hif_softc *ol_sc,
(device->host->caps & MMC_CAP_8_BIT_DATA)) {
ret = hif_cmd52_write_byte_8bit(func);
if (ret)
HIF_ERROR("%s: Bus Width 8 failed: %d\n",
__func__, ret);
hif_err("Bus Width 8 failed: %d", ret);
device->host->ios.bus_width = MMC_BUS_WIDTH_8;
device->host->ops->set_ios(device->host,
&device->host->ios);
} else {
HIF_ERROR("%s: Unsupported bus width %d",
__func__, mmcbuswidth);
hif_err("Unsupported bus width %d", mmcbuswidth);
status = QDF_STATUS_E_FAILURE;
goto out;
}
@@ -549,7 +536,7 @@ void hif_mask_interrupt(struct hif_sdio_dev *device)
ret = sdio_release_irq(device->func);
sdio_release_host(device->func);
if (ret)
HIF_ERROR("%s: Failed %d\n", __func__, ret);
hif_err("Failed %d", ret);
HIF_EXIT();
}
@@ -642,7 +629,7 @@ QDF_STATUS hif_sdio_func_disable(struct hif_sdio_dev *device,
if (ret) {
status = QDF_STATUS_E_FAILURE;
HIF_ERROR("%s: reset failed : %d", __func__, ret);
hif_err("reset failed: %d", ret);
}
sdio_release_host(device->func);
@@ -684,8 +671,7 @@ QDF_STATUS reinit_sdio(struct hif_sdio_dev *device)
err = func0_cmd52_read_byte(card, SDIO_CCCR_SPEED,
&cmd52_resp);
if (err) {
HIF_ERROR("%s: CCCR speed set failed : %d",
__func__, err);
hif_err("CCCR speed set failed: %d", err);
sdio_card_state(card);
/* no need to break */
} else {
@@ -694,8 +680,7 @@ QDF_STATUS reinit_sdio(struct hif_sdio_dev *device)
(cmd52_resp |
SDIO_SPEED_EHS));
if (err) {
HIF_ERROR("%s:CCCR speed set failed:%d",
__func__, err);
hif_err("CCCR speed set failed: %d", err);
break;
}
sdio_card_set_highspeed(card);
@@ -729,8 +714,7 @@ QDF_STATUS reinit_sdio(struct hif_sdio_dev *device)
SDIO_BUS_CD_DISABLE |
SDIO_BUS_WIDTH_4BIT);
if (err) {
HIF_ERROR("%s: Set bus mode failed : %d",
__func__, err);
hif_err("Set bus mode failed: %d", err);
break;
}
host->ios.bus_width = MMC_BUS_WIDTH_4;

Datei anzeigen

@@ -348,10 +348,9 @@ QDF_STATUS hif_sdio_probe(struct hif_softc *ol_sc,
pld_hif_sdio_get_virt_ramdump_mem(&func->dev,
&scn->ramdump_size);
if (!scn->ramdump_base || !scn->ramdump_size) {
HIF_ERROR("%s: Failed ramdump res alloc - base:%s, len:%lu",
__func__,
scn->ramdump_base ? "ok" : "null",
scn->ramdump_size);
hf_err("Failed ramdump res alloc - base:%s, len:%lu",
scn->ramdump_base ? "ok" : "null",
scn->ramdump_size);
} else {
HIF_INFO("%s: ramdump base %pK size %lu", __func__,
scn->ramdump_base, scn->ramdump_size);
@@ -507,16 +506,16 @@ hif_configure_device(struct hif_softc *ol_sc, struct hif_sdio_dev *device,
break;
case HIF_DEVICE_GET_HTC_CONTEXT:
if (!config) {
HIF_ERROR("%s: htc context is NULL", __func__);
hif_err("htc context is NULL");
return QDF_STATUS_E_FAILURE;
}
*(void **)config = device->htc_context;
break;
case HIF_BMI_DONE:
HIF_ERROR("%s: BMI_DONE", __func__);
hif_debug("BMI_DONE");
break;
default:
HIF_ERROR("%s: Unsupported opcode: %d", __func__, opcode);
hif_err("Unsupported opcode: %d", opcode);
status = QDF_STATUS_E_FAILURE;
}
@@ -618,7 +617,7 @@ static QDF_STATUS hif_device_inserted(struct hif_softc *ol_sc,
}
}
if (i == MAX_HIF_DEVICES) {
HIF_ERROR("%s: No more slots", __func__);
hif_err("No more slots");
goto del_hif_dev;
}
@@ -812,7 +811,7 @@ int hif_device_suspend(struct hif_softc *ol_sc, struct device *dev)
}
if (sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER)) {
HIF_ERROR("%s: set pm_flags failed", __func__);
hif_err("set pm_flags failed");
return -EINVAL;
}
@@ -825,7 +824,7 @@ int hif_device_suspend(struct hif_softc *ol_sc, struct device *dev)
sizeof(config));
if (sdio_set_host_pm_flags(func, MMC_PM_WAKE_SDIO_IRQ)) {
HIF_ERROR("%s: set pm_flags failed", __func__);
hif_err("set pm_flags failed");
return -EINVAL;
}
hif_mask_interrupt(device);
@@ -851,7 +850,7 @@ int hif_device_resume(struct hif_softc *ol_sc, struct device *dev)
device = get_hif_device(ol_sc, func);
if (!device) {
HIF_ERROR("%s: hif object is null", __func__);
hif_err("hif object is null");
return -EINVAL;
}
@@ -1021,8 +1020,7 @@ int func0_cmd52_write_byte(struct mmc_card *card,
status = mmc_wait_for_cmd(card->host, &io_cmd, 0);
if (status)
HIF_ERROR("%s: mmc_wait_for_cmd returned %d",
__func__, status);
hif_err("mmc_wait_for_cmd returned %d", status);
return status;
}
@@ -1047,8 +1045,7 @@ int func0_cmd52_read_byte(struct mmc_card *card,
*byte = io_cmd.resp[0] & 0xFF;
if (err)
HIF_ERROR("%s: mmc_wait_for_cmd returned %d",
__func__, err);
hif_err("mmc_wait_for_cmd returned %d", err);
return err;
}
@@ -1059,11 +1056,9 @@ void hif_dump_cccr(struct hif_sdio_dev *hif_device)
uint8_t cccr_val;
uint32_t err;
HIF_ERROR("%s: Enter", __func__);
if (!hif_device || !hif_device->func ||
!hif_device->func->card) {
HIF_ERROR("%s: incorrect input", __func__);
hif_err("Incorrect input");
return;
}
@@ -1071,13 +1066,11 @@ void hif_dump_cccr(struct hif_sdio_dev *hif_device)
err = func0_cmd52_read_byte(hif_device->func->card,
i, &cccr_val);
if (err)
HIF_ERROR("%s:Reading CCCR 0x%02X failed: %d",
__func__, i, (unsigned int)err);
hif_err("Reading CCCR 0x%02X failed: %d",
i, (unsigned int)err);
else
HIF_ERROR("%X(%X) ", i, (unsigned int)cccr_val);
hif_err("%X(%X) ", i, (unsigned int)cccr_val);
}
HIF_ERROR("%s: Exit", __func__);
}
QDF_STATUS hif_sdio_device_inserted(struct hif_softc *ol_sc,
@@ -1087,9 +1080,9 @@ QDF_STATUS hif_sdio_device_inserted(struct hif_softc *ol_sc,
struct sdio_func *func = dev_to_sdio_func(dev);
QDF_STATUS status = QDF_STATUS_SUCCESS;
HIF_ERROR("%s: Enter", __func__);
hif_debug("Enter");
status = hif_device_inserted(ol_sc, func, id);
HIF_ERROR("%s: Exit: status:%d", __func__, status);
hif_debug("Exit: status: %d", status);
return status;
}

Datei anzeigen

@@ -136,8 +136,7 @@ QDF_STATUS hif_dev_map_service_to_pipe(struct hif_sdio_dev *pdev, uint16_t svc,
break;
default:
HIF_ERROR("%s: Err : Invalid service (%d)",
__func__, svc);
hif_err("Invalid service: %d", svc);
status = QDF_STATUS_E_INVAL;
break;
}
@@ -347,7 +346,7 @@ QDF_STATUS hif_enable_func(struct hif_softc *ol_sc, struct hif_sdio_dev *device,
QDF_STATUS ret = QDF_STATUS_SUCCESS;
if (!device) {
HIF_ERROR("%s: HIF device is NULL", __func__);
hif_err("HIF device is NULL");
return QDF_STATUS_E_INVAL;
}
@@ -389,7 +388,7 @@ static qdf_nbuf_t hif_sdio_get_nbuf(struct hif_sdio_dev *dev, uint16_t buf_len)
elem = qdf_container_of(node, struct rx_q_entry, entry);
nbuf = elem->nbuf;
} else {
HIF_ERROR("%s: no rx q elements", __func__);
hif_err("no rx q elements");
}
if (q->count <= HIF_RX_Q_ALLOC_THRESHOLD &&
@@ -436,7 +435,7 @@ void hif_sdio_rx_q_alloc(void *ctx)
for (; rx_q_count < dev->rx_q.max_size; rx_q_count++) {
rx_q_elem = qdf_mem_malloc(sizeof(struct rx_q_entry));
if (!rx_q_elem) {
HIF_ERROR("%s: failed to alloc rx q elem", __func__);
hif_err("Failed to alloc rx q elem");
break;
}
@@ -444,7 +443,7 @@ void hif_sdio_rx_q_alloc(void *ctx)
rx_q_elem->nbuf = qdf_nbuf_alloc(NULL, HIF_SDIO_RX_BUFFER_SIZE,
0, 4, false);
if (!rx_q_elem->nbuf) {
HIF_ERROR("%s: failed to alloc nbuf for rx", __func__);
hif_err("Failed to alloc nbuf for rx");
qdf_mem_free(rx_q_elem);
break;
}
@@ -500,7 +499,7 @@ int hif_dev_register_channels(struct hif_sdio_dev *dev, struct sdio_func *func)
dev->al_client = pld_sdio_get_sdio_al_client_handle(func);
if (ret || !dev->al_client) {
HIF_ERROR("%s: Failed to get get sdio al handle", __func__);
hif_err("Failed to get get sdio al handle");
return ret;
}
@@ -521,7 +520,7 @@ int hif_dev_register_channels(struct hif_sdio_dev *dev, struct sdio_func *func)
chan_data[chan]);
if (!dev->al_chan[chan] || IS_ERR(dev->al_chan[chan])) {
ret = -EINVAL;
HIF_ERROR("%s: Channel registration failed", __func__);
hif_err("Channel registration failed");
} else {
dev->al_chan[chan]->priv = (void *)dev;
HIF_INFO("%s: chan %s : id : %u", __func__,
@@ -548,7 +547,7 @@ void hif_dev_unregister_channels(struct hif_sdio_dev *dev,
unsigned int chan;
if (!dev) {
HIF_ERROR("%s: hif_sdio_dev is null", __func__);
hif_err("hif_sdio_dev is null");
return;
}
@@ -586,14 +585,13 @@ hif_read_write(struct hif_sdio_dev *dev,
unsigned char *buffer = (unsigned char *)cbuffer;
if (!dev || !sdio_al_ch_handle) {
HIF_ERROR("%s: device = %pK, addr = %lu", __func__,
dev, sdio_al_ch_handle);
hif_err("Device = %pK, addr = %lu", dev, sdio_al_ch_handle);
return QDF_STATUS_E_INVAL;
}
if (!(request & HIF_ASYNCHRONOUS) &&
!(request & HIF_SYNCHRONOUS)) {
HIF_ERROR("%s: Invalid request mode", __func__);
hif_err("Invalid request mode: %d", request);
return QDF_STATUS_E_INVAL;
}
@@ -608,7 +606,7 @@ hif_read_write(struct hif_sdio_dev *dev,
bus_req = hif_allocate_bus_request(dev);
if (!bus_req) {
HIF_ERROR("%s: Bus alloc failed", __func__);
hif_err("Bus alloc failed");
return QDF_STATUS_E_FAILURE;
}
@@ -629,7 +627,7 @@ hif_read_write(struct hif_sdio_dev *dev,
1); /* higher priority */
if (ret) {
status = QDF_STATUS_E_FAILURE;
HIF_ERROR("%s: SYNC REQ failed ret=%d", __func__, ret);
hif_err("SYNC REQ failed ret: %d", ret);
} else {
status = QDF_STATUS_SUCCESS;
}
@@ -655,8 +653,8 @@ hif_read_write(struct hif_sdio_dev *dev,
(void *)bus_req);
if (ret) {
status = QDF_STATUS_E_FAILURE;
HIF_ERROR("%s: ASYNC REQ fail ret=%d for len=%d ch=%d",
__func__, ret, length, ch->channel_id);
hif_err("ASYNC REQ fail ret: %d for len: %d ch: %d",
ret, length, ch->channel_id);
hif_free_bus_request(dev, bus_req);
} else {
status = QDF_STATUS_E_PENDING;
@@ -681,7 +679,7 @@ void ul_xfer_cb(struct sdio_al_channel_handle *ch_handle,
struct hif_sdio_dev *dev;
if (!ch_handle || !result) {
HIF_ERROR("%s: Invalid args", __func__);
hif_err("Invalid args");
qdf_assert_always(0);
return;
}
@@ -690,8 +688,7 @@ void ul_xfer_cb(struct sdio_al_channel_handle *ch_handle,
if (result->xfer_status) {
req->status = QDF_STATUS_E_FAILURE;
HIF_ERROR("%s: ASYNC Tx failed status=%d", __func__,
result->xfer_status);
hif_err("ASYNC Tx failed status: %d", result->xfer_status);
} else {
req->status = QDF_STATUS_SUCCESS;
}
@@ -722,7 +719,7 @@ void dl_data_avail_cb(struct sdio_al_channel_handle *ch_handle,
qdf_nbuf_t nbuf;
if (!ch_handle || !len) {
HIF_ERROR("%s: Invalid args %u", __func__, len);
hif_err("Invalid args %u", len);
qdf_assert_always(0);
return;
}
@@ -731,7 +728,7 @@ void dl_data_avail_cb(struct sdio_al_channel_handle *ch_handle,
chan = ch_handle->channel_id;
if (chan > HIF_SDIO_MAX_AL_CHANNELS) {
HIF_ERROR("%s: Invalid Ch ID %d", __func__, chan);
hif_err("Invalid Ch ID %d", chan);
return;
}
@@ -743,7 +740,7 @@ void dl_data_avail_cb(struct sdio_al_channel_handle *ch_handle,
nbuf = qdf_nbuf_alloc(NULL, len, 0, 4, false);
if (!nbuf) {
HIF_ERROR("%s: Unable to alloc netbuf %u bytes", __func__, len);
hif_err("Unable to alloc netbuf %u bytes", len);
return;
}
@@ -776,22 +773,20 @@ void dl_xfer_cb(struct sdio_al_channel_handle *ch_handle,
QDF_STATUS (*rx_completion)(void *, qdf_nbuf_t, uint8_t);
if (!bus_req) {
HIF_ERROR("%s: Bus Req NULL!!!", __func__);
hif_err("Bus Req NULL!!!");
qdf_assert_always(0);
return;
}
if (!ch_handle || !result) {
HIF_ERROR("%s: Invalid args %pK %pK", __func__,
ch_handle, result);
hif_err("Invalid args %pK %pK", ch_handle, result);
qdf_assert_always(0);
return;
}
dev = (struct hif_sdio_dev *)ch_handle->priv;
if (result->xfer_status) {
HIF_ERROR("%s: ASYNC Rx failed %d", __func__,
result->xfer_status);
hif_err("ASYNC Rx failed %d", result->xfer_status);
qdf_nbuf_free((qdf_nbuf_t)bus_req->context);
hif_free_bus_request(dev, bus_req);
return;
@@ -811,9 +806,8 @@ void dl_xfer_cb(struct sdio_al_channel_handle *ch_handle,
if (HTC_GET_FIELD(buf, HTC_FRAME_HDR, ENDPOINTID) >=
ENDPOINT_MAX) {
HIF_ERROR("%s: invalid endpoint id: %u", __func__,
HTC_GET_FIELD(buf, HTC_FRAME_HDR,
ENDPOINTID));
hif_err("Invalid endpoint id: %u",
HTC_GET_FIELD(buf, HTC_FRAME_HDR, ENDPOINTID));
break;
}
@@ -821,26 +815,25 @@ void dl_xfer_cb(struct sdio_al_channel_handle *ch_handle,
payload_len = HTC_GET_FIELD(buf, HTC_FRAME_HDR, PAYLOADLEN);
payload_len = qdf_le16_to_cpu(payload_len);
if (!payload_len) {
HIF_ERROR("%s:Invalid Payload len %d bytes", __func__,
payload_len);
hif_err("Invalid Payload len %d bytes", payload_len);
break;
}
if (payload_len > g_dbg_payload_len) {
g_dbg_payload_len = payload_len;
HIF_ERROR("Max Rx HTC Payload = %d", g_dbg_payload_len);
hif_err("Max Rx HTC Payload = %d", g_dbg_payload_len);
}
nbuf = hif_sdio_get_nbuf(dev, payload_len + HTC_HEADER_LEN);
if (!nbuf) {
HIF_ERROR("%s: failed to alloc rx buffer", __func__);
hif_err("Failed to alloc rx buffer");
break;
}
/* Check if payload fits in skb */
if (qdf_nbuf_tailroom(nbuf) < payload_len + HTC_HEADER_LEN) {
HIF_ERROR("%s: Payload + HTC_HDR %d > skb tailroom %d",
__func__, (payload_len + 8),
qdf_nbuf_tailroom(nbuf));
hif_err("Payload + HTC_HDR %d > skb tailroom %d",
(payload_len + 8),
qdf_nbuf_tailroom(nbuf));
qdf_nbuf_free(nbuf);
break;
}

Datei anzeigen

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013-2019 The Linux Foundation. All rights reserved.
* Copyright (c) 2013-2020 The Linux Foundation. All rights reserved.
*
*
*
@@ -94,7 +94,7 @@ static inline uint32_t hif_get_send_buffer_flags(struct hif_sdio_device *pdev)
if (pdev)
return (uint32_t)HIF_WR_ASYNC_BLOCK_INC;
HIF_ERROR("%s: hif obj is null. Not populating xfer flags", __func__);
hif_err("hif obj is null. Not populating xfer flags");
return 0;
}

Datei anzeigen

@@ -150,8 +150,7 @@ int hif_ahb_dump_registers(struct hif_softc *hif_ctx)
status = hif_dump_ce_registers(scn);
if (status)
HIF_ERROR("%s: Dump CE Registers Failed status %d", __func__,
status);
hif_err("Dump CE Registers Failed status %d", status);
return 0;
}
@@ -561,8 +560,8 @@ QDF_STATUS hif_ahb_enable_bus(struct hif_softc *ol_sc,
ret = hif_get_device_type(id->driver_data, revision_id,
&hif_type, &target_type);
if (ret < 0) {
HIF_ERROR("%s: invalid device ret %d id %d revision_id %d",
__func__, ret, (int)id->driver_data, revision_id);
hif_err("Invalid device ret %d id %d revision_id %d",
ret, (int)id->driver_data, revision_id);
return QDF_STATUS_E_FAILURE;
}
@@ -621,8 +620,7 @@ QDF_STATUS hif_ahb_enable_bus(struct hif_softc *ol_sc,
ret = pfrm_dma_set_coherent_mask(dev, 32);
#endif
if (ret) {
HIF_ERROR("%s: failed to set dma mask error = %d",
__func__, ret);
hif_err("Failed to set dma mask error = %d", ret);
return QDF_STATUS_E_IO;
}
@@ -890,7 +888,7 @@ bool hif_ahb_needs_bmi(struct hif_softc *scn)
void hif_ahb_display_stats(struct hif_softc *scn)
{
if (!scn) {
HIF_ERROR("%s, hif_scn null", __func__);
hif_err("hif_scn null");
return;
}
hif_display_ce_stats(scn);
@@ -901,7 +899,7 @@ void hif_ahb_clear_stats(struct hif_softc *scn)
struct HIF_CE_state *hif_state = HIF_GET_CE_STATE(scn);
if (!hif_state) {
HIF_ERROR("%s, hif_state null", __func__);
hif_err("hif_state null");
return;
}
hif_clear_ce_stats(hif_state);

Datei anzeigen

@@ -71,7 +71,7 @@ int hif_snoc_dump_registers(struct hif_softc *hif_ctx)
status = hif_dump_ce_registers(scn);
if (status)
HIF_ERROR("%s: Dump CE Registers Failed", __func__);
hif_err("Dump CE Registers Failed");
return 0;
}
@@ -79,7 +79,7 @@ int hif_snoc_dump_registers(struct hif_softc *hif_ctx)
void hif_snoc_display_stats(struct hif_softc *hif_ctx)
{
if (!hif_ctx) {
HIF_ERROR("%s, hif_ctx null", __func__);
hif_err("hif_ctx null");
return;
}
hif_display_ce_stats(hif_ctx);
@@ -90,7 +90,7 @@ void hif_snoc_clear_stats(struct hif_softc *hif_ctx)
struct HIF_CE_state *hif_state = HIF_GET_CE_STATE(hif_ctx);
if (!hif_state) {
HIF_ERROR("%s, hif_ctx null", __func__);
hif_err("hif_ctx null");
return;
}
hif_clear_ce_stats(hif_state);
@@ -135,7 +135,7 @@ static QDF_STATUS hif_snoc_get_soc_info(struct hif_softc *scn)
ret = pld_get_soc_info(scn->qdf_dev->dev, &soc_info);
if (ret < 0) {
HIF_ERROR("%s: pld_get_soc_info error = %d", __func__, ret);
hif_err("pld_get_soc_info error = %d", ret);
return QDF_STATUS_E_FAILURE;
}
@@ -167,8 +167,7 @@ int hif_snoc_bus_configure(struct hif_softc *scn)
ret = hif_wlan_enable(scn);
if (ret) {
HIF_ERROR("%s: hif_wlan_enable error = %d",
__func__, ret);
hif_err("hif_wlan_enable error = %d", ret);
return ret;
}
@@ -268,14 +267,13 @@ QDF_STATUS hif_snoc_enable_bus(struct hif_softc *ol_sc,
int target_type;
if (!ol_sc) {
HIF_ERROR("%s: hif_ctx is NULL", __func__);
hif_err("hif_ctx is NULL");
return QDF_STATUS_E_NOMEM;
}
ret = hif_set_dma_coherent_mask(ol_sc->qdf_dev);
if (ret) {
HIF_ERROR("%s: failed to set dma mask error = %d",
__func__, ret);
hif_err("Failed to set dma mask error = %d", ret);
return qdf_status_from_os_return(ret);
}
@@ -284,15 +282,14 @@ QDF_STATUS hif_snoc_enable_bus(struct hif_softc *ol_sc,
HIF_WARN("%s: device_init_wakeup already done",
__func__);
else if (ret) {
HIF_ERROR("%s: device_init_wakeup: err= %d",
__func__, ret);
hif_err("device_init_wakeup: err= %d", ret);
return qdf_status_from_os_return(ret);
}
ret = hif_snoc_get_target_type(ol_sc, dev, bdev, bid,
&hif_type, &target_type);
if (ret < 0) {
HIF_ERROR("%s: invalid device id/revision_id", __func__);
hif_err("Invalid device id/revision_id");
return QDF_STATUS_E_FAILURE;
}
@@ -327,7 +324,7 @@ void hif_snoc_disable_bus(struct hif_softc *scn)
ret = qdf_device_init_wakeup(scn->qdf_dev, false);
if (ret)
HIF_ERROR("%s: device_init_wakeup: err %d", __func__, ret);
hif_err("device_init_wakeup: err %d", ret);
}
/**
@@ -392,7 +389,7 @@ QDF_STATUS hif_snoc_setup_wakeup_sources(struct hif_softc *scn, bool enable)
ret = disable_irq_wake(scn->wake_irq);
if (ret) {
HIF_ERROR("%s: Fail to setup wake IRQ!", __func__);
hif_err("Fail to setup wake IRQ!");
return QDF_STATUS_E_RESOURCES;
}

Datei anzeigen

@@ -83,8 +83,8 @@ static void usb_hif_usb_transmit_complete(struct urb *urb)
usb_hif_remove_pending_transfer(urb_context);
if (urb->status != 0) {
HIF_ERROR("%s: pipe: %d, failed:%d",
__func__, pipe->logical_pipe_num, urb->status);
hif_err("pipe: %d, failed: %d", pipe->logical_pipe_num,
urb->status);
}
buf = urb_context->buf;
@@ -160,8 +160,7 @@ static QDF_STATUS hif_send_internal(struct HIF_DEVICE_USB *hif_usb_device,
}
} else {
/* Extra fragments overflow */
HIF_ERROR("%s Extra fragments count overflow : %d\n",
__func__, frag_count);
hif_err("Extra fragments count overflow : %d", frag_count);
status = QDF_STATUS_E_RESOURCES;
goto err;
}
@@ -210,8 +209,8 @@ static QDF_STATUS hif_send_internal(struct HIF_DEVICE_USB *hif_usb_device,
/* TODO : note, it is possible to run out of urbs if 2
* endpoints map to the same pipe ID
*/
HIF_ERROR("%s pipe:%d no urbs left. URB Cnt : %d",
__func__, pipe_id, pipe->urb_cnt);
hif_err("pipe: %d no urbs left. URB Cnt: %d",
pipe_id, pipe->urb_cnt);
status = QDF_STATUS_E_RESOURCES;
goto err;
}
@@ -245,8 +244,7 @@ static QDF_STATUS hif_send_internal(struct HIF_DEVICE_USB *hif_usb_device,
else
qdf_nbuf_pull_head(buf, head_data_len);
urb_context->buf = NULL;
HIF_ERROR("athusb : usb bulk transmit failed %d",
usb_status);
hif_err("athusb: usb bulk transmit failed %d", usb_status);
usb_hif_remove_pending_transfer(urb_context);
usb_hif_cleanup_transmit_urb(urb_context);
status = QDF_STATUS_E_FAILURE;
@@ -256,7 +254,7 @@ static QDF_STATUS hif_send_internal(struct HIF_DEVICE_USB *hif_usb_device,
err:
if (!QDF_IS_STATUS_SUCCESS(status) &&
(status != QDF_STATUS_E_RESOURCES)) {
HIF_ERROR("athusb send failed %d", status);
hif_err("athusb send failed %d", status);
}
HIF_DBG("-%s pipe : %d", __func__, pipe_id);
@@ -388,8 +386,7 @@ QDF_STATUS hif_usb_device_init(struct hif_usb_softc *sc)
device->udev = dev;
device->interface = interface;
HIF_ERROR("%s device %pK device->udev %pK device->interface %pK",
__func__,
hif_err("device %pK device->udev %pK device->interface %pK",
device,
device->udev,
device->interface);
@@ -422,7 +419,7 @@ QDF_STATUS hif_usb_device_init(struct hif_usb_softc *sc)
device->rx_ctrl_pipe_supported = 1;
if (status != QDF_STATUS_SUCCESS)
HIF_ERROR("%s: abnormal condition", __func__);
hif_err("abnormal condition (status=%d)", status);
HIF_TRACE("+%s", __func__);
return status;
@@ -788,7 +785,7 @@ void hif_dump_info(struct hif_opaque_softc *scn)
for (i = 0; i < HIF_USB_PIPE_MAX; i++) {
pipe = &device->pipes[i];
HIF_ERROR("PipeIndex : %d URB Cnt : %d PipeHandle : %x",
hif_err("PipeIndex: %d URB Cnt: %d PipeHandle: %x",
i, pipe->urb_cnt,
pipe->usb_pipe_handle);
if (usb_pipeisoc(pipe->usb_pipe_handle))

Datei anzeigen

@@ -82,7 +82,7 @@ hif_usb_procfs_init(struct hif_softc *scn)
HIF_ENTER();
if (athdiag_procfs_init(scn) != 0) {
HIF_ERROR("athdiag_procfs_init failed");
hif_err("athdiag_procfs_init failed");
ret = A_ERROR;
}
@@ -142,7 +142,7 @@ static int hif_usb_disable_lpm(struct usb_device *udev)
HIF_ENTER();
if (!udev || !udev->bus) {
HIF_ERROR("Invalid input parameters");
hif_err("Invalid input parameters");
goto exit;
}
@@ -198,7 +198,7 @@ QDF_STATUS hif_usb_enable_bus(struct hif_softc *scn,
u32 target_type;
if (!scn) {
HIF_ERROR("%s: hif_ctx is NULL", __func__);
hif_err("hif_ctx is NULL");
goto err_usb;
}
@@ -213,8 +213,8 @@ QDF_STATUS hif_usb_enable_bus(struct hif_softc *scn,
vendor_id = qdf_le16_to_cpu(usbdev->descriptor.idVendor);
product_id = qdf_le16_to_cpu(usbdev->descriptor.idProduct);
HIF_ERROR("%s: con_mode = 0x%x, vendor_id = 0x%x product_id = 0x%x",
__func__, hif_get_conparam(scn), vendor_id, product_id);
hif_err("con_mode = 0x%x, vendor_id = 0x%x product_id = 0x%x",
hif_get_conparam(scn), vendor_id, product_id);
sc->pdev = (void *)usbdev;
sc->dev = &usbdev->dev;
@@ -234,7 +234,7 @@ QDF_STATUS hif_usb_enable_bus(struct hif_softc *scn,
if ((usb_control_msg(usbdev, usb_sndctrlpipe(usbdev, 0),
USB_REQ_SET_CONFIGURATION, 0, 1, 0,
NULL, 0, HZ)) < 0) {
HIF_ERROR("%s[%d]", __func__, __LINE__);
hif_err("usb_control_msg failed");
goto err_usb;
}
usb_set_interface(usbdev, 0, 0);
@@ -253,7 +253,7 @@ QDF_STATUS hif_usb_enable_bus(struct hif_softc *scn,
sc->interface = interface;
if (hif_usb_device_init(sc) != QDF_STATUS_SUCCESS) {
HIF_ERROR("ath: %s: hif_usb_device_init failed", __func__);
hif_err("hif_usb_device_init failed");
goto err_reset;
}
@@ -480,8 +480,7 @@ void hif_usb_reg_tbl_attach(struct hif_softc *scn)
RTC_SOC_BASE_ADDRESS),
&chip_id);
if (rv != QDF_STATUS_SUCCESS) {
HIF_ERROR("%s: get chip id val (%d)", __func__,
rv);
hif_err("get chip id val: %d", rv);
}
tgt_info->target_revision =
CHIP_ID_REVISION_GET(chip_id);
@@ -632,7 +631,7 @@ void hif_fw_assert_ramdump_pattern(struct hif_usb_softc *sc)
reg = (uint32_t *) (data + 4);
if (sc->fw_ram_dumping == 0) {
sc->fw_ram_dumping = 1;
HIF_ERROR("Firmware %s dump:\n", fw_ram_seg_name[i]);
hif_info("Firmware %s dump:", fw_ram_seg_name[i]);
sc->ramdump[i] =
qdf_mem_malloc(sizeof(struct fw_ramdump) +
fw_ram_reg_size[i]);
@@ -641,9 +640,8 @@ void hif_fw_assert_ramdump_pattern(struct hif_usb_softc *sc)
(sc->ramdump[i])->mem = (uint8_t *) (sc->ramdump[i] + 1);
fw_ram_seg_addr[i] = (sc->ramdump[i])->mem;
HIF_ERROR("FW %s start addr = %#08x\n",
fw_ram_seg_name[i], *reg);
HIF_ERROR("Memory addr for %s = %pK\n",
hif_info("FW %s start addr = %#08x Memory addr for %s = %pK",
fw_ram_seg_name[i], *reg,
fw_ram_seg_name[i],
(sc->ramdump[i])->mem);
(sc->ramdump[i])->start_addr = *reg;
@@ -655,13 +653,13 @@ void hif_fw_assert_ramdump_pattern(struct hif_usb_softc *sc)
if (sc->ramdump[i]->length <= fw_ram_reg_size[i]) {
qdf_mem_copy(ram_ptr, (uint8_t *) reg, len - 8);
} else {
HIF_ERROR("memory copy overlap\n");
hif_err("memory copy overlap");
QDF_BUG(0);
}
if (pattern == FW_RAMDUMP_END_PATTERN) {
HIF_ERROR("%s memory size = %d\n", fw_ram_seg_name[i],
(sc->ramdump[i])->length);
hif_err("%s memory size = %d", fw_ram_seg_name[i],
(sc->ramdump[i])->length);
if (i == (FW_RAM_SEG_CNT - 1))
QDF_BUG(0);
@@ -707,8 +705,8 @@ void hif_usb_ramdump_handler(struct hif_opaque_softc *scn)
pattern = *((uint32_t *) data);
if (pattern == FW_ASSERT_PATTERN) {
HIF_ERROR("Firmware crash detected...\n");
HIF_ERROR("target_type: %d.target_version %d. target_revision%d.",
hif_err("Firmware crash detected...");
hif_err("target_type: %d target_version: %d target_revision: %d",
tgt_info->target_type,
tgt_info->target_version,
tgt_info->target_revision);

Datei anzeigen

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2014-2018, 2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -38,7 +38,7 @@ void target_register_tbl_attach(struct hif_softc *scn,
scn->targetdef = &ar6320v2_targetdef;
break;
default:
HIF_ERROR("%s: unknown target_type %u", __func__, target_type);
hif_err("Unknown target_type: %u", target_type);
break;
}
}
@@ -55,7 +55,7 @@ void hif_register_tbl_attach(struct hif_softc *scn, uint32_t hif_type)
scn->hostdef = &ar6320v2_hostdef;
break;
default:
HIF_ERROR("%s: unknown hif_type %u", __func__, hif_type);
hif_err("Unknown hif_type: %u", hif_type);
break;
}
}

Datei anzeigen

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013-2019 The Linux Foundation. All rights reserved.
* Copyright (c) 2013-2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -161,7 +161,7 @@ static QDF_STATUS usb_hif_alloc_pipe_resources
if (!urb_context->urb) {
status = QDF_STATUS_E_NOMEM;
qdf_mem_free(urb_context);
HIF_ERROR("urb_context->urb is null");
hif_err("urb_context->urb is null");
break;
}
@@ -193,7 +193,7 @@ static void usb_hif_free_pipe_resources(struct HIF_USB_PIPE *pipe)
if (!pipe->device) {
/* nothing allocated for this pipe */
HIF_ERROR("pipe->device is null");
hif_err("pipe->device is null");
return;
}
@@ -203,10 +203,10 @@ static void usb_hif_free_pipe_resources(struct HIF_USB_PIPE *pipe)
pipe->urb_cnt);
if (pipe->urb_alloc != pipe->urb_cnt) {
HIF_ERROR("athusb: urb leak! lpipe:%d hpipe:0x%X urbs:%d avail:%d",
pipe->logical_pipe_num,
pipe->usb_pipe_handle, pipe->urb_alloc,
pipe->urb_cnt);
hif_err("athusb: urb leak! lpipe:%d hpipe:0x%X urbs:%d avail:%d",
pipe->logical_pipe_num,
pipe->usb_pipe_handle, pipe->urb_alloc,
pipe->urb_cnt);
}
while (true) {
@@ -570,8 +570,7 @@ static void usb_hif_usb_recv_prestart_complete
status = A_ECANCELED;
break;
default:
HIF_ERROR("%s recv pipe: %d (ep:0x%2.2X), failed:%d",
__func__,
hif_err("recv pipe: %d (ep:0x%2.2X), status: %d",
pipe->logical_pipe_num,
pipe->ep_address,
urb->status);
@@ -655,8 +654,7 @@ static void usb_hif_usb_recv_complete(struct urb *urb)
status = A_ECANCELED;
break;
default:
HIF_ERROR("%s recv pipe: %d (ep:0x%2.2X), failed:%d",
__func__,
hif_err("recv pipe: %d (ep:0x%2.2X), status: %d",
pipe->logical_pipe_num,
pipe->ep_address,
urb->status);
@@ -699,11 +697,10 @@ static void usb_hif_usb_recv_complete(struct urb *urb)
HIF_USB_RX_BUFFER_SIZE);
}
} else {
HIF_ERROR("%s: pipe: %d, fail to post URB: status(%d) suspend (%d)",
__func__,
pipe->logical_pipe_num,
urb->status,
sc->suspend_state);
hif_err("pipe: %d, fail to post URB: status: %d suspend: %d",
pipe->logical_pipe_num,
urb->status,
sc->suspend_state);
}
HIF_DBG("-%s", __func__);
@@ -753,8 +750,7 @@ static void usb_hif_usb_recv_bundle_complete(struct urb *urb)
status = A_ECANCELED;
break;
default:
HIF_ERROR("%s recv pipe: %d (ep:0x%2.2X), failed:%d",
__func__,
hif_err("recv pipe: %d (ep:0x%2.2X), status: %d",
pipe->logical_pipe_num,
pipe->ep_address,
urb->status);
@@ -786,7 +782,7 @@ static void usb_hif_usb_recv_bundle_complete(struct urb *urb)
/* Hack into HTC header for bundle processing */
HtcHdr = (HTC_FRAME_HDR *) netdata;
if (HtcHdr->EndpointID >= ENDPOINT_MAX) {
HIF_ERROR("athusb: Rx: invalid EndpointID=%d",
hif_err("athusb: Rx: invalid EndpointID=%d",
HtcHdr->EndpointID);
break;
}
@@ -795,7 +791,7 @@ static void usb_hif_usb_recv_bundle_complete(struct urb *urb)
payloadLen = qdf_le16_to_cpu(payloadLen);
if (payloadLen > HIF_USB_RX_BUFFER_SIZE) {
HIF_ERROR("athusb: payloadLen too long %u",
hif_err("athusb: payloadLen too long %u",
payloadLen);
break;
}
@@ -803,7 +799,7 @@ static void usb_hif_usb_recv_bundle_complete(struct urb *urb)
}
if (netlen < frame_len) {
HIF_ERROR("athusb: subframe length %d not fitted into bundle packet length %d"
hif_err("athusb: subframe length %d not fitted into bundle packet length %d"
, netlen, frame_len);
break;
}
@@ -812,7 +808,7 @@ static void usb_hif_usb_recv_bundle_complete(struct urb *urb)
new_skb =
qdf_nbuf_alloc(NULL, frame_len, 0, 4, false);
if (!new_skb) {
HIF_ERROR("athusb: allocate skb (len=%u) failed"
hif_err("athusb: allocate skb (len=%u) failed"
, frame_len);
break;
}
@@ -837,7 +833,7 @@ static void usb_hif_usb_recv_bundle_complete(struct urb *urb)
} while (false);
if (!urb_context->buf)
HIF_ERROR("athusb: buffer in urb_context is NULL");
hif_err("athusb: buffer in urb_context is NULL");
/* reset urb_context->buf ==> seems not necessary */
usb_hif_free_urb_to_pipe(urb_context->pipe, urb_context);
@@ -906,7 +902,7 @@ static void usb_hif_post_recv_prestart_transfers(struct HIF_USB_PIPE *recv_pipe,
usb_status = usb_submit_urb(urb, GFP_ATOMIC);
if (usb_status) {
HIF_ERROR("athusb : usb bulk recv failed %d",
hif_err("athusb : usb bulk recv failed %d",
usb_status);
usb_hif_remove_pending_transfer(urb_context);
usb_hif_cleanup_recv_urb(urb_context);
@@ -970,7 +966,7 @@ static void usb_hif_post_recv_transfers(struct HIF_USB_PIPE *recv_pipe,
usb_status = usb_submit_urb(urb, GFP_ATOMIC);
if (usb_status) {
HIF_ERROR("athusb : usb bulk recv failed %d",
hif_err("athusb : usb bulk recv failed %d",
usb_status);
usb_hif_remove_pending_transfer(urb_context);
usb_hif_cleanup_recv_urb(urb_context);
@@ -1033,7 +1029,7 @@ static void usb_hif_post_recv_bundle_transfers(struct HIF_USB_PIPE *recv_pipe,
usb_status = usb_submit_urb(urb, GFP_ATOMIC);
if (usb_status) {
HIF_ERROR("athusb : usb bulk recv failed %d",
hif_err("athusb : usb bulk recv failed %d",
usb_status);
usb_hif_remove_pending_transfer(urb_context);
usb_hif_free_urb_to_pipe(urb_context->pipe,
@@ -1162,7 +1158,7 @@ QDF_STATUS usb_hif_submit_ctrl_out(struct HIF_DEVICE_USB *device,
size, 2 * HZ);
if (result < 0) {
HIF_ERROR("%s failed,result = %d", __func__, result);
hif_err("usb_control_msg failed, (result=%d)", result);
ret = QDF_STATUS_E_FAILURE;
}
@@ -1214,7 +1210,7 @@ QDF_STATUS usb_hif_submit_ctrl_in(struct HIF_DEVICE_USB *device,
size, 2 * HZ);
if (result < 0) {
HIF_ERROR("%s failed, result = %d", __func__, result);
hif_err("usb_control_msg failed, (result=%d)", result);
ret = QDF_STATUS_E_FAILURE;
break;
}