qcacmn: Remove __func__ from the DP logs
Logging macros already takes care of adding function name. Hence, delete the occurrence of __func__. Change-Id: I44ef5d7f030eba16decb9611f16001c6e9d42b3b CRs-Fixed: 3492505
This commit is contained in:

committed by
Rahul Choudhary

orang tua
48cf24b446
melakukan
363262cd30
@@ -3868,7 +3868,7 @@ QDF_STATUS dp_ipa_tx_buf_smmu_mapping(
|
||||
dp_get_pdev_from_soc_pdev_id_wifi3(soc, pdev_id);
|
||||
|
||||
if (!pdev) {
|
||||
dp_err("%s invalid instance", __func__);
|
||||
dp_err("Invalid instance");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
@@ -3895,7 +3895,7 @@ QDF_STATUS dp_ipa_tx_buf_smmu_unmapping(
|
||||
dp_get_pdev_from_soc_pdev_id_wifi3(soc, pdev_id);
|
||||
|
||||
if (!pdev) {
|
||||
dp_err("%s invalid instance", __func__);
|
||||
dp_err("Invalid instance");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
|
@@ -7246,7 +7246,7 @@ void dp_txrx_path_stats(struct dp_soc *soc)
|
||||
uint8_t i;
|
||||
|
||||
if (!soc) {
|
||||
dp_err("%s: Invalid access", __func__);
|
||||
dp_err("Invalid access");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -3330,23 +3330,23 @@ static int hif_completion_thread_startup_by_ceid(struct HIF_CE_state *hif_state,
|
||||
if (!hif_msg_callbacks ||
|
||||
!hif_msg_callbacks->rxCompletionHandler ||
|
||||
!hif_msg_callbacks->txCompletionHandler) {
|
||||
hif_err("%s: no completion handler registered", __func__);
|
||||
hif_err("no completion handler registered");
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
attr = hif_state->host_ce_config[pipe_num];
|
||||
if (attr.src_nentries) {
|
||||
/* pipe used to send to target */
|
||||
hif_debug("%s: pipe_num:%d pipe_info:0x%pK\n",
|
||||
__func__, pipe_num, pipe_info);
|
||||
hif_debug("pipe_num:%d pipe_info:0x%pK\n",
|
||||
pipe_num, pipe_info);
|
||||
ce_send_cb_register(pipe_info->ce_hdl,
|
||||
hif_pci_ce_send_done, pipe_info,
|
||||
attr.flags & CE_ATTR_DISABLE_INTR);
|
||||
pipe_info->num_sends_allowed = attr.src_nentries - 1;
|
||||
}
|
||||
if (attr.dest_nentries) {
|
||||
hif_debug("%s: pipe_num:%d pipe_info:0x%pK\n",
|
||||
__func__, pipe_num, pipe_info);
|
||||
hif_debug("pipe_num:%d pipe_info:0x%pK\n",
|
||||
pipe_num, pipe_info);
|
||||
/* pipe used to receive from target */
|
||||
ce_recv_cb_register(pipe_info->ce_hdl,
|
||||
hif_pci_ce_recv_data, pipe_info,
|
||||
@@ -4867,7 +4867,7 @@ int hif_config_ce(struct hif_softc *scn)
|
||||
scn->athdiag_procfs_inited = true;
|
||||
|
||||
hif_debug("ce_init done");
|
||||
hif_debug("%s: X, ret = %d", __func__, rv);
|
||||
hif_debug("X, ret = %d", rv);
|
||||
|
||||
#ifdef ADRASTEA_SHADOW_REGISTERS
|
||||
hif_debug("Using Shadow Registers instead of CE Registers");
|
||||
@@ -4930,7 +4930,7 @@ int hif_config_ce_pktlog(struct hif_opaque_softc *hif_hdl)
|
||||
|
||||
qdf_status = hif_completion_thread_startup_by_ceid(hif_state, pipe_num);
|
||||
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
||||
hif_err("%s:failed to start hif thread", __func__);
|
||||
hif_err("Failed to start hif thread");
|
||||
goto err;
|
||||
}
|
||||
|
||||
@@ -4938,14 +4938,14 @@ int hif_config_ce_pktlog(struct hif_opaque_softc *hif_hdl)
|
||||
qdf_status = hif_post_recv_buffers_for_pipe(pipe_info);
|
||||
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
||||
/* cleanup is done in hif_ce_disable */
|
||||
hif_err("%s:failed to post buffers", __func__);
|
||||
hif_err("Failed to post buffers");
|
||||
return qdf_status;
|
||||
}
|
||||
scn->pktlog_init = true;
|
||||
return qdf_status != QDF_STATUS_SUCCESS;
|
||||
|
||||
err:
|
||||
hif_debug("%s: X, ret = %d", __func__, qdf_status);
|
||||
hif_debug("X, ret = %d", qdf_status);
|
||||
return QDF_STATUS_SUCCESS != QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
|
@@ -474,7 +474,7 @@ more_data:
|
||||
CE_ENGINE_INT_STATUS_CLEAR(scn, ctrl_addr,
|
||||
HOST_IS_COPY_COMPLETE_MASK);
|
||||
} else {
|
||||
hif_err_rl("%s: target access is not allowed", __func__);
|
||||
hif_err_rl("Target access is not allowed");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1105,7 +1105,7 @@ ce_per_engine_handler_adjust_legacy(struct CE_state *CE_state,
|
||||
return;
|
||||
|
||||
if (!TARGET_REGISTER_ACCESS_ALLOWED(scn)) {
|
||||
hif_err_rl("%s: target access is not allowed", __func__);
|
||||
hif_err_rl("Target access is not allowed");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1283,8 +1283,7 @@ static void ce_legacy_msi_param_setup(struct hif_softc *scn, uint32_t ctrl_addr,
|
||||
|
||||
/* msi config not found */
|
||||
if (ret) {
|
||||
hif_debug("%s: failed to get user msi assignment ret %d",
|
||||
__func__, ret);
|
||||
hif_debug("Failed to get user msi assignment ret %d", ret);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -324,8 +324,7 @@ QDF_STATUS hif_dev_map_service_to_pipe(struct hif_sdio_dev *pdev, uint16_t svc,
|
||||
break;
|
||||
|
||||
default:
|
||||
hif_err("%s: Err : Invalid service (%d)",
|
||||
__func__, svc);
|
||||
hif_err("Invalid service: %d", svc);
|
||||
status = QDF_STATUS_E_INVAL;
|
||||
break;
|
||||
}
|
||||
@@ -348,13 +347,13 @@ int hif_dev_setup_device(struct hif_sdio_device *pdev)
|
||||
sizeof(pdev->MailBoxInfo));
|
||||
|
||||
if (status != QDF_STATUS_SUCCESS)
|
||||
hif_err("%s: HIF_DEVICE_GET_MBOX_ADDR failed", __func__);
|
||||
hif_err("HIF_DEVICE_GET_MBOX_ADDR failed");
|
||||
|
||||
status = hif_configure_device(NULL, pdev->HIFDevice,
|
||||
HIF_DEVICE_GET_BLOCK_SIZE,
|
||||
blocksizes, sizeof(blocksizes));
|
||||
if (status != QDF_STATUS_SUCCESS)
|
||||
hif_err("%s: HIF_DEVICE_GET_MBOX_BLOCK_SIZE fail", __func__);
|
||||
hif_err("HIF_DEVICE_GET_MBOX_BLOCK_SIZE fail");
|
||||
|
||||
pdev->BlockSize = blocksizes[MAILBOX_FOR_BLOCK_SIZE];
|
||||
|
||||
@@ -387,7 +386,7 @@ void hif_dev_mask_interrupts(struct hif_sdio_device *pdev)
|
||||
HIF_WR_SYNC_BYTE_INC, NULL);
|
||||
|
||||
if (status != QDF_STATUS_SUCCESS)
|
||||
hif_err("%s: Err updating intr reg: %d", __func__, status);
|
||||
hif_err("Updating intr reg: %d", status);
|
||||
}
|
||||
|
||||
/** hif_dev_unmask_interrupts() - Enable the interrupts in the device
|
||||
@@ -443,7 +442,7 @@ void hif_dev_unmask_interrupts(struct hif_sdio_device *pdev)
|
||||
NULL);
|
||||
|
||||
if (status != QDF_STATUS_SUCCESS)
|
||||
hif_err("%s: Err updating intr reg: %d", __func__, status);
|
||||
hif_err("Updating intr reg: %d", status);
|
||||
}
|
||||
|
||||
void hif_dev_dump_registers(struct hif_sdio_device *pdev,
|
||||
@@ -453,7 +452,7 @@ void hif_dev_dump_registers(struct hif_sdio_device *pdev,
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
hif_debug("%s: Mailbox registers:", __func__);
|
||||
hif_debug("Mailbox registers:");
|
||||
|
||||
if (irq_proc) {
|
||||
hif_debug("HostIntStatus: 0x%x ", irq_proc->host_int_status);
|
||||
@@ -515,7 +514,7 @@ static uint8_t hif_dev_map_pipe_to_mail_box(struct hif_sdio_device *pdev,
|
||||
else if (0 == pipeid || 1 == pipeid)
|
||||
return 0;
|
||||
|
||||
hif_err("%s: pipeid=%d invalid", __func__, pipeid);
|
||||
hif_err("pipeid=%d invalid", pipeid);
|
||||
|
||||
qdf_assert(0);
|
||||
|
||||
@@ -538,8 +537,7 @@ static uint8_t hif_dev_map_mail_box_to_pipe(struct hif_sdio_device *pdev,
|
||||
else if (mbox_index == 1)
|
||||
return upload ? 3 : 2;
|
||||
|
||||
hif_err("%s: mbox_index=%d, upload=%d invalid",
|
||||
__func__, mbox_index, upload);
|
||||
hif_err("mbox_index=%d, upload=%d invalid", mbox_index, upload);
|
||||
|
||||
qdf_assert(0);
|
||||
|
||||
@@ -603,14 +601,13 @@ void hif_fixup_write_param(struct hif_sdio_dev *pdev, uint32_t req,
|
||||
} else if (taddr == mboxinfo.mbox_prop[1].extended_address) {
|
||||
mboxlen = mboxinfo.mbox_prop[1].extended_size;
|
||||
} else {
|
||||
hif_err("%s: Invalid write addr: 0x%08x", __func__, taddr);
|
||||
hif_err("Invalid write addr: 0x%08x", taddr);
|
||||
return;
|
||||
}
|
||||
|
||||
if (mboxlen != 0) {
|
||||
if (*length > mboxlen) {
|
||||
hif_err("%s: Error (%u > %u)",
|
||||
__func__, *length, mboxlen);
|
||||
hif_err("Error (%u > %u)", *length, mboxlen);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -643,8 +640,8 @@ static QDF_STATUS hif_dev_recv_packet(struct hif_sdio_device *pdev,
|
||||
padded_length = DEV_CALC_RECV_PADDED_LEN(pdev, recv_length);
|
||||
|
||||
if (padded_length > packet->BufferLength) {
|
||||
hif_err("%s: No space for padlen:%d recvlen:%d bufferlen:%d",
|
||||
__func__, padded_length,
|
||||
hif_err("No space for padlen:%d recvlen:%d bufferlen:%d",
|
||||
padded_length,
|
||||
recv_length, packet->BufferLength);
|
||||
if (packet->Completion) {
|
||||
COMPLETE_HTC_PACKET(packet, QDF_STATUS_E_INVAL);
|
||||
@@ -654,8 +651,8 @@ static QDF_STATUS hif_dev_recv_packet(struct hif_sdio_device *pdev,
|
||||
}
|
||||
|
||||
/* mailbox index is saved in Endpoint member */
|
||||
hif_debug("%s : hdr:0x%x, len:%d, padded length: %d Mbox:0x%x",
|
||||
__func__, packet->PktInfo.AsRx.ExpectedHdr, recv_length,
|
||||
hif_debug("hdr:0x%x, len:%d, padded length: %d Mbox:0x%x",
|
||||
packet->PktInfo.AsRx.ExpectedHdr, recv_length,
|
||||
padded_length, mbox_index);
|
||||
|
||||
status = hif_read_write(pdev->HIFDevice,
|
||||
@@ -665,15 +662,14 @@ static QDF_STATUS hif_dev_recv_packet(struct hif_sdio_device *pdev,
|
||||
req, sync ? NULL : packet);
|
||||
|
||||
if (status != QDF_STATUS_SUCCESS && status != QDF_STATUS_E_PENDING)
|
||||
hif_err("%s : Failed %d", __func__, status);
|
||||
hif_err("Failed %d", status);
|
||||
|
||||
if (sync) {
|
||||
packet->Status = status;
|
||||
if (status == QDF_STATUS_SUCCESS) {
|
||||
HTC_FRAME_HDR *hdr = (HTC_FRAME_HDR *) packet->pBuffer;
|
||||
|
||||
hif_debug("%s:EP:%d,Len:%d,Flg:%d,CB:0x%02X,0x%02X",
|
||||
__func__,
|
||||
hif_debug("EP:%d,Len:%d,Flg:%d,CB:0x%02X,0x%02X",
|
||||
hdr->EndpointID, hdr->PayloadLen,
|
||||
hdr->Flags, hdr->ControlBytes0,
|
||||
hdr->ControlBytes1);
|
||||
@@ -706,8 +702,7 @@ static QDF_STATUS hif_dev_issue_recv_packet_bundle
|
||||
if ((HTC_PACKET_QUEUE_DEPTH(recv_pkt_queue) -
|
||||
HTC_MAX_MSG_PER_BUNDLE_RX) > 0) {
|
||||
partial_bundle = true;
|
||||
hif_warn("%s, partial bundle detected num: %d, %d",
|
||||
__func__,
|
||||
hif_warn("partial bundle detected num: %d, %d",
|
||||
HTC_PACKET_QUEUE_DEPTH(recv_pkt_queue),
|
||||
HTC_MAX_MSG_PER_BUNDLE_RX);
|
||||
}
|
||||
@@ -716,7 +711,7 @@ static QDF_STATUS hif_dev_issue_recv_packet_bundle
|
||||
HTC_MAX_MSG_PER_BUNDLE_RX * target->TargetCreditSize;
|
||||
packet_rx_bundle = allocate_htc_bundle_packet(target);
|
||||
if (!packet_rx_bundle) {
|
||||
hif_err("%s: packet_rx_bundle is NULL", __func__);
|
||||
hif_err("packet_rx_bundle is NULL");
|
||||
qdf_sleep(NBUF_ALLOC_FAIL_WAIT_TIME); /* 100 msec sleep */
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
@@ -767,8 +762,7 @@ static QDF_STATUS hif_dev_issue_recv_packet_bundle
|
||||
HIF_RD_SYNC_BLOCK_FIX, NULL);
|
||||
|
||||
if (status != QDF_STATUS_SUCCESS) {
|
||||
hif_err("%s, hif_send Failed status:%d",
|
||||
__func__, status);
|
||||
hif_err("hif_send Failed status:%d", status);
|
||||
} else {
|
||||
unsigned char *buffer = bundle_buffer;
|
||||
*num_packets_fetched = i;
|
||||
@@ -813,7 +807,7 @@ QDF_STATUS hif_dev_recv_message_pending_handler(struct hif_sdio_device *pdev,
|
||||
HTC_PACKET_QUEUE recv_q, sync_comp_q;
|
||||
QDF_STATUS (*rxCompletion)(void *, qdf_nbuf_t, uint8_t);
|
||||
|
||||
hif_debug("%s: NumLookAheads: %d", __func__, num_look_aheads);
|
||||
hif_debug("NumLookAheads: %d", num_look_aheads);
|
||||
|
||||
if (num_pkts_fetched)
|
||||
*num_pkts_fetched = 0;
|
||||
@@ -855,8 +849,7 @@ QDF_STATUS hif_dev_recv_message_pending_handler(struct hif_sdio_device *pdev,
|
||||
id = ((HTC_FRAME_HDR *)&look_aheads[0])->EndpointID;
|
||||
|
||||
if (id >= ENDPOINT_MAX) {
|
||||
hif_err("%s: Invalid Endpoint in lookahead: %d",
|
||||
__func__, id);
|
||||
hif_err("Invalid Endpoint in lookahead: %d", id);
|
||||
status = QDF_STATUS_E_PROTO;
|
||||
break;
|
||||
}
|
||||
@@ -1042,7 +1035,7 @@ static QDF_STATUS hif_dev_service_cpu_interrupt(struct hif_sdio_device *pdev)
|
||||
cpu_int_status = mboxProcRegs(pdev).cpu_int_status &
|
||||
mboxEnaRegs(pdev).cpu_int_status_enable;
|
||||
|
||||
hif_err("%s: 0x%x", __func__, (uint32_t)cpu_int_status);
|
||||
hif_err("CPU intr status: 0x%x", (uint32_t)cpu_int_status);
|
||||
|
||||
/* Clear the interrupt */
|
||||
mboxProcRegs(pdev).cpu_int_status &= ~cpu_int_status;
|
||||
@@ -1078,7 +1071,7 @@ static QDF_STATUS hif_dev_service_cpu_interrupt(struct hif_sdio_device *pdev)
|
||||
pdev->hif_callbacks.Context,
|
||||
QDF_STATUS_E_FAILURE);
|
||||
} else {
|
||||
hif_err("%s: Unrecognized CPU event", __func__);
|
||||
hif_err("Unrecognized CPU event");
|
||||
}
|
||||
|
||||
return status;
|
||||
@@ -1099,16 +1092,16 @@ static QDF_STATUS hif_dev_service_error_interrupt(struct hif_sdio_device *pdev)
|
||||
uint8_t error_int_status = 0;
|
||||
|
||||
error_int_status = mboxProcRegs(pdev).error_int_status & 0x0F;
|
||||
hif_err("%s: 0x%x", __func__, error_int_status);
|
||||
hif_err("Err intr status: 0x%x", error_int_status);
|
||||
|
||||
if (ERROR_INT_STATUS_WAKEUP_GET(error_int_status))
|
||||
hif_err("%s: Error : Wakeup", __func__);
|
||||
hif_err("Error : Wakeup");
|
||||
|
||||
if (ERROR_INT_STATUS_RX_UNDERFLOW_GET(error_int_status))
|
||||
hif_err("%s: Error : Rx Underflow", __func__);
|
||||
hif_err("Error : Rx Underflow");
|
||||
|
||||
if (ERROR_INT_STATUS_TX_OVERFLOW_GET(error_int_status))
|
||||
hif_err("%s: Error : Tx Overflow", __func__);
|
||||
hif_err("Error : Tx Overflow");
|
||||
|
||||
/* Clear the interrupt */
|
||||
mboxProcRegs(pdev).error_int_status &= ~error_int_status;
|
||||
@@ -1148,7 +1141,7 @@ static QDF_STATUS hif_dev_service_debug_interrupt(struct hif_sdio_device *pdev)
|
||||
QDF_STATUS status;
|
||||
|
||||
/* Send a target failure event to the application */
|
||||
hif_err("%s: Target debug interrupt", __func__);
|
||||
hif_err("Target debug interrupt");
|
||||
|
||||
/* clear the interrupt , the debug error interrupt is counter 0
|
||||
* read counter to clear interrupt
|
||||
@@ -1460,8 +1453,8 @@ QDF_STATUS hif_dev_dsr_handler(void *context)
|
||||
* could be more pending messages. The HIF layer
|
||||
* must ACK the interrupt on behalf of HTC
|
||||
*/
|
||||
hif_info("%s: Yield (RX count: %d)",
|
||||
__func__, pdev->CurrentDSRRecvCount);
|
||||
hif_info("Yield (RX count: %d)",
|
||||
pdev->CurrentDSRRecvCount);
|
||||
} else {
|
||||
hif_ack_interrupt(pdev->HIFDevice);
|
||||
}
|
||||
@@ -1492,10 +1485,10 @@ hif_read_write(struct hif_sdio_dev *device,
|
||||
|
||||
AR_DEBUG_ASSERT(device);
|
||||
AR_DEBUG_ASSERT(device->func);
|
||||
hif_debug("%s: device 0x%pK addr 0x%lX buffer 0x%pK",
|
||||
__func__, device, address, buffer);
|
||||
hif_debug("%s: len %d req 0x%X context 0x%pK",
|
||||
__func__, length, request, context);
|
||||
hif_debug("device 0x%pK addr 0x%lX buffer 0x%pK",
|
||||
device, address, buffer);
|
||||
hif_debug("len %d req 0x%X context 0x%pK",
|
||||
length, request, context);
|
||||
|
||||
/*sdio r/w action is not needed when suspend, so just return */
|
||||
if ((device->is_suspend) &&
|
||||
@@ -1513,7 +1506,7 @@ hif_read_write(struct hif_sdio_dev *device,
|
||||
: "Synch"));
|
||||
busrequest = hif_allocate_bus_request(device);
|
||||
if (!busrequest) {
|
||||
hif_err("%s:bus requests unavail", __func__);
|
||||
hif_err("bus requests unavail");
|
||||
hif_err("%s, addr:0x%lX, len:%d",
|
||||
request & HIF_SDIO_READ ? "READ" :
|
||||
"WRITE", address, length);
|
||||
@@ -1539,12 +1532,10 @@ hif_read_write(struct hif_sdio_dev *device,
|
||||
0) {
|
||||
QDF_STATUS status = busrequest->status;
|
||||
|
||||
hif_debug("%s: sync freeing 0x%lX:0x%X",
|
||||
__func__,
|
||||
hif_debug("sync freeing 0x%lX:0x%X",
|
||||
(unsigned long)busrequest,
|
||||
busrequest->status);
|
||||
hif_debug("%s: freeing req: 0x%X",
|
||||
__func__,
|
||||
hif_debug("freeing req: 0x%X",
|
||||
(unsigned int)request);
|
||||
hif_free_bus_request(device,
|
||||
busrequest);
|
||||
@@ -1554,14 +1545,14 @@ hif_read_write(struct hif_sdio_dev *device,
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
} else {
|
||||
hif_debug("%s: queued async req: 0x%lX",
|
||||
__func__, (unsigned long)busrequest);
|
||||
hif_debug("queued async req: 0x%lX",
|
||||
(unsigned long)busrequest);
|
||||
up(&device->sem_async);
|
||||
return QDF_STATUS_E_PENDING;
|
||||
}
|
||||
} else {
|
||||
hif_err("%s: Invalid execution mode: 0x%08x",
|
||||
__func__, (unsigned int)request);
|
||||
hif_err("Invalid execution mode: 0x%08x",
|
||||
(unsigned int)request);
|
||||
status = QDF_STATUS_E_INVAL;
|
||||
break;
|
||||
}
|
||||
@@ -1589,8 +1580,7 @@ static QDF_STATUS hif_sdio_func_enable(struct hif_softc *ol_sc,
|
||||
|
||||
ret = hif_sdio_quirk_async_intr(ol_sc, func);
|
||||
if (ret) {
|
||||
hif_err("%s: Error setting async intr:%d",
|
||||
__func__, ret);
|
||||
hif_err("Error setting async intr:%d", ret);
|
||||
sdio_release_host(func);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
@@ -1598,24 +1588,22 @@ static QDF_STATUS hif_sdio_func_enable(struct hif_softc *ol_sc,
|
||||
func->enable_timeout = 100;
|
||||
ret = sdio_enable_func(func);
|
||||
if (ret) {
|
||||
hif_err("%s: Unable to enable function: %d",
|
||||
__func__, ret);
|
||||
hif_err("Unable to enable function: %d", ret);
|
||||
sdio_release_host(func);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
ret = sdio_set_block_size(func, HIF_BLOCK_SIZE);
|
||||
if (ret) {
|
||||
hif_err("%s: Unable to set block size 0x%X : %d",
|
||||
__func__, HIF_BLOCK_SIZE, ret);
|
||||
hif_err("Unable to set block size 0x%X : %d",
|
||||
HIF_BLOCK_SIZE, ret);
|
||||
sdio_release_host(func);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
ret = hif_sdio_quirk_mod_strength(ol_sc, func);
|
||||
if (ret) {
|
||||
hif_err("%s: Error setting mod strength : %d",
|
||||
__func__, ret);
|
||||
hif_err("Error setting mod strength : %d", ret);
|
||||
sdio_release_host(func);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
@@ -1649,16 +1637,16 @@ __hif_read_write(struct hif_sdio_dev *device,
|
||||
bool bounced = false;
|
||||
|
||||
if (!device) {
|
||||
hif_err("%s: device null!", __func__);
|
||||
hif_err("Device null!");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
if (!device->func) {
|
||||
hif_err("%s: func null!", __func__);
|
||||
hif_err("func null!");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
hif_debug("%s: addr:0X%06X, len:%08d, %s, %s", __func__,
|
||||
hif_debug("addr:0X%06X, len:%08d, %s, %s",
|
||||
address, length,
|
||||
request & HIF_SDIO_READ ? "Read " : "Write",
|
||||
request & HIF_ASYNCHRONOUS ? "Async" : "Sync ");
|
||||
@@ -1667,8 +1655,7 @@ __hif_read_write(struct hif_sdio_dev *device,
|
||||
if (request & HIF_EXTENDED_IO) {
|
||||
//HIF_INFO_HI("%s: Command type: CMD53\n", __func__);
|
||||
} else {
|
||||
hif_err("%s: Invalid command type: 0x%08x\n",
|
||||
__func__, request);
|
||||
hif_err("Invalid command type: 0x%08x\n", request);
|
||||
status = QDF_STATUS_E_INVAL;
|
||||
break;
|
||||
}
|
||||
@@ -1678,14 +1665,11 @@ __hif_read_write(struct hif_sdio_dev *device,
|
||||
length =
|
||||
(length / HIF_BLOCK_SIZE) *
|
||||
HIF_BLOCK_SIZE;
|
||||
hif_debug("%s: Block mode (BlockLen: %d)",
|
||||
__func__, length);
|
||||
hif_debug("Block mode (BlockLen: %d)", length);
|
||||
} else if (request & HIF_BYTE_BASIS) {
|
||||
hif_debug("%s: Byte mode (BlockLen: %d)",
|
||||
__func__, length);
|
||||
hif_debug("Byte mode (BlockLen: %d)", length);
|
||||
} else {
|
||||
hif_err("%s: Invalid data mode: 0x%08x",
|
||||
__func__, request);
|
||||
hif_err("Invalid data mode: 0x%08x", request);
|
||||
status = QDF_STATUS_E_INVAL;
|
||||
break;
|
||||
}
|
||||
@@ -1700,15 +1684,12 @@ __hif_read_write(struct hif_sdio_dev *device,
|
||||
|
||||
if (request & HIF_FIXED_ADDRESS) {
|
||||
opcode = CMD53_FIXED_ADDRESS;
|
||||
hif_debug("%s: Addr mode: fixed 0x%X",
|
||||
__func__, address);
|
||||
hif_debug("Addr mode: fixed 0x%X", address);
|
||||
} else if (request & HIF_INCREMENTAL_ADDRESS) {
|
||||
opcode = CMD53_INCR_ADDRESS;
|
||||
hif_debug("%s: Address mode: Incremental 0x%X",
|
||||
__func__, address);
|
||||
hif_debug("Address mode: Incremental 0x%X", address);
|
||||
} else {
|
||||
hif_err("%s: Invalid address mode: 0x%08x",
|
||||
__func__, request);
|
||||
hif_err("Invalid address mode: 0x%08x", request);
|
||||
status = QDF_STATUS_E_INVAL;
|
||||
break;
|
||||
}
|
||||
@@ -1721,8 +1702,8 @@ __hif_read_write(struct hif_sdio_dev *device,
|
||||
/* copy the write data to the dma buffer */
|
||||
AR_DEBUG_ASSERT(length <= HIF_DMA_BUFFER_SIZE);
|
||||
if (length > HIF_DMA_BUFFER_SIZE) {
|
||||
hif_err("%s: Invalid write len: %d",
|
||||
__func__, length);
|
||||
hif_err("Invalid write len: %d",
|
||||
length);
|
||||
status = QDF_STATUS_E_INVAL;
|
||||
break;
|
||||
}
|
||||
@@ -1737,14 +1718,14 @@ __hif_read_write(struct hif_sdio_dev *device,
|
||||
if (opcode == CMD53_FIXED_ADDRESS && tbuffer) {
|
||||
ret = sdio_writesb(device->func, address,
|
||||
tbuffer, length);
|
||||
hif_debug("%s:r=%d addr:0x%X, len:%d, 0x%X",
|
||||
__func__, ret, address, length,
|
||||
hif_debug("r=%d addr:0x%X, len:%d, 0x%X",
|
||||
ret, address, length,
|
||||
*(int *)tbuffer);
|
||||
} else if (tbuffer) {
|
||||
ret = sdio_memcpy_toio(device->func, address,
|
||||
tbuffer, length);
|
||||
hif_debug("%s:r=%d addr:0x%X, len:%d, 0x%X",
|
||||
__func__, ret, address, length,
|
||||
hif_debug("r=%d addr:0x%X, len:%d, 0x%X",
|
||||
ret, address, length,
|
||||
*(int *)tbuffer);
|
||||
}
|
||||
} else if (request & HIF_SDIO_READ) {
|
||||
@@ -1753,8 +1734,7 @@ __hif_read_write(struct hif_sdio_dev *device,
|
||||
AR_DEBUG_ASSERT(device->dma_buffer);
|
||||
AR_DEBUG_ASSERT(length <= HIF_DMA_BUFFER_SIZE);
|
||||
if (length > HIF_DMA_BUFFER_SIZE) {
|
||||
hif_err("%s: Invalid read len: %d",
|
||||
__func__, length);
|
||||
hif_err("Invalid read len: %d", length);
|
||||
status = QDF_STATUS_E_INVAL;
|
||||
break;
|
||||
}
|
||||
@@ -1769,15 +1749,15 @@ __hif_read_write(struct hif_sdio_dev *device,
|
||||
if (opcode == CMD53_FIXED_ADDRESS && tbuffer) {
|
||||
ret = sdio_readsb(device->func, tbuffer,
|
||||
address, length);
|
||||
hif_debug("%s:r=%d addr:0x%X, len:%d, 0x%X",
|
||||
__func__, ret, address, length,
|
||||
hif_debug("r=%d addr:0x%X, len:%d, 0x%X",
|
||||
ret, address, length,
|
||||
*(int *)tbuffer);
|
||||
} else if (tbuffer) {
|
||||
ret = sdio_memcpy_fromio(device->func,
|
||||
tbuffer, address,
|
||||
length);
|
||||
hif_debug("%s:r=%d addr:0x%X, len:%d, 0x%X",
|
||||
__func__, ret, address, length,
|
||||
hif_debug("r=%d addr:0x%X, len:%d, 0x%X",
|
||||
ret, address, length,
|
||||
*(int *)tbuffer);
|
||||
}
|
||||
#if HIF_USE_DMA_BOUNCE_BUFFER
|
||||
@@ -1785,16 +1765,16 @@ __hif_read_write(struct hif_sdio_dev *device,
|
||||
memcpy(buffer, tbuffer, length);
|
||||
#endif
|
||||
} else {
|
||||
hif_err("%s: Invalid dir: 0x%08x", __func__, request);
|
||||
hif_err("Invalid dir: 0x%08x", request);
|
||||
status = QDF_STATUS_E_INVAL;
|
||||
return status;
|
||||
}
|
||||
|
||||
if (ret) {
|
||||
hif_err("%s: SDIO bus operation failed!", __func__);
|
||||
hif_err("%s: MMC stack returned : %d", __func__, ret);
|
||||
hif_err("%s: addr:0X%06X, len:%08d, %s, %s",
|
||||
__func__, address, length,
|
||||
hif_err("SDIO bus operation failed!");
|
||||
hif_err("MMC stack returned : %d", ret);
|
||||
hif_err("addr:0X%06X, len:%08d, %s, %s",
|
||||
address, length,
|
||||
request & HIF_SDIO_READ ? "Read " : "Write",
|
||||
request & HIF_ASYNCHRONOUS ?
|
||||
"Async" : "Sync");
|
||||
@@ -1849,8 +1829,8 @@ static int async_task(void *param)
|
||||
else
|
||||
device->asyncreq = NULL;
|
||||
qdf_spin_unlock_irqrestore(&device->asynclock);
|
||||
hif_debug("%s: processing req: 0x%lX",
|
||||
__func__, (unsigned long)request);
|
||||
hif_debug("processing req: 0x%lX",
|
||||
(unsigned long)request);
|
||||
|
||||
if (!claimed) {
|
||||
sdio_claim_host(device->func);
|
||||
@@ -1883,8 +1863,7 @@ static int async_task(void *param)
|
||||
device->htc_callbacks.
|
||||
rw_compl_handler(context, status);
|
||||
} else {
|
||||
hif_debug("%s: upping req: 0x%lX",
|
||||
__func__,
|
||||
hif_debug("upping req: 0x%lX",
|
||||
(unsigned long)request);
|
||||
request->status = status;
|
||||
up(&request->sem_req);
|
||||
@@ -1958,7 +1937,7 @@ QDF_STATUS hif_enable_func(struct hif_softc *ol_sc, struct hif_sdio_dev *device,
|
||||
HIF_ENTER();
|
||||
|
||||
if (!device) {
|
||||
hif_err("%s: HIF device is NULL", __func__);
|
||||
hif_err("HIF device is NULL");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
@@ -1972,8 +1951,7 @@ QDF_STATUS hif_enable_func(struct hif_softc *ol_sc, struct hif_sdio_dev *device,
|
||||
(void *)device,
|
||||
"AR6K Async");
|
||||
if (IS_ERR(device->async_task)) {
|
||||
hif_err("%s: Error creating async task",
|
||||
__func__);
|
||||
hif_err("Error creating async task");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
device->is_disabled = false;
|
||||
|
@@ -95,8 +95,7 @@ QDF_STATUS hif_dev_send_buffer(struct hif_sdio_device *pdev, uint32_t xfer_id,
|
||||
int frag_count = 0, i, count, head_len;
|
||||
|
||||
if (hif_get_send_address(pdev, pipe, &addr)) {
|
||||
hif_err("%s: Invalid address map for pipe 0x%x",
|
||||
__func__, pipe);
|
||||
hif_err("Invalid address map for pipe 0x%x", pipe);
|
||||
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
@@ -216,15 +215,13 @@ QDF_STATUS hif_dev_alloc_and_prepare_rx_packets(struct hif_sdio_device *pdev,
|
||||
for (i = 0; i < messages; i++) {
|
||||
hdr = (HTC_FRAME_HDR *)&look_aheads[i];
|
||||
if (hdr->EndpointID >= ENDPOINT_MAX) {
|
||||
hif_err("%s: Invalid Endpoint:%d",
|
||||
__func__, hdr->EndpointID);
|
||||
hif_err("Invalid Endpoint:%d", hdr->EndpointID);
|
||||
status = QDF_STATUS_E_INVAL;
|
||||
break;
|
||||
}
|
||||
|
||||
if (hdr->PayloadLen > HTC_MAX_PAYLOAD_LENGTH) {
|
||||
hif_err("%s: Payload length %d exceeds max HTC : %u",
|
||||
__func__,
|
||||
hif_err("Payload length %d exceeds max HTC : %u",
|
||||
hdr->PayloadLen,
|
||||
(uint32_t)HTC_MAX_PAYLOAD_LENGTH);
|
||||
status = QDF_STATUS_E_INVAL;
|
||||
@@ -245,8 +242,8 @@ QDF_STATUS hif_dev_alloc_and_prepare_rx_packets(struct hif_sdio_device *pdev,
|
||||
*/
|
||||
num_messages++;
|
||||
|
||||
hif_info("%s: HTC header : %u messages in bundle",
|
||||
__func__, num_messages);
|
||||
hif_info("HTC header : %u messages in bundle",
|
||||
num_messages);
|
||||
}
|
||||
|
||||
full_length = DEV_CALC_RECV_PADDED_LEN(pdev,
|
||||
@@ -299,12 +296,12 @@ QDF_STATUS hif_dev_alloc_and_prepare_rx_packets(struct hif_sdio_device *pdev,
|
||||
|
||||
/* make sure message can fit in the endpoint buffer */
|
||||
if (full_length > packet->BufferLength) {
|
||||
hif_err("%s: Payload Length Error", __func__);
|
||||
hif_err("%s: header reports payload: %u(%u)",
|
||||
__func__, hdr->PayloadLen,
|
||||
hif_err("Payload Length Error");
|
||||
hif_err("header reports payload: %u(%u)",
|
||||
hdr->PayloadLen,
|
||||
full_length);
|
||||
hif_err("%s: endpoint buffer size: %d",
|
||||
__func__, packet->BufferLength);
|
||||
hif_err("endpoint buffer size: %d",
|
||||
packet->BufferLength);
|
||||
status = QDF_STATUS_E_INVAL;
|
||||
break;
|
||||
}
|
||||
@@ -381,7 +378,7 @@ QDF_STATUS hif_dev_process_trailer(struct hif_sdio_device *pdev,
|
||||
HTC_RECORD_HDR *record;
|
||||
HTC_LOOKAHEAD_REPORT *look_ahead;
|
||||
|
||||
hif_debug("%s: length:%d", __func__, length);
|
||||
hif_debug("length:%d", length);
|
||||
|
||||
orig_buffer = buffer;
|
||||
orig_length = length;
|
||||
@@ -399,11 +396,10 @@ QDF_STATUS hif_dev_process_trailer(struct hif_sdio_device *pdev,
|
||||
|
||||
if (record->Length > length) {
|
||||
/* no room left in buffer for record */
|
||||
hif_err("%s: invalid record len: (%u, %u)",
|
||||
__func__, record->Length,
|
||||
hif_err("Invalid record len: (%u, %u)",
|
||||
record->Length,
|
||||
record->RecordID);
|
||||
hif_err("%s: buffer has %d bytes left",
|
||||
__func__, length);
|
||||
hif_err("Buffer has %d bytes left", length);
|
||||
status = QDF_STATUS_E_PROTO;
|
||||
break;
|
||||
}
|
||||
@@ -420,12 +416,12 @@ QDF_STATUS hif_dev_process_trailer(struct hif_sdio_device *pdev,
|
||||
if ((look_ahead->PreValid ==
|
||||
((~look_ahead->PostValid) & 0xFF)) &&
|
||||
next_look_aheads) {
|
||||
hif_debug("%s: look_ahead Report", __func__);
|
||||
hif_debug("%s:prevalid:0x%x, postvalid:0x%x",
|
||||
__func__, look_ahead->PreValid,
|
||||
hif_debug("Look_ahead Report");
|
||||
hif_debug("Prevalid:0x%x, postvalid:0x%x",
|
||||
look_ahead->PreValid,
|
||||
look_ahead->PostValid);
|
||||
hif_debug("%s:from endpoint %d : %u",
|
||||
__func__, from_endpoint,
|
||||
hif_debug("From endpoint %d : %u",
|
||||
from_endpoint,
|
||||
look_ahead->LookAhead0);
|
||||
/* look ahead bytes are valid, copy them over */
|
||||
((uint8_t *)(&next_look_aheads[0]))[0] =
|
||||
@@ -498,8 +494,8 @@ QDF_STATUS hif_dev_process_trailer(struct hif_sdio_device *pdev,
|
||||
}
|
||||
break;
|
||||
default:
|
||||
hif_err("%s: HIF unhandled record: id:%u length:%u",
|
||||
__func__, record->RecordID, record->Length);
|
||||
hif_err("HIF unhandled record: id:%u length:%u",
|
||||
record->RecordID, record->Length);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -515,7 +511,7 @@ QDF_STATUS hif_dev_process_trailer(struct hif_sdio_device *pdev,
|
||||
debug_dump_bytes(orig_buffer, orig_length,
|
||||
"BAD Recv Trailer");
|
||||
|
||||
hif_debug("%s: status = %d", __func__, status);
|
||||
hif_debug("status = %d", status);
|
||||
|
||||
return status;
|
||||
}
|
||||
@@ -572,10 +568,10 @@ QDF_STATUS hif_dev_process_recv_header(struct hif_sdio_device *pdev,
|
||||
|
||||
/* validate the actual header that was refreshed */
|
||||
if (packet->ActualLength > packet->BufferLength) {
|
||||
hif_err("%s: Bundled RECV Look ahead: 0x%X",
|
||||
__func__, look_ahead);
|
||||
hif_err("%s: Invalid HDR payload length(%d)",
|
||||
__func__, payloadLen);
|
||||
hif_err("Bundled RECV Look ahead: 0x%X",
|
||||
look_ahead);
|
||||
hif_err("Invalid HDR payload length(%d)",
|
||||
payloadLen);
|
||||
/* limit this to max buffer just to print out
|
||||
* some of the buffer
|
||||
*/
|
||||
@@ -588,12 +584,11 @@ QDF_STATUS hif_dev_process_recv_header(struct hif_sdio_device *pdev,
|
||||
|
||||
if (packet->Endpoint
|
||||
!= HTC_GET_FIELD(buf, HTC_FRAME_HDR, ENDPOINTID)) {
|
||||
hif_err("%s: Refreshed HDR EP (%d)",
|
||||
__func__,
|
||||
hif_err("Refreshed HDR EP (%d)",
|
||||
HTC_GET_FIELD(buf, HTC_FRAME_HDR,
|
||||
ENDPOINTID));
|
||||
hif_err("%s: doesn't match expected EP (%d)",
|
||||
__func__, packet->Endpoint);
|
||||
hif_err("Doesn't match expected EP (%d)",
|
||||
packet->Endpoint);
|
||||
status = QDF_STATUS_E_PROTO;
|
||||
break;
|
||||
}
|
||||
@@ -604,12 +599,12 @@ QDF_STATUS hif_dev_process_recv_header(struct hif_sdio_device *pdev,
|
||||
* length did not reflect the actual header
|
||||
* in the pending message
|
||||
*/
|
||||
hif_err("%s: lookahead mismatch!", __func__);
|
||||
hif_err("%s: pPkt:0x%lX flags:0x%X",
|
||||
__func__, (unsigned long)packet,
|
||||
hif_err("Lookahead mismatch!");
|
||||
hif_err("pPkt:0x%lX flags:0x%X",
|
||||
(unsigned long)packet,
|
||||
packet->PktInfo.AsRx.HTCRxFlags);
|
||||
hif_err("%s: look_ahead 0x%08X != 0x%08X",
|
||||
__func__, look_ahead,
|
||||
hif_err("Look_ahead 0x%08X != 0x%08X",
|
||||
look_ahead,
|
||||
packet->PktInfo.AsRx.ExpectedHdr);
|
||||
#ifdef ATH_DEBUG_MODULE
|
||||
debug_dump_bytes((uint8_t *)&packet->PktInfo.AsRx.
|
||||
@@ -642,12 +637,10 @@ QDF_STATUS hif_dev_process_recv_header(struct hif_sdio_device *pdev,
|
||||
|
||||
if ((temp < sizeof(HTC_RECORD_HDR)) ||
|
||||
(temp > payloadLen)) {
|
||||
hif_err("%s: invalid header",
|
||||
__func__);
|
||||
hif_err("%s: payloadlength should be :%d",
|
||||
__func__, payloadLen);
|
||||
hif_err("%s: But control bytes is :%d)",
|
||||
__func__, temp);
|
||||
hif_err("Invalid header");
|
||||
hif_err("Payloadlength should be :%d",
|
||||
payloadLen);
|
||||
hif_err("But control bytes is :%d)", temp);
|
||||
status = QDF_STATUS_E_PROTO;
|
||||
break;
|
||||
}
|
||||
|
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2015-2018 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. 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
|
||||
@@ -39,7 +40,7 @@ static inline void ce_enable_irq_in_individual_register(struct hif_softc *scn,
|
||||
|
||||
offset = HOST_IE_ADDRESS + CE_BASE_ADDRESS(ce_id);
|
||||
if (!TARGET_REGISTER_ACCESS_ALLOWED(scn)) {
|
||||
hif_err_rl("%s: target access is not allowed", __func__);
|
||||
hif_err_rl("Target access is not allowed");
|
||||
return;
|
||||
}
|
||||
hif_write32_mb(scn, scn->mem + offset, 1);
|
||||
@@ -52,13 +53,13 @@ static inline void ce_disable_irq_in_individual_register(struct hif_softc *scn,
|
||||
|
||||
offset = HOST_IE_ADDRESS + CE_BASE_ADDRESS(ce_id);
|
||||
if (!TARGET_REGISTER_ACCESS_ALLOWED(scn)) {
|
||||
hif_err_rl("%s: target access is not allowed", __func__);
|
||||
hif_err_rl("Target access is not allowed");
|
||||
return;
|
||||
}
|
||||
hif_write32_mb(scn, scn->mem + offset, 0);
|
||||
|
||||
if (!TARGET_REGISTER_ACCESS_ALLOWED(scn)) {
|
||||
hif_err_rl("%s: target access is not allowed", __func__);
|
||||
hif_err_rl("Target access is not allowed");
|
||||
return;
|
||||
}
|
||||
hif_read32_mb(scn, scn->mem + offset);
|
||||
|
Reference in New Issue
Block a user