Commit 23ba9340 authored by Emmanuel Grumbach's avatar Emmanuel Grumbach

iwlwifi: remove unused parameter from grab_nic_access

All the callers used silent = false.
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
parent a3f7ba5c
...@@ -429,7 +429,7 @@ static void iwl_print_cont_event_trace(struct iwl_priv *priv, u32 base, ...@@ -429,7 +429,7 @@ static void iwl_print_cont_event_trace(struct iwl_priv *priv, u32 base,
ptr = base + (4 * sizeof(u32)) + (start_idx * 3 * sizeof(u32)); ptr = base + (4 * sizeof(u32)) + (start_idx * 3 * sizeof(u32));
/* Make sure device is powered up for SRAM reads */ /* Make sure device is powered up for SRAM reads */
if (!iwl_trans_grab_nic_access(priv->trans, false, &reg_flags)) if (!iwl_trans_grab_nic_access(priv->trans, &reg_flags))
return; return;
/* Set starting address; reads will auto-increment */ /* Set starting address; reads will auto-increment */
...@@ -1731,7 +1731,7 @@ static int iwl_print_event_log(struct iwl_priv *priv, u32 start_idx, ...@@ -1731,7 +1731,7 @@ static int iwl_print_event_log(struct iwl_priv *priv, u32 start_idx,
ptr = base + EVENT_START_OFFSET + (start_idx * event_size); ptr = base + EVENT_START_OFFSET + (start_idx * event_size);
/* Make sure device is powered up for SRAM reads */ /* Make sure device is powered up for SRAM reads */
if (!iwl_trans_grab_nic_access(trans, false, &reg_flags)) if (!iwl_trans_grab_nic_access(trans, &reg_flags))
return pos; return pos;
/* Set starting address; reads will auto-increment */ /* Set starting address; reads will auto-increment */
......
...@@ -184,7 +184,7 @@ static void iwl_tt_check_exit_ct_kill(unsigned long data) ...@@ -184,7 +184,7 @@ static void iwl_tt_check_exit_ct_kill(unsigned long data)
priv->thermal_throttle.ct_kill_toggle = true; priv->thermal_throttle.ct_kill_toggle = true;
} }
iwl_read32(priv->trans, CSR_UCODE_DRV_GP1); iwl_read32(priv->trans, CSR_UCODE_DRV_GP1);
if (iwl_trans_grab_nic_access(priv->trans, false, &flags)) if (iwl_trans_grab_nic_access(priv->trans, &flags))
iwl_trans_release_nic_access(priv->trans, &flags); iwl_trans_release_nic_access(priv->trans, &flags);
/* Reschedule the ct_kill timer to occur in /* Reschedule the ct_kill timer to occur in
......
...@@ -82,7 +82,7 @@ u32 iwl_read_direct32(struct iwl_trans *trans, u32 reg) ...@@ -82,7 +82,7 @@ u32 iwl_read_direct32(struct iwl_trans *trans, u32 reg)
{ {
u32 value = 0x5a5a5a5a; u32 value = 0x5a5a5a5a;
unsigned long flags; unsigned long flags;
if (iwl_trans_grab_nic_access(trans, false, &flags)) { if (iwl_trans_grab_nic_access(trans, &flags)) {
value = iwl_read32(trans, reg); value = iwl_read32(trans, reg);
iwl_trans_release_nic_access(trans, &flags); iwl_trans_release_nic_access(trans, &flags);
} }
...@@ -95,7 +95,7 @@ void iwl_write_direct32(struct iwl_trans *trans, u32 reg, u32 value) ...@@ -95,7 +95,7 @@ void iwl_write_direct32(struct iwl_trans *trans, u32 reg, u32 value)
{ {
unsigned long flags; unsigned long flags;
if (iwl_trans_grab_nic_access(trans, false, &flags)) { if (iwl_trans_grab_nic_access(trans, &flags)) {
iwl_write32(trans, reg, value); iwl_write32(trans, reg, value);
iwl_trans_release_nic_access(trans, &flags); iwl_trans_release_nic_access(trans, &flags);
} }
...@@ -138,7 +138,7 @@ u32 iwl_read_prph(struct iwl_trans *trans, u32 ofs) ...@@ -138,7 +138,7 @@ u32 iwl_read_prph(struct iwl_trans *trans, u32 ofs)
unsigned long flags; unsigned long flags;
u32 val = 0x5a5a5a5a; u32 val = 0x5a5a5a5a;
if (iwl_trans_grab_nic_access(trans, false, &flags)) { if (iwl_trans_grab_nic_access(trans, &flags)) {
val = iwl_read_prph_no_grab(trans, ofs); val = iwl_read_prph_no_grab(trans, ofs);
iwl_trans_release_nic_access(trans, &flags); iwl_trans_release_nic_access(trans, &flags);
} }
...@@ -150,7 +150,7 @@ void iwl_write_prph(struct iwl_trans *trans, u32 ofs, u32 val) ...@@ -150,7 +150,7 @@ void iwl_write_prph(struct iwl_trans *trans, u32 ofs, u32 val)
{ {
unsigned long flags; unsigned long flags;
if (iwl_trans_grab_nic_access(trans, false, &flags)) { if (iwl_trans_grab_nic_access(trans, &flags)) {
iwl_write_prph_no_grab(trans, ofs, val); iwl_write_prph_no_grab(trans, ofs, val);
iwl_trans_release_nic_access(trans, &flags); iwl_trans_release_nic_access(trans, &flags);
} }
...@@ -176,7 +176,7 @@ void iwl_set_bits_prph(struct iwl_trans *trans, u32 ofs, u32 mask) ...@@ -176,7 +176,7 @@ void iwl_set_bits_prph(struct iwl_trans *trans, u32 ofs, u32 mask)
{ {
unsigned long flags; unsigned long flags;
if (iwl_trans_grab_nic_access(trans, false, &flags)) { if (iwl_trans_grab_nic_access(trans, &flags)) {
iwl_write_prph_no_grab(trans, ofs, iwl_write_prph_no_grab(trans, ofs,
iwl_read_prph_no_grab(trans, ofs) | iwl_read_prph_no_grab(trans, ofs) |
mask); mask);
...@@ -190,7 +190,7 @@ void iwl_set_bits_mask_prph(struct iwl_trans *trans, u32 ofs, ...@@ -190,7 +190,7 @@ void iwl_set_bits_mask_prph(struct iwl_trans *trans, u32 ofs,
{ {
unsigned long flags; unsigned long flags;
if (iwl_trans_grab_nic_access(trans, false, &flags)) { if (iwl_trans_grab_nic_access(trans, &flags)) {
iwl_write_prph_no_grab(trans, ofs, iwl_write_prph_no_grab(trans, ofs,
(iwl_read_prph_no_grab(trans, ofs) & (iwl_read_prph_no_grab(trans, ofs) &
mask) | bits); mask) | bits);
...@@ -204,7 +204,7 @@ void iwl_clear_bits_prph(struct iwl_trans *trans, u32 ofs, u32 mask) ...@@ -204,7 +204,7 @@ void iwl_clear_bits_prph(struct iwl_trans *trans, u32 ofs, u32 mask)
unsigned long flags; unsigned long flags;
u32 val; u32 val;
if (iwl_trans_grab_nic_access(trans, false, &flags)) { if (iwl_trans_grab_nic_access(trans, &flags)) {
val = iwl_read_prph_no_grab(trans, ofs); val = iwl_read_prph_no_grab(trans, ofs);
iwl_write_prph_no_grab(trans, ofs, (val & ~mask)); iwl_write_prph_no_grab(trans, ofs, (val & ~mask));
iwl_trans_release_nic_access(trans, &flags); iwl_trans_release_nic_access(trans, &flags);
......
...@@ -652,8 +652,7 @@ struct iwl_trans_ops { ...@@ -652,8 +652,7 @@ struct iwl_trans_ops {
void (*configure)(struct iwl_trans *trans, void (*configure)(struct iwl_trans *trans,
const struct iwl_trans_config *trans_cfg); const struct iwl_trans_config *trans_cfg);
void (*set_pmi)(struct iwl_trans *trans, bool state); void (*set_pmi)(struct iwl_trans *trans, bool state);
bool (*grab_nic_access)(struct iwl_trans *trans, bool silent, bool (*grab_nic_access)(struct iwl_trans *trans, unsigned long *flags);
unsigned long *flags);
void (*release_nic_access)(struct iwl_trans *trans, void (*release_nic_access)(struct iwl_trans *trans,
unsigned long *flags); unsigned long *flags);
void (*set_bits_mask)(struct iwl_trans *trans, u32 reg, u32 mask, void (*set_bits_mask)(struct iwl_trans *trans, u32 reg, u32 mask,
...@@ -1170,9 +1169,9 @@ iwl_trans_set_bits_mask(struct iwl_trans *trans, u32 reg, u32 mask, u32 value) ...@@ -1170,9 +1169,9 @@ iwl_trans_set_bits_mask(struct iwl_trans *trans, u32 reg, u32 mask, u32 value)
trans->ops->set_bits_mask(trans, reg, mask, value); trans->ops->set_bits_mask(trans, reg, mask, value);
} }
#define iwl_trans_grab_nic_access(trans, silent, flags) \ #define iwl_trans_grab_nic_access(trans, flags) \
__cond_lock(nic_access, \ __cond_lock(nic_access, \
likely((trans)->ops->grab_nic_access(trans, silent, flags))) likely((trans)->ops->grab_nic_access(trans, flags)))
static inline void __releases(nic_access) static inline void __releases(nic_access)
iwl_trans_release_nic_access(struct iwl_trans *trans, unsigned long *flags) iwl_trans_release_nic_access(struct iwl_trans *trans, unsigned long *flags)
......
...@@ -122,7 +122,7 @@ static void iwl_mvm_dump_fifos(struct iwl_mvm *mvm, ...@@ -122,7 +122,7 @@ static void iwl_mvm_dump_fifos(struct iwl_mvm *mvm,
unsigned long flags; unsigned long flags;
int i, j; int i, j;
if (!iwl_trans_grab_nic_access(mvm->trans, false, &flags)) if (!iwl_trans_grab_nic_access(mvm->trans, &flags))
return; return;
/* Pull RXF data from all RXFs */ /* Pull RXF data from all RXFs */
...@@ -359,7 +359,7 @@ static u32 iwl_dump_prph(struct iwl_trans *trans, ...@@ -359,7 +359,7 @@ static u32 iwl_dump_prph(struct iwl_trans *trans,
unsigned long flags; unsigned long flags;
u32 prph_len = 0, i; u32 prph_len = 0, i;
if (!iwl_trans_grab_nic_access(trans, false, &flags)) if (!iwl_trans_grab_nic_access(trans, &flags))
return 0; return 0;
for (i = 0; i < ARRAY_SIZE(iwl_prph_dump_addr); i++) { for (i = 0; i < ARRAY_SIZE(iwl_prph_dump_addr); i++) {
......
...@@ -1505,7 +1505,7 @@ static void iwl_trans_pcie_set_pmi(struct iwl_trans *trans, bool state) ...@@ -1505,7 +1505,7 @@ static void iwl_trans_pcie_set_pmi(struct iwl_trans *trans, bool state)
clear_bit(STATUS_TPOWER_PMI, &trans->status); clear_bit(STATUS_TPOWER_PMI, &trans->status);
} }
static bool iwl_trans_pcie_grab_nic_access(struct iwl_trans *trans, bool silent, static bool iwl_trans_pcie_grab_nic_access(struct iwl_trans *trans,
unsigned long *flags) unsigned long *flags)
{ {
int ret; int ret;
...@@ -1547,15 +1547,12 @@ static bool iwl_trans_pcie_grab_nic_access(struct iwl_trans *trans, bool silent, ...@@ -1547,15 +1547,12 @@ static bool iwl_trans_pcie_grab_nic_access(struct iwl_trans *trans, bool silent,
CSR_GP_CNTRL_REG_FLAG_GOING_TO_SLEEP), 15000); CSR_GP_CNTRL_REG_FLAG_GOING_TO_SLEEP), 15000);
if (unlikely(ret < 0)) { if (unlikely(ret < 0)) {
iwl_write32(trans, CSR_RESET, CSR_RESET_REG_FLAG_FORCE_NMI); iwl_write32(trans, CSR_RESET, CSR_RESET_REG_FLAG_FORCE_NMI);
if (!silent) {
u32 val = iwl_read32(trans, CSR_GP_CNTRL);
WARN_ONCE(1, WARN_ONCE(1,
"Timeout waiting for hardware access (CSR_GP_CNTRL 0x%08x)\n", "Timeout waiting for hardware access (CSR_GP_CNTRL 0x%08x)\n",
val); iwl_read32(trans, CSR_GP_CNTRL));
spin_unlock_irqrestore(&trans_pcie->reg_lock, *flags); spin_unlock_irqrestore(&trans_pcie->reg_lock, *flags);
return false; return false;
} }
}
out: out:
/* /*
...@@ -1602,7 +1599,7 @@ static int iwl_trans_pcie_read_mem(struct iwl_trans *trans, u32 addr, ...@@ -1602,7 +1599,7 @@ static int iwl_trans_pcie_read_mem(struct iwl_trans *trans, u32 addr,
int offs, ret = 0; int offs, ret = 0;
u32 *vals = buf; u32 *vals = buf;
if (iwl_trans_grab_nic_access(trans, false, &flags)) { if (iwl_trans_grab_nic_access(trans, &flags)) {
iwl_write32(trans, HBUS_TARG_MEM_RADDR, addr); iwl_write32(trans, HBUS_TARG_MEM_RADDR, addr);
for (offs = 0; offs < dwords; offs++) for (offs = 0; offs < dwords; offs++)
vals[offs] = iwl_read32(trans, HBUS_TARG_MEM_RDAT); vals[offs] = iwl_read32(trans, HBUS_TARG_MEM_RDAT);
...@@ -1620,7 +1617,7 @@ static int iwl_trans_pcie_write_mem(struct iwl_trans *trans, u32 addr, ...@@ -1620,7 +1617,7 @@ static int iwl_trans_pcie_write_mem(struct iwl_trans *trans, u32 addr,
int offs, ret = 0; int offs, ret = 0;
const u32 *vals = buf; const u32 *vals = buf;
if (iwl_trans_grab_nic_access(trans, false, &flags)) { if (iwl_trans_grab_nic_access(trans, &flags)) {
iwl_write32(trans, HBUS_TARG_MEM_WADDR, addr); iwl_write32(trans, HBUS_TARG_MEM_WADDR, addr);
for (offs = 0; offs < dwords; offs++) for (offs = 0; offs < dwords; offs++)
iwl_write32(trans, HBUS_TARG_MEM_WDAT, iwl_write32(trans, HBUS_TARG_MEM_WDAT,
...@@ -2246,7 +2243,7 @@ static u32 iwl_trans_pcie_fh_regs_dump(struct iwl_trans *trans, ...@@ -2246,7 +2243,7 @@ static u32 iwl_trans_pcie_fh_regs_dump(struct iwl_trans *trans,
__le32 *val; __le32 *val;
int i; int i;
if (!iwl_trans_grab_nic_access(trans, false, &flags)) if (!iwl_trans_grab_nic_access(trans, &flags))
return 0; return 0;
(*data)->type = cpu_to_le32(IWL_FW_ERROR_DUMP_FH_REGS); (*data)->type = cpu_to_le32(IWL_FW_ERROR_DUMP_FH_REGS);
...@@ -2273,7 +2270,7 @@ iwl_trans_pci_dump_marbh_monitor(struct iwl_trans *trans, ...@@ -2273,7 +2270,7 @@ iwl_trans_pci_dump_marbh_monitor(struct iwl_trans *trans,
unsigned long flags; unsigned long flags;
u32 i; u32 i;
if (!iwl_trans_grab_nic_access(trans, false, &flags)) if (!iwl_trans_grab_nic_access(trans, &flags))
return 0; return 0;
iwl_write_prph_no_grab(trans, MON_DMARB_RD_CTL_ADDR, 0x1); iwl_write_prph_no_grab(trans, MON_DMARB_RD_CTL_ADDR, 0x1);
...@@ -2658,7 +2655,7 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev, ...@@ -2658,7 +2655,7 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev,
goto out_pci_disable_msi; goto out_pci_disable_msi;
} }
if (iwl_trans_grab_nic_access(trans, false, &flags)) { if (iwl_trans_grab_nic_access(trans, &flags)) {
u32 hw_step; u32 hw_step;
hw_step = iwl_read_prph_no_grab(trans, WFPM_CTRL_REG); hw_step = iwl_read_prph_no_grab(trans, WFPM_CTRL_REG);
......
...@@ -770,7 +770,7 @@ static void iwl_pcie_tx_stop_fh(struct iwl_trans *trans) ...@@ -770,7 +770,7 @@ static void iwl_pcie_tx_stop_fh(struct iwl_trans *trans)
spin_lock(&trans_pcie->irq_lock); spin_lock(&trans_pcie->irq_lock);
if (!iwl_trans_grab_nic_access(trans, false, &flags)) if (!iwl_trans_grab_nic_access(trans, &flags))
goto out; goto out;
/* Stop each Tx DMA channel */ /* Stop each Tx DMA channel */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment