iwlwifi: remove dump_regs() from transport ops
This is used only within PCIe, and there's no reason to go through the transport methods for a function call within PCIe itself. Remove the dump_regs() method and call the function directly. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
This commit is contained in:
parent
89d5e83353
commit
4290eaad7a
|
@ -539,9 +539,6 @@ struct iwl_trans_rxq_dma_data {
|
||||||
* @dump_data: return a vmalloc'ed buffer with debug data, maybe containing last
|
* @dump_data: return a vmalloc'ed buffer with debug data, maybe containing last
|
||||||
* TX'ed commands and similar. The buffer will be vfree'd by the caller.
|
* TX'ed commands and similar. The buffer will be vfree'd by the caller.
|
||||||
* Note that the transport must fill in the proper file headers.
|
* Note that the transport must fill in the proper file headers.
|
||||||
* @dump_regs: dump using IWL_ERR configuration space and memory mapped
|
|
||||||
* registers of the device to diagnose failure, e.g., when HW becomes
|
|
||||||
* inaccessible.
|
|
||||||
*/
|
*/
|
||||||
struct iwl_trans_ops {
|
struct iwl_trans_ops {
|
||||||
|
|
||||||
|
@ -612,8 +609,6 @@ struct iwl_trans_ops {
|
||||||
struct iwl_trans_dump_data *(*dump_data)(struct iwl_trans *trans,
|
struct iwl_trans_dump_data *(*dump_data)(struct iwl_trans *trans,
|
||||||
const struct iwl_fw_dbg_trigger_tlv
|
const struct iwl_fw_dbg_trigger_tlv
|
||||||
*trigger);
|
*trigger);
|
||||||
|
|
||||||
void (*dump_regs)(struct iwl_trans *trans);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -898,12 +893,6 @@ iwl_trans_dump_data(struct iwl_trans *trans,
|
||||||
return trans->ops->dump_data(trans, trigger);
|
return trans->ops->dump_data(trans, trigger);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void iwl_trans_dump_regs(struct iwl_trans *trans)
|
|
||||||
{
|
|
||||||
if (trans->ops->dump_regs)
|
|
||||||
trans->ops->dump_regs(trans);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline struct iwl_device_cmd *
|
static inline struct iwl_device_cmd *
|
||||||
iwl_trans_alloc_tx_cmd(struct iwl_trans *trans)
|
iwl_trans_alloc_tx_cmd(struct iwl_trans *trans)
|
||||||
{
|
{
|
||||||
|
|
|
@ -988,6 +988,7 @@ static inline void __iwl_trans_pcie_set_bit(struct iwl_trans *trans,
|
||||||
}
|
}
|
||||||
|
|
||||||
void iwl_trans_pcie_rf_kill(struct iwl_trans *trans, bool state);
|
void iwl_trans_pcie_rf_kill(struct iwl_trans *trans, bool state);
|
||||||
|
void iwl_trans_pcie_dump_regs(struct iwl_trans *trans);
|
||||||
|
|
||||||
#ifdef CONFIG_IWLWIFI_DEBUGFS
|
#ifdef CONFIG_IWLWIFI_DEBUGFS
|
||||||
int iwl_trans_pcie_dbgfs_register(struct iwl_trans *trans);
|
int iwl_trans_pcie_dbgfs_register(struct iwl_trans *trans);
|
||||||
|
|
|
@ -92,7 +92,7 @@
|
||||||
#define IWL_FW_MEM_EXTENDED_START 0x40000
|
#define IWL_FW_MEM_EXTENDED_START 0x40000
|
||||||
#define IWL_FW_MEM_EXTENDED_END 0x57FFF
|
#define IWL_FW_MEM_EXTENDED_END 0x57FFF
|
||||||
|
|
||||||
static void iwl_trans_pcie_dump_regs(struct iwl_trans *trans)
|
void iwl_trans_pcie_dump_regs(struct iwl_trans *trans)
|
||||||
{
|
{
|
||||||
#define PCI_DUMP_SIZE 64
|
#define PCI_DUMP_SIZE 64
|
||||||
#define PREFIX_LEN 32
|
#define PREFIX_LEN 32
|
||||||
|
@ -3175,7 +3175,6 @@ static void iwl_trans_pcie_resume(struct iwl_trans *trans)
|
||||||
.ref = iwl_trans_pcie_ref, \
|
.ref = iwl_trans_pcie_ref, \
|
||||||
.unref = iwl_trans_pcie_unref, \
|
.unref = iwl_trans_pcie_unref, \
|
||||||
.dump_data = iwl_trans_pcie_dump_data, \
|
.dump_data = iwl_trans_pcie_dump_data, \
|
||||||
.dump_regs = iwl_trans_pcie_dump_regs, \
|
|
||||||
.d3_suspend = iwl_trans_pcie_d3_suspend, \
|
.d3_suspend = iwl_trans_pcie_d3_suspend, \
|
||||||
.d3_resume = iwl_trans_pcie_d3_resume
|
.d3_resume = iwl_trans_pcie_d3_resume
|
||||||
|
|
||||||
|
|
|
@ -1912,7 +1912,7 @@ static int iwl_pcie_send_hcmd_sync(struct iwl_trans *trans,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (test_bit(STATUS_FW_ERROR, &trans->status)) {
|
if (test_bit(STATUS_FW_ERROR, &trans->status)) {
|
||||||
iwl_trans_dump_regs(trans);
|
iwl_trans_pcie_dump_regs(trans);
|
||||||
IWL_ERR(trans, "FW error in SYNC CMD %s\n",
|
IWL_ERR(trans, "FW error in SYNC CMD %s\n",
|
||||||
iwl_get_cmd_string(trans, cmd->id));
|
iwl_get_cmd_string(trans, cmd->id));
|
||||||
dump_stack();
|
dump_stack();
|
||||||
|
|
Loading…
Reference in New Issue