blob: d8b430688872f3843cee7d52a151914e48974187 [file] [log] [blame]
Johannes Berg02a7fa02011-04-05 09:42:12 -07001/******************************************************************************
2 *
Emmanuel Grumbach51368bf2013-12-30 13:15:54 +02003 * Copyright(c) 2003 - 2014 Intel Corporation. All rights reserved.
Sara Sharonf65ebd82016-05-22 16:25:40 +03004 * Copyright(c) 2015 - 2016 Intel Deutschland GmbH
Johannes Berg02a7fa02011-04-05 09:42:12 -07005 *
6 * Portions of this file are derived from the ipw3945 project.
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of version 2 of the GNU General Public License as
10 * published by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 * more details.
16 *
17 * You should have received a copy of the GNU General Public License along with
18 * this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
20 *
21 * The full GNU General Public License is included in this distribution in the
22 * file called LICENSE.
23 *
24 * Contact Information:
Emmanuel Grumbachcb2f8272015-11-17 15:39:56 +020025 * Intel Linux Wireless <linuxwifi@intel.com>
Johannes Berg02a7fa02011-04-05 09:42:12 -070026 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
27 *
28 *****************************************************************************/
Emmanuel Grumbach83ed9012011-08-25 23:11:14 -070029#include <linux/delay.h>
30#include <linux/device.h>
Don Frycc5f7e32012-05-16 22:54:27 +020031#include <linux/export.h>
Johannes Berg02a7fa02011-04-05 09:42:12 -070032
Johannes Berg48e29342013-03-01 00:13:33 +010033#include "iwl-drv.h"
Johannes Berg02a7fa02011-04-05 09:42:12 -070034#include "iwl-io.h"
Paul Bolle6ac7d112012-06-06 14:17:46 +020035#include "iwl-csr.h"
Emmanuel Grumbach83ed9012011-08-25 23:11:14 -070036#include "iwl-debug.h"
Liad Kaufman4c9706d2014-04-27 16:46:09 +030037#include "iwl-prph.h"
Inbal Hacohen313b0a22013-06-24 10:35:53 +030038#include "iwl-fh.h"
Johannes Berg02a7fa02011-04-05 09:42:12 -070039
Emmanuel Grumbacha73a2ce2015-08-23 13:29:36 +030040void iwl_write8(struct iwl_trans *trans, u32 ofs, u8 val)
41{
42 trace_iwlwifi_dev_iowrite8(trans->dev, ofs, val);
43 iwl_trans_write8(trans, ofs, val);
44}
45IWL_EXPORT_SYMBOL(iwl_write8);
46
47void iwl_write32(struct iwl_trans *trans, u32 ofs, u32 val)
48{
49 trace_iwlwifi_dev_iowrite32(trans->dev, ofs, val);
50 iwl_trans_write32(trans, ofs, val);
51}
52IWL_EXPORT_SYMBOL(iwl_write32);
53
54u32 iwl_read32(struct iwl_trans *trans, u32 ofs)
55{
56 u32 val = iwl_trans_read32(trans, ofs);
Emmanuel Grumbach89ced542015-08-26 13:50:59 +030057
Emmanuel Grumbacha73a2ce2015-08-23 13:29:36 +030058 trace_iwlwifi_dev_ioread32(trans->dev, ofs, val);
59 return val;
60}
61IWL_EXPORT_SYMBOL(iwl_read32);
62
Johannes Berg02a7fa02011-04-05 09:42:12 -070063#define IWL_POLL_INTERVAL 10 /* microseconds */
64
Emmanuel Grumbach1042db22012-01-03 16:56:15 +020065int iwl_poll_bit(struct iwl_trans *trans, u32 addr,
Johannes Berg02a7fa02011-04-05 09:42:12 -070066 u32 bits, u32 mask, int timeout)
67{
68 int t = 0;
69
70 do {
Emmanuel Grumbach1042db22012-01-03 16:56:15 +020071 if ((iwl_read32(trans, addr) & mask) == (bits & mask))
Johannes Berg02a7fa02011-04-05 09:42:12 -070072 return t;
73 udelay(IWL_POLL_INTERVAL);
74 t += IWL_POLL_INTERVAL;
75 } while (t < timeout);
76
77 return -ETIMEDOUT;
78}
Johannes Berg48e29342013-03-01 00:13:33 +010079IWL_EXPORT_SYMBOL(iwl_poll_bit);
Johannes Berg02a7fa02011-04-05 09:42:12 -070080
Emmanuel Grumbach1042db22012-01-03 16:56:15 +020081u32 iwl_read_direct32(struct iwl_trans *trans, u32 reg)
Johannes Berg02a7fa02011-04-05 09:42:12 -070082{
Emmanuel Grumbachabae2382012-12-31 13:46:42 +020083 u32 value = 0x5a5a5a5a;
Johannes Berg02a7fa02011-04-05 09:42:12 -070084 unsigned long flags;
Emmanuel Grumbach23ba9342015-12-17 11:55:13 +020085 if (iwl_trans_grab_nic_access(trans, &flags)) {
Emmanuel Grumbachabae2382012-12-31 13:46:42 +020086 value = iwl_read32(trans, reg);
Lilach Edelsteine56b04e2013-01-16 11:34:49 +020087 iwl_trans_release_nic_access(trans, &flags);
Emmanuel Grumbachabae2382012-12-31 13:46:42 +020088 }
Johannes Berg02a7fa02011-04-05 09:42:12 -070089
90 return value;
91}
Johannes Berg48e29342013-03-01 00:13:33 +010092IWL_EXPORT_SYMBOL(iwl_read_direct32);
Johannes Berg02a7fa02011-04-05 09:42:12 -070093
Emmanuel Grumbach1042db22012-01-03 16:56:15 +020094void iwl_write_direct32(struct iwl_trans *trans, u32 reg, u32 value)
Johannes Berg02a7fa02011-04-05 09:42:12 -070095{
96 unsigned long flags;
97
Emmanuel Grumbach23ba9342015-12-17 11:55:13 +020098 if (iwl_trans_grab_nic_access(trans, &flags)) {
Emmanuel Grumbach1042db22012-01-03 16:56:15 +020099 iwl_write32(trans, reg, value);
Lilach Edelsteine56b04e2013-01-16 11:34:49 +0200100 iwl_trans_release_nic_access(trans, &flags);
Johannes Berg02a7fa02011-04-05 09:42:12 -0700101 }
Johannes Berg02a7fa02011-04-05 09:42:12 -0700102}
Johannes Berg48e29342013-03-01 00:13:33 +0100103IWL_EXPORT_SYMBOL(iwl_write_direct32);
Johannes Berg02a7fa02011-04-05 09:42:12 -0700104
Emmanuel Grumbach1042db22012-01-03 16:56:15 +0200105int iwl_poll_direct_bit(struct iwl_trans *trans, u32 addr, u32 mask,
Johannes Berg02a7fa02011-04-05 09:42:12 -0700106 int timeout)
107{
108 int t = 0;
109
110 do {
Emmanuel Grumbach1042db22012-01-03 16:56:15 +0200111 if ((iwl_read_direct32(trans, addr) & mask) == mask)
Johannes Berg02a7fa02011-04-05 09:42:12 -0700112 return t;
113 udelay(IWL_POLL_INTERVAL);
114 t += IWL_POLL_INTERVAL;
115 } while (t < timeout);
116
117 return -ETIMEDOUT;
118}
Johannes Berg48e29342013-03-01 00:13:33 +0100119IWL_EXPORT_SYMBOL(iwl_poll_direct_bit);
Johannes Berg02a7fa02011-04-05 09:42:12 -0700120
Golan Ben-Ami14ef1b42015-10-21 15:16:58 +0300121u32 iwl_read_prph_no_grab(struct iwl_trans *trans, u32 ofs)
Johannes Berg02a7fa02011-04-05 09:42:12 -0700122{
Emmanuel Grumbach6a06b6c2012-12-02 13:07:30 +0200123 u32 val = iwl_trans_read_prph(trans, ofs);
124 trace_iwlwifi_dev_ioread_prph32(trans->dev, ofs, val);
125 return val;
Johannes Berg02a7fa02011-04-05 09:42:12 -0700126}
Golan Ben-Ami14ef1b42015-10-21 15:16:58 +0300127IWL_EXPORT_SYMBOL(iwl_read_prph_no_grab);
Johannes Berg02a7fa02011-04-05 09:42:12 -0700128
Golan Ben-Ami14ef1b42015-10-21 15:16:58 +0300129void iwl_write_prph_no_grab(struct iwl_trans *trans, u32 ofs, u32 val)
Johannes Berg02a7fa02011-04-05 09:42:12 -0700130{
Emmanuel Grumbach6a06b6c2012-12-02 13:07:30 +0200131 trace_iwlwifi_dev_iowrite_prph32(trans->dev, ofs, val);
132 iwl_trans_write_prph(trans, ofs, val);
Johannes Berg02a7fa02011-04-05 09:42:12 -0700133}
Golan Ben-Ami14ef1b42015-10-21 15:16:58 +0300134IWL_EXPORT_SYMBOL(iwl_write_prph_no_grab);
Johannes Berg02a7fa02011-04-05 09:42:12 -0700135
Emmanuel Grumbach6a06b6c2012-12-02 13:07:30 +0200136u32 iwl_read_prph(struct iwl_trans *trans, u32 ofs)
Johannes Berg02a7fa02011-04-05 09:42:12 -0700137{
138 unsigned long flags;
Emmanuel Grumbachabae2382012-12-31 13:46:42 +0200139 u32 val = 0x5a5a5a5a;
Johannes Berg02a7fa02011-04-05 09:42:12 -0700140
Emmanuel Grumbach23ba9342015-12-17 11:55:13 +0200141 if (iwl_trans_grab_nic_access(trans, &flags)) {
Golan Ben-Ami14ef1b42015-10-21 15:16:58 +0300142 val = iwl_read_prph_no_grab(trans, ofs);
Lilach Edelsteine56b04e2013-01-16 11:34:49 +0200143 iwl_trans_release_nic_access(trans, &flags);
Emmanuel Grumbachabae2382012-12-31 13:46:42 +0200144 }
Johannes Berg02a7fa02011-04-05 09:42:12 -0700145 return val;
146}
Johannes Berg48e29342013-03-01 00:13:33 +0100147IWL_EXPORT_SYMBOL(iwl_read_prph);
Johannes Berg02a7fa02011-04-05 09:42:12 -0700148
Emmanuel Grumbach6a06b6c2012-12-02 13:07:30 +0200149void iwl_write_prph(struct iwl_trans *trans, u32 ofs, u32 val)
Johannes Berg02a7fa02011-04-05 09:42:12 -0700150{
151 unsigned long flags;
152
Emmanuel Grumbach23ba9342015-12-17 11:55:13 +0200153 if (iwl_trans_grab_nic_access(trans, &flags)) {
Golan Ben-Ami14ef1b42015-10-21 15:16:58 +0300154 iwl_write_prph_no_grab(trans, ofs, val);
Lilach Edelsteine56b04e2013-01-16 11:34:49 +0200155 iwl_trans_release_nic_access(trans, &flags);
Johannes Berg02a7fa02011-04-05 09:42:12 -0700156 }
Johannes Berg02a7fa02011-04-05 09:42:12 -0700157}
Johannes Berg48e29342013-03-01 00:13:33 +0100158IWL_EXPORT_SYMBOL(iwl_write_prph);
Johannes Berg02a7fa02011-04-05 09:42:12 -0700159
Eran Harary189fa2f2014-01-23 16:26:32 +0200160int iwl_poll_prph_bit(struct iwl_trans *trans, u32 addr,
161 u32 bits, u32 mask, int timeout)
162{
163 int t = 0;
164
165 do {
166 if ((iwl_read_prph(trans, addr) & mask) == (bits & mask))
167 return t;
168 udelay(IWL_POLL_INTERVAL);
169 t += IWL_POLL_INTERVAL;
170 } while (t < timeout);
171
172 return -ETIMEDOUT;
173}
174
Emmanuel Grumbach6a06b6c2012-12-02 13:07:30 +0200175void iwl_set_bits_prph(struct iwl_trans *trans, u32 ofs, u32 mask)
Johannes Berg02a7fa02011-04-05 09:42:12 -0700176{
177 unsigned long flags;
178
Emmanuel Grumbach23ba9342015-12-17 11:55:13 +0200179 if (iwl_trans_grab_nic_access(trans, &flags)) {
Golan Ben-Ami14ef1b42015-10-21 15:16:58 +0300180 iwl_write_prph_no_grab(trans, ofs,
181 iwl_read_prph_no_grab(trans, ofs) |
182 mask);
Lilach Edelsteine56b04e2013-01-16 11:34:49 +0200183 iwl_trans_release_nic_access(trans, &flags);
Stanislaw Gruszkabfe4b802012-03-07 09:52:24 -0800184 }
Johannes Berg02a7fa02011-04-05 09:42:12 -0700185}
Johannes Berg48e29342013-03-01 00:13:33 +0100186IWL_EXPORT_SYMBOL(iwl_set_bits_prph);
Johannes Berg02a7fa02011-04-05 09:42:12 -0700187
Emmanuel Grumbach6a06b6c2012-12-02 13:07:30 +0200188void iwl_set_bits_mask_prph(struct iwl_trans *trans, u32 ofs,
Johannes Berg02a7fa02011-04-05 09:42:12 -0700189 u32 bits, u32 mask)
190{
191 unsigned long flags;
192
Emmanuel Grumbach23ba9342015-12-17 11:55:13 +0200193 if (iwl_trans_grab_nic_access(trans, &flags)) {
Golan Ben-Ami14ef1b42015-10-21 15:16:58 +0300194 iwl_write_prph_no_grab(trans, ofs,
195 (iwl_read_prph_no_grab(trans, ofs) &
196 mask) | bits);
Lilach Edelsteine56b04e2013-01-16 11:34:49 +0200197 iwl_trans_release_nic_access(trans, &flags);
Stanislaw Gruszkabfe4b802012-03-07 09:52:24 -0800198 }
Johannes Berg02a7fa02011-04-05 09:42:12 -0700199}
Johannes Berg48e29342013-03-01 00:13:33 +0100200IWL_EXPORT_SYMBOL(iwl_set_bits_mask_prph);
Johannes Berg02a7fa02011-04-05 09:42:12 -0700201
Emmanuel Grumbach6a06b6c2012-12-02 13:07:30 +0200202void iwl_clear_bits_prph(struct iwl_trans *trans, u32 ofs, u32 mask)
Johannes Berg02a7fa02011-04-05 09:42:12 -0700203{
204 unsigned long flags;
205 u32 val;
206
Emmanuel Grumbach23ba9342015-12-17 11:55:13 +0200207 if (iwl_trans_grab_nic_access(trans, &flags)) {
Golan Ben-Ami14ef1b42015-10-21 15:16:58 +0300208 val = iwl_read_prph_no_grab(trans, ofs);
209 iwl_write_prph_no_grab(trans, ofs, (val & ~mask));
Lilach Edelsteine56b04e2013-01-16 11:34:49 +0200210 iwl_trans_release_nic_access(trans, &flags);
Stanislaw Gruszkabfe4b802012-03-07 09:52:24 -0800211 }
Johannes Berg02a7fa02011-04-05 09:42:12 -0700212}
Johannes Berg48e29342013-03-01 00:13:33 +0100213IWL_EXPORT_SYMBOL(iwl_clear_bits_prph);
Inbal Hacohen313b0a22013-06-24 10:35:53 +0300214
Liad Kaufman4c9706d2014-04-27 16:46:09 +0300215void iwl_force_nmi(struct iwl_trans *trans)
216{
Emmanuel Grumbach5dd9c682015-03-05 13:06:13 +0200217 if (trans->cfg->device_family != IWL_DEVICE_FAMILY_8000) {
Emmanuel Grumbach66396582015-01-07 16:44:06 +0200218 iwl_write_prph(trans, DEVICE_SET_NMI_REG,
219 DEVICE_SET_NMI_VAL_DRV);
220 iwl_write_prph(trans, DEVICE_SET_NMI_REG,
221 DEVICE_SET_NMI_VAL_HW);
222 } else {
Emmanuel Grumbach5dd9c682015-03-05 13:06:13 +0200223 iwl_write_prph(trans, DEVICE_SET_NMI_8000_REG,
224 DEVICE_SET_NMI_8000_VAL);
Emmanuel Grumbach9b666db2015-03-09 12:37:59 +0200225 iwl_write_prph(trans, DEVICE_SET_NMI_REG,
226 DEVICE_SET_NMI_VAL_DRV);
Emmanuel Grumbach66396582015-01-07 16:44:06 +0200227 }
Liad Kaufman4c9706d2014-04-27 16:46:09 +0300228}
229IWL_EXPORT_SYMBOL(iwl_force_nmi);
230
Sara Sharonf65ebd82016-05-22 16:25:40 +0300231static const char *get_rfh_string(int cmd)
Inbal Hacohen313b0a22013-06-24 10:35:53 +0300232{
233#define IWL_CMD(x) case x: return #x
Sara Sharonf65ebd82016-05-22 16:25:40 +0300234#define IWL_CMD_MQ(arg, reg, q) { if (arg == reg(q)) return #reg; }
235
236 int i;
237
238 for (i = 0; i < IWL_MAX_RX_HW_QUEUES; i++) {
239 IWL_CMD_MQ(cmd, RFH_Q_FRBDCB_BA_LSB, i);
240 IWL_CMD_MQ(cmd, RFH_Q_FRBDCB_WIDX, i);
241 IWL_CMD_MQ(cmd, RFH_Q_FRBDCB_RIDX, i);
242 IWL_CMD_MQ(cmd, RFH_Q_URBD_STTS_WPTR_LSB, i);
243 };
244
245 switch (cmd) {
246 IWL_CMD(RFH_RXF_DMA_CFG);
247 IWL_CMD(RFH_GEN_CFG);
248 IWL_CMD(RFH_GEN_STATUS);
249 IWL_CMD(FH_TSSR_TX_STATUS_REG);
250 IWL_CMD(FH_TSSR_TX_ERROR_REG);
251 default:
252 return "UNKNOWN";
253 }
254#undef IWL_CMD_MQ
255}
256
257struct reg {
258 u32 addr;
259 bool is64;
260};
261
262static int iwl_dump_rfh(struct iwl_trans *trans, char **buf)
263{
264 int i, q;
265 int num_q = trans->num_rx_queues;
266 static const u32 rfh_tbl[] = {
267 RFH_RXF_DMA_CFG,
268 RFH_GEN_CFG,
269 RFH_GEN_STATUS,
270 FH_TSSR_TX_STATUS_REG,
271 FH_TSSR_TX_ERROR_REG,
272 };
273 static const struct reg rfh_mq_tbl[] = {
274 { RFH_Q0_FRBDCB_BA_LSB, true },
275 { RFH_Q0_FRBDCB_WIDX, false },
276 { RFH_Q0_FRBDCB_RIDX, false },
277 { RFH_Q0_URBD_STTS_WPTR_LSB, true },
278 };
279
280#ifdef CONFIG_IWLWIFI_DEBUGFS
281 if (buf) {
282 int pos = 0;
283 /*
284 * Register (up to 34 for name + 8 blank/q for MQ): 40 chars
285 * Colon + space: 2 characters
286 * 0X%08x: 10 characters
287 * New line: 1 character
288 * Total of 53 characters
289 */
290 size_t bufsz = ARRAY_SIZE(rfh_tbl) * 53 +
291 ARRAY_SIZE(rfh_mq_tbl) * 53 * num_q + 40;
292
293 *buf = kmalloc(bufsz, GFP_KERNEL);
294 if (!*buf)
295 return -ENOMEM;
296
297 pos += scnprintf(*buf + pos, bufsz - pos,
298 "RFH register values:\n");
299
300 for (i = 0; i < ARRAY_SIZE(rfh_tbl); i++)
301 pos += scnprintf(*buf + pos, bufsz - pos,
302 "%40s: 0X%08x\n",
303 get_rfh_string(rfh_tbl[i]),
304 iwl_read_prph(trans, rfh_tbl[i]));
305
306 for (i = 0; i < ARRAY_SIZE(rfh_mq_tbl); i++)
307 for (q = 0; q < num_q; q++) {
308 u32 addr = rfh_mq_tbl[i].addr;
309
310 addr += q * (rfh_mq_tbl[i].is64 ? 8 : 4);
311 pos += scnprintf(*buf + pos, bufsz - pos,
312 "%34s(q %2d): 0X%08x\n",
313 get_rfh_string(addr), q,
314 iwl_read_prph(trans, addr));
315 }
316
317 return pos;
318 }
319#endif
320
321 IWL_ERR(trans, "RFH register values:\n");
322 for (i = 0; i < ARRAY_SIZE(rfh_tbl); i++)
323 IWL_ERR(trans, " %34s: 0X%08x\n",
324 get_rfh_string(rfh_tbl[i]),
325 iwl_read_prph(trans, rfh_tbl[i]));
326
327 for (i = 0; i < ARRAY_SIZE(rfh_mq_tbl); i++)
328 for (q = 0; q < num_q; q++) {
329 u32 addr = rfh_mq_tbl[i].addr;
330
331 addr += q * (rfh_mq_tbl[i].is64 ? 8 : 4);
332 IWL_ERR(trans, " %34s(q %d): 0X%08x\n",
333 get_rfh_string(addr), q,
334 iwl_read_prph(trans, addr));
335 }
336
337 return 0;
338}
339
340static const char *get_fh_string(int cmd)
341{
Inbal Hacohen313b0a22013-06-24 10:35:53 +0300342 switch (cmd) {
343 IWL_CMD(FH_RSCSR_CHNL0_STTS_WPTR_REG);
344 IWL_CMD(FH_RSCSR_CHNL0_RBDCB_BASE_REG);
345 IWL_CMD(FH_RSCSR_CHNL0_WPTR);
346 IWL_CMD(FH_MEM_RCSR_CHNL0_CONFIG_REG);
347 IWL_CMD(FH_MEM_RSSR_SHARED_CTRL_REG);
348 IWL_CMD(FH_MEM_RSSR_RX_STATUS_REG);
349 IWL_CMD(FH_MEM_RSSR_RX_ENABLE_ERR_IRQ2DRV);
350 IWL_CMD(FH_TSSR_TX_STATUS_REG);
351 IWL_CMD(FH_TSSR_TX_ERROR_REG);
352 default:
353 return "UNKNOWN";
354 }
355#undef IWL_CMD
356}
357
358int iwl_dump_fh(struct iwl_trans *trans, char **buf)
359{
360 int i;
361 static const u32 fh_tbl[] = {
362 FH_RSCSR_CHNL0_STTS_WPTR_REG,
363 FH_RSCSR_CHNL0_RBDCB_BASE_REG,
364 FH_RSCSR_CHNL0_WPTR,
365 FH_MEM_RCSR_CHNL0_CONFIG_REG,
366 FH_MEM_RSSR_SHARED_CTRL_REG,
367 FH_MEM_RSSR_RX_STATUS_REG,
368 FH_MEM_RSSR_RX_ENABLE_ERR_IRQ2DRV,
369 FH_TSSR_TX_STATUS_REG,
370 FH_TSSR_TX_ERROR_REG
371 };
372
Sara Sharonf65ebd82016-05-22 16:25:40 +0300373 if (trans->cfg->mq_rx_supported)
374 return iwl_dump_rfh(trans, buf);
375
Inbal Hacohen313b0a22013-06-24 10:35:53 +0300376#ifdef CONFIG_IWLWIFI_DEBUGFS
377 if (buf) {
378 int pos = 0;
379 size_t bufsz = ARRAY_SIZE(fh_tbl) * 48 + 40;
380
381 *buf = kmalloc(bufsz, GFP_KERNEL);
382 if (!*buf)
383 return -ENOMEM;
384
385 pos += scnprintf(*buf + pos, bufsz - pos,
386 "FH register values:\n");
387
388 for (i = 0; i < ARRAY_SIZE(fh_tbl); i++)
389 pos += scnprintf(*buf + pos, bufsz - pos,
390 " %34s: 0X%08x\n",
391 get_fh_string(fh_tbl[i]),
392 iwl_read_direct32(trans, fh_tbl[i]));
393
394 return pos;
395 }
396#endif
397
398 IWL_ERR(trans, "FH register values:\n");
399 for (i = 0; i < ARRAY_SIZE(fh_tbl); i++)
400 IWL_ERR(trans, " %34s: 0X%08x\n",
401 get_fh_string(fh_tbl[i]),
402 iwl_read_direct32(trans, fh_tbl[i]));
403
404 return 0;
405}