aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2015-12-17 04:55:13 -0500
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2015-12-21 03:11:39 -0500
commit23ba93403b29f828feb29c06397355213a5af4b5 (patch)
tree444341a39da36d76a981b3de81f59d6f10cb791d /drivers/net/wireless/intel
parenta3f7ba5c8825879cc76110bc8dcadf92a6d5fa8e (diff)
iwlwifi: remove unused parameter from grab_nic_access
All the callers used silent = false. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/dvm/main.c4
-rw-r--r--drivers/net/wireless/intel/iwlwifi/dvm/tt.c2
-rw-r--r--drivers/net/wireless/intel/iwlwifi/iwl-io.c14
-rw-r--r--drivers/net/wireless/intel/iwlwifi/iwl-trans.h7
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c4
-rw-r--r--drivers/net/wireless/intel/iwlwifi/pcie/trans.c27
-rw-r--r--drivers/net/wireless/intel/iwlwifi/pcie/tx.c2
7 files changed, 28 insertions, 32 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/main.c b/drivers/net/wireless/intel/iwlwifi/dvm/main.c
index 94bc66adef2f..f62c2d727ddb 100644
--- a/drivers/net/wireless/intel/iwlwifi/dvm/main.c
+++ b/drivers/net/wireless/intel/iwlwifi/dvm/main.c
@@ -429,7 +429,7 @@ static void iwl_print_cont_event_trace(struct iwl_priv *priv, u32 base,
429 ptr = base + (4 * sizeof(u32)) + (start_idx * 3 * sizeof(u32)); 429 ptr = base + (4 * sizeof(u32)) + (start_idx * 3 * sizeof(u32));
430 430
431 /* Make sure device is powered up for SRAM reads */ 431 /* Make sure device is powered up for SRAM reads */
432 if (!iwl_trans_grab_nic_access(priv->trans, false, &reg_flags)) 432 if (!iwl_trans_grab_nic_access(priv->trans, &reg_flags))
433 return; 433 return;
434 434
435 /* Set starting address; reads will auto-increment */ 435 /* 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 ptr = base + EVENT_START_OFFSET + (start_idx * event_size); 1731 ptr = base + EVENT_START_OFFSET + (start_idx * event_size);
1732 1732
1733 /* Make sure device is powered up for SRAM reads */ 1733 /* Make sure device is powered up for SRAM reads */
1734 if (!iwl_trans_grab_nic_access(trans, false, &reg_flags)) 1734 if (!iwl_trans_grab_nic_access(trans, &reg_flags))
1735 return pos; 1735 return pos;
1736 1736
1737 /* Set starting address; reads will auto-increment */ 1737 /* Set starting address; reads will auto-increment */
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/tt.c b/drivers/net/wireless/intel/iwlwifi/dvm/tt.c
index 7decfc5677c6..5b73492e7ff7 100644
--- a/drivers/net/wireless/intel/iwlwifi/dvm/tt.c
+++ b/drivers/net/wireless/intel/iwlwifi/dvm/tt.c
@@ -184,7 +184,7 @@ static void iwl_tt_check_exit_ct_kill(unsigned long data)
184 priv->thermal_throttle.ct_kill_toggle = true; 184 priv->thermal_throttle.ct_kill_toggle = true;
185 } 185 }
186 iwl_read32(priv->trans, CSR_UCODE_DRV_GP1); 186 iwl_read32(priv->trans, CSR_UCODE_DRV_GP1);
187 if (iwl_trans_grab_nic_access(priv->trans, false, &flags)) 187 if (iwl_trans_grab_nic_access(priv->trans, &flags))
188 iwl_trans_release_nic_access(priv->trans, &flags); 188 iwl_trans_release_nic_access(priv->trans, &flags);
189 189
190 /* Reschedule the ct_kill timer to occur in 190 /* Reschedule the ct_kill timer to occur in
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-io.c b/drivers/net/wireless/intel/iwlwifi/iwl-io.c
index 07ad5c80e6ae..32c8f84ae519 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-io.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-io.c
@@ -82,7 +82,7 @@ u32 iwl_read_direct32(struct iwl_trans *trans, u32 reg)
82{ 82{
83 u32 value = 0x5a5a5a5a; 83 u32 value = 0x5a5a5a5a;
84 unsigned long flags; 84 unsigned long flags;
85 if (iwl_trans_grab_nic_access(trans, false, &flags)) { 85 if (iwl_trans_grab_nic_access(trans, &flags)) {
86 value = iwl_read32(trans, reg); 86 value = iwl_read32(trans, reg);
87 iwl_trans_release_nic_access(trans, &flags); 87 iwl_trans_release_nic_access(trans, &flags);
88 } 88 }
@@ -95,7 +95,7 @@ void iwl_write_direct32(struct iwl_trans *trans, u32 reg, u32 value)
95{ 95{
96 unsigned long flags; 96 unsigned long flags;
97 97
98 if (iwl_trans_grab_nic_access(trans, false, &flags)) { 98 if (iwl_trans_grab_nic_access(trans, &flags)) {
99 iwl_write32(trans, reg, value); 99 iwl_write32(trans, reg, value);
100 iwl_trans_release_nic_access(trans, &flags); 100 iwl_trans_release_nic_access(trans, &flags);
101 } 101 }
@@ -138,7 +138,7 @@ u32 iwl_read_prph(struct iwl_trans *trans, u32 ofs)
138 unsigned long flags; 138 unsigned long flags;
139 u32 val = 0x5a5a5a5a; 139 u32 val = 0x5a5a5a5a;
140 140
141 if (iwl_trans_grab_nic_access(trans, false, &flags)) { 141 if (iwl_trans_grab_nic_access(trans, &flags)) {
142 val = iwl_read_prph_no_grab(trans, ofs); 142 val = iwl_read_prph_no_grab(trans, ofs);
143 iwl_trans_release_nic_access(trans, &flags); 143 iwl_trans_release_nic_access(trans, &flags);
144 } 144 }
@@ -150,7 +150,7 @@ void iwl_write_prph(struct iwl_trans *trans, u32 ofs, u32 val)
150{ 150{
151 unsigned long flags; 151 unsigned long flags;
152 152
153 if (iwl_trans_grab_nic_access(trans, false, &flags)) { 153 if (iwl_trans_grab_nic_access(trans, &flags)) {
154 iwl_write_prph_no_grab(trans, ofs, val); 154 iwl_write_prph_no_grab(trans, ofs, val);
155 iwl_trans_release_nic_access(trans, &flags); 155 iwl_trans_release_nic_access(trans, &flags);
156 } 156 }
@@ -176,7 +176,7 @@ void iwl_set_bits_prph(struct iwl_trans *trans, u32 ofs, u32 mask)
176{ 176{
177 unsigned long flags; 177 unsigned long flags;
178 178
179 if (iwl_trans_grab_nic_access(trans, false, &flags)) { 179 if (iwl_trans_grab_nic_access(trans, &flags)) {
180 iwl_write_prph_no_grab(trans, ofs, 180 iwl_write_prph_no_grab(trans, ofs,
181 iwl_read_prph_no_grab(trans, ofs) | 181 iwl_read_prph_no_grab(trans, ofs) |
182 mask); 182 mask);
@@ -190,7 +190,7 @@ void iwl_set_bits_mask_prph(struct iwl_trans *trans, u32 ofs,
190{ 190{
191 unsigned long flags; 191 unsigned long flags;
192 192
193 if (iwl_trans_grab_nic_access(trans, false, &flags)) { 193 if (iwl_trans_grab_nic_access(trans, &flags)) {
194 iwl_write_prph_no_grab(trans, ofs, 194 iwl_write_prph_no_grab(trans, ofs,
195 (iwl_read_prph_no_grab(trans, ofs) & 195 (iwl_read_prph_no_grab(trans, ofs) &
196 mask) | bits); 196 mask) | bits);
@@ -204,7 +204,7 @@ void iwl_clear_bits_prph(struct iwl_trans *trans, u32 ofs, u32 mask)
204 unsigned long flags; 204 unsigned long flags;
205 u32 val; 205 u32 val;
206 206
207 if (iwl_trans_grab_nic_access(trans, false, &flags)) { 207 if (iwl_trans_grab_nic_access(trans, &flags)) {
208 val = iwl_read_prph_no_grab(trans, ofs); 208 val = iwl_read_prph_no_grab(trans, ofs);
209 iwl_write_prph_no_grab(trans, ofs, (val & ~mask)); 209 iwl_write_prph_no_grab(trans, ofs, (val & ~mask));
210 iwl_trans_release_nic_access(trans, &flags); 210 iwl_trans_release_nic_access(trans, &flags);
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
index 43a48746d731..290d538a3190 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
@@ -652,8 +652,7 @@ struct iwl_trans_ops {
652 void (*configure)(struct iwl_trans *trans, 652 void (*configure)(struct iwl_trans *trans,
653 const struct iwl_trans_config *trans_cfg); 653 const struct iwl_trans_config *trans_cfg);
654 void (*set_pmi)(struct iwl_trans *trans, bool state); 654 void (*set_pmi)(struct iwl_trans *trans, bool state);
655 bool (*grab_nic_access)(struct iwl_trans *trans, bool silent, 655 bool (*grab_nic_access)(struct iwl_trans *trans, unsigned long *flags);
656 unsigned long *flags);
657 void (*release_nic_access)(struct iwl_trans *trans, 656 void (*release_nic_access)(struct iwl_trans *trans,
658 unsigned long *flags); 657 unsigned long *flags);
659 void (*set_bits_mask)(struct iwl_trans *trans, u32 reg, u32 mask, 658 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 trans->ops->set_bits_mask(trans, reg, mask, value); 1169 trans->ops->set_bits_mask(trans, reg, mask, value);
1171} 1170}
1172 1171
1173#define iwl_trans_grab_nic_access(trans, silent, flags) \ 1172#define iwl_trans_grab_nic_access(trans, flags) \
1174 __cond_lock(nic_access, \ 1173 __cond_lock(nic_access, \
1175 likely((trans)->ops->grab_nic_access(trans, silent, flags))) 1174 likely((trans)->ops->grab_nic_access(trans, flags)))
1176 1175
1177static inline void __releases(nic_access) 1176static inline void __releases(nic_access)
1178iwl_trans_release_nic_access(struct iwl_trans *trans, unsigned long *flags) 1177iwl_trans_release_nic_access(struct iwl_trans *trans, unsigned long *flags)
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c
index 29d54ec8ebea..f406c76b4302 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c
@@ -122,7 +122,7 @@ static void iwl_mvm_dump_fifos(struct iwl_mvm *mvm,
122 unsigned long flags; 122 unsigned long flags;
123 int i, j; 123 int i, j;
124 124
125 if (!iwl_trans_grab_nic_access(mvm->trans, false, &flags)) 125 if (!iwl_trans_grab_nic_access(mvm->trans, &flags))
126 return; 126 return;
127 127
128 /* Pull RXF data from all RXFs */ 128 /* Pull RXF data from all RXFs */
@@ -359,7 +359,7 @@ static u32 iwl_dump_prph(struct iwl_trans *trans,
359 unsigned long flags; 359 unsigned long flags;
360 u32 prph_len = 0, i; 360 u32 prph_len = 0, i;
361 361
362 if (!iwl_trans_grab_nic_access(trans, false, &flags)) 362 if (!iwl_trans_grab_nic_access(trans, &flags))
363 return 0; 363 return 0;
364 364
365 for (i = 0; i < ARRAY_SIZE(iwl_prph_dump_addr); i++) { 365 for (i = 0; i < ARRAY_SIZE(iwl_prph_dump_addr); i++) {
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
index e8041907e7e2..d44e7afad593 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
@@ -1505,8 +1505,8 @@ static void iwl_trans_pcie_set_pmi(struct iwl_trans *trans, bool state)
1505 clear_bit(STATUS_TPOWER_PMI, &trans->status); 1505 clear_bit(STATUS_TPOWER_PMI, &trans->status);
1506} 1506}
1507 1507
1508static bool iwl_trans_pcie_grab_nic_access(struct iwl_trans *trans, bool silent, 1508static bool iwl_trans_pcie_grab_nic_access(struct iwl_trans *trans,
1509 unsigned long *flags) 1509 unsigned long *flags)
1510{ 1510{
1511 int ret; 1511 int ret;
1512 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); 1512 struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
@@ -1547,14 +1547,11 @@ static bool iwl_trans_pcie_grab_nic_access(struct iwl_trans *trans, bool silent,
1547 CSR_GP_CNTRL_REG_FLAG_GOING_TO_SLEEP), 15000); 1547 CSR_GP_CNTRL_REG_FLAG_GOING_TO_SLEEP), 15000);
1548 if (unlikely(ret < 0)) { 1548 if (unlikely(ret < 0)) {
1549 iwl_write32(trans, CSR_RESET, CSR_RESET_REG_FLAG_FORCE_NMI); 1549 iwl_write32(trans, CSR_RESET, CSR_RESET_REG_FLAG_FORCE_NMI);
1550 if (!silent) { 1550 WARN_ONCE(1,
1551 u32 val = iwl_read32(trans, CSR_GP_CNTRL); 1551 "Timeout waiting for hardware access (CSR_GP_CNTRL 0x%08x)\n",
1552 WARN_ONCE(1, 1552 iwl_read32(trans, CSR_GP_CNTRL));
1553 "Timeout waiting for hardware access (CSR_GP_CNTRL 0x%08x)\n", 1553 spin_unlock_irqrestore(&trans_pcie->reg_lock, *flags);
1554 val); 1554 return false;
1555 spin_unlock_irqrestore(&trans_pcie->reg_lock, *flags);
1556 return false;
1557 }
1558 } 1555 }
1559 1556
1560out: 1557out:
@@ -1602,7 +1599,7 @@ static int iwl_trans_pcie_read_mem(struct iwl_trans *trans, u32 addr,
1602 int offs, ret = 0; 1599 int offs, ret = 0;
1603 u32 *vals = buf; 1600 u32 *vals = buf;
1604 1601
1605 if (iwl_trans_grab_nic_access(trans, false, &flags)) { 1602 if (iwl_trans_grab_nic_access(trans, &flags)) {
1606 iwl_write32(trans, HBUS_TARG_MEM_RADDR, addr); 1603 iwl_write32(trans, HBUS_TARG_MEM_RADDR, addr);
1607 for (offs = 0; offs < dwords; offs++) 1604 for (offs = 0; offs < dwords; offs++)
1608 vals[offs] = iwl_read32(trans, HBUS_TARG_MEM_RDAT); 1605 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 int offs, ret = 0; 1617 int offs, ret = 0;
1621 const u32 *vals = buf; 1618 const u32 *vals = buf;
1622 1619
1623 if (iwl_trans_grab_nic_access(trans, false, &flags)) { 1620 if (iwl_trans_grab_nic_access(trans, &flags)) {
1624 iwl_write32(trans, HBUS_TARG_MEM_WADDR, addr); 1621 iwl_write32(trans, HBUS_TARG_MEM_WADDR, addr);
1625 for (offs = 0; offs < dwords; offs++) 1622 for (offs = 0; offs < dwords; offs++)
1626 iwl_write32(trans, HBUS_TARG_MEM_WDAT, 1623 iwl_write32(trans, HBUS_TARG_MEM_WDAT,
@@ -2246,7 +2243,7 @@ static u32 iwl_trans_pcie_fh_regs_dump(struct iwl_trans *trans,
2246 __le32 *val; 2243 __le32 *val;
2247 int i; 2244 int i;
2248 2245
2249 if (!iwl_trans_grab_nic_access(trans, false, &flags)) 2246 if (!iwl_trans_grab_nic_access(trans, &flags))
2250 return 0; 2247 return 0;
2251 2248
2252 (*data)->type = cpu_to_le32(IWL_FW_ERROR_DUMP_FH_REGS); 2249 (*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 unsigned long flags; 2270 unsigned long flags;
2274 u32 i; 2271 u32 i;
2275 2272
2276 if (!iwl_trans_grab_nic_access(trans, false, &flags)) 2273 if (!iwl_trans_grab_nic_access(trans, &flags))
2277 return 0; 2274 return 0;
2278 2275
2279 iwl_write_prph_no_grab(trans, MON_DMARB_RD_CTL_ADDR, 0x1); 2276 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 goto out_pci_disable_msi; 2655 goto out_pci_disable_msi;
2659 } 2656 }
2660 2657
2661 if (iwl_trans_grab_nic_access(trans, false, &flags)) { 2658 if (iwl_trans_grab_nic_access(trans, &flags)) {
2662 u32 hw_step; 2659 u32 hw_step;
2663 2660
2664 hw_step = iwl_read_prph_no_grab(trans, WFPM_CTRL_REG); 2661 hw_step = iwl_read_prph_no_grab(trans, WFPM_CTRL_REG);
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/tx.c b/drivers/net/wireless/intel/iwlwifi/pcie/tx.c
index a85ae1002d97..5262028b5505 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/tx.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/tx.c
@@ -770,7 +770,7 @@ static void iwl_pcie_tx_stop_fh(struct iwl_trans *trans)
770 770
771 spin_lock(&trans_pcie->irq_lock); 771 spin_lock(&trans_pcie->irq_lock);
772 772
773 if (!iwl_trans_grab_nic_access(trans, false, &flags)) 773 if (!iwl_trans_grab_nic_access(trans, &flags))
774 goto out; 774 goto out;
775 775
776 /* Stop each Tx DMA channel */ 776 /* Stop each Tx DMA channel */