4 static void ql_dump_intr_states(struct ql_adapter
*qdev
)
8 for (i
= 0; i
< qdev
->intr_count
; i
++) {
9 ql_write32(qdev
, INTR_EN
, qdev
->intr_context
[i
].intr_read_mask
);
10 value
= ql_read32(qdev
, INTR_EN
);
12 "%s: Interrupt %d is %s.\n",
14 (value
& INTR_EN_EN
? "enabled" : "disabled"));
18 void ql_dump_xgmac_control_regs(struct ql_adapter
*qdev
)
21 if (ql_sem_spinlock(qdev
, qdev
->xg_sem_mask
)) {
22 printk(KERN_ERR
"%s: Couldn't get xgmac sem.\n", __func__
);
25 ql_read_xgmac_reg(qdev
, PAUSE_SRC_LO
, &data
);
26 printk(KERN_ERR PFX
"%s: PAUSE_SRC_LO = 0x%.08x.\n", qdev
->ndev
->name
,
28 ql_read_xgmac_reg(qdev
, PAUSE_SRC_HI
, &data
);
29 printk(KERN_ERR PFX
"%s: PAUSE_SRC_HI = 0x%.08x.\n", qdev
->ndev
->name
,
31 ql_read_xgmac_reg(qdev
, GLOBAL_CFG
, &data
);
32 printk(KERN_ERR PFX
"%s: GLOBAL_CFG = 0x%.08x.\n", qdev
->ndev
->name
,
34 ql_read_xgmac_reg(qdev
, TX_CFG
, &data
);
35 printk(KERN_ERR PFX
"%s: TX_CFG = 0x%.08x.\n", qdev
->ndev
->name
, data
);
36 ql_read_xgmac_reg(qdev
, RX_CFG
, &data
);
37 printk(KERN_ERR PFX
"%s: RX_CFG = 0x%.08x.\n", qdev
->ndev
->name
, data
);
38 ql_read_xgmac_reg(qdev
, FLOW_CTL
, &data
);
39 printk(KERN_ERR PFX
"%s: FLOW_CTL = 0x%.08x.\n", qdev
->ndev
->name
,
41 ql_read_xgmac_reg(qdev
, PAUSE_OPCODE
, &data
);
42 printk(KERN_ERR PFX
"%s: PAUSE_OPCODE = 0x%.08x.\n", qdev
->ndev
->name
,
44 ql_read_xgmac_reg(qdev
, PAUSE_TIMER
, &data
);
45 printk(KERN_ERR PFX
"%s: PAUSE_TIMER = 0x%.08x.\n", qdev
->ndev
->name
,
47 ql_read_xgmac_reg(qdev
, PAUSE_FRM_DEST_LO
, &data
);
48 printk(KERN_ERR PFX
"%s: PAUSE_FRM_DEST_LO = 0x%.08x.\n",
49 qdev
->ndev
->name
, data
);
50 ql_read_xgmac_reg(qdev
, PAUSE_FRM_DEST_HI
, &data
);
51 printk(KERN_ERR PFX
"%s: PAUSE_FRM_DEST_HI = 0x%.08x.\n",
52 qdev
->ndev
->name
, data
);
53 ql_read_xgmac_reg(qdev
, MAC_TX_PARAMS
, &data
);
54 printk(KERN_ERR PFX
"%s: MAC_TX_PARAMS = 0x%.08x.\n", qdev
->ndev
->name
,
56 ql_read_xgmac_reg(qdev
, MAC_RX_PARAMS
, &data
);
57 printk(KERN_ERR PFX
"%s: MAC_RX_PARAMS = 0x%.08x.\n", qdev
->ndev
->name
,
59 ql_read_xgmac_reg(qdev
, MAC_SYS_INT
, &data
);
60 printk(KERN_ERR PFX
"%s: MAC_SYS_INT = 0x%.08x.\n", qdev
->ndev
->name
,
62 ql_read_xgmac_reg(qdev
, MAC_SYS_INT_MASK
, &data
);
63 printk(KERN_ERR PFX
"%s: MAC_SYS_INT_MASK = 0x%.08x.\n",
64 qdev
->ndev
->name
, data
);
65 ql_read_xgmac_reg(qdev
, MAC_MGMT_INT
, &data
);
66 printk(KERN_ERR PFX
"%s: MAC_MGMT_INT = 0x%.08x.\n", qdev
->ndev
->name
,
68 ql_read_xgmac_reg(qdev
, MAC_MGMT_IN_MASK
, &data
);
69 printk(KERN_ERR PFX
"%s: MAC_MGMT_IN_MASK = 0x%.08x.\n",
70 qdev
->ndev
->name
, data
);
71 ql_read_xgmac_reg(qdev
, EXT_ARB_MODE
, &data
);
72 printk(KERN_ERR PFX
"%s: EXT_ARB_MODE = 0x%.08x.\n", qdev
->ndev
->name
,
74 ql_sem_unlock(qdev
, qdev
->xg_sem_mask
);
78 static void ql_dump_ets_regs(struct ql_adapter
*qdev
)
82 static void ql_dump_cam_entries(struct ql_adapter
*qdev
)
87 i
= ql_sem_spinlock(qdev
, SEM_MAC_ADDR_MASK
);
90 for (i
= 0; i
< 4; i
++) {
91 if (ql_get_mac_addr_reg(qdev
, MAC_ADDR_TYPE_CAM_MAC
, i
, value
)) {
93 "%s: Failed read of mac index register.\n",
99 "%s: CAM index %d CAM Lookup Lower = 0x%.08x:%.08x, Output = 0x%.08x.\n",
100 qdev
->ndev
->name
, i
, value
[1], value
[0],
104 for (i
= 0; i
< 32; i
++) {
105 if (ql_get_mac_addr_reg
106 (qdev
, MAC_ADDR_TYPE_MULTI_MAC
, i
, value
)) {
108 "%s: Failed read of mac index register.\n",
114 "%s: MCAST index %d CAM Lookup Lower = 0x%.08x:%.08x.\n",
115 qdev
->ndev
->name
, i
, value
[1], value
[0]);
118 ql_sem_unlock(qdev
, SEM_MAC_ADDR_MASK
);
121 void ql_dump_routing_entries(struct ql_adapter
*qdev
)
125 i
= ql_sem_spinlock(qdev
, SEM_RT_IDX_MASK
);
128 for (i
= 0; i
< 16; i
++) {
130 if (ql_get_routing_reg(qdev
, i
, &value
)) {
132 "%s: Failed read of routing index register.\n",
138 "%s: Routing Mask %d = 0x%.08x.\n",
139 qdev
->ndev
->name
, i
, value
);
142 ql_sem_unlock(qdev
, SEM_RT_IDX_MASK
);
145 void ql_dump_regs(struct ql_adapter
*qdev
)
147 printk(KERN_ERR PFX
"reg dump for function #%d.\n", qdev
->func
);
148 printk(KERN_ERR PFX
"SYS = 0x%x.\n",
149 ql_read32(qdev
, SYS
));
150 printk(KERN_ERR PFX
"RST_FO = 0x%x.\n",
151 ql_read32(qdev
, RST_FO
));
152 printk(KERN_ERR PFX
"FSC = 0x%x.\n",
153 ql_read32(qdev
, FSC
));
154 printk(KERN_ERR PFX
"CSR = 0x%x.\n",
155 ql_read32(qdev
, CSR
));
156 printk(KERN_ERR PFX
"ICB_RID = 0x%x.\n",
157 ql_read32(qdev
, ICB_RID
));
158 printk(KERN_ERR PFX
"ICB_L = 0x%x.\n",
159 ql_read32(qdev
, ICB_L
));
160 printk(KERN_ERR PFX
"ICB_H = 0x%x.\n",
161 ql_read32(qdev
, ICB_H
));
162 printk(KERN_ERR PFX
"CFG = 0x%x.\n",
163 ql_read32(qdev
, CFG
));
164 printk(KERN_ERR PFX
"BIOS_ADDR = 0x%x.\n",
165 ql_read32(qdev
, BIOS_ADDR
));
166 printk(KERN_ERR PFX
"STS = 0x%x.\n",
167 ql_read32(qdev
, STS
));
168 printk(KERN_ERR PFX
"INTR_EN = 0x%x.\n",
169 ql_read32(qdev
, INTR_EN
));
170 printk(KERN_ERR PFX
"INTR_MASK = 0x%x.\n",
171 ql_read32(qdev
, INTR_MASK
));
172 printk(KERN_ERR PFX
"ISR1 = 0x%x.\n",
173 ql_read32(qdev
, ISR1
));
174 printk(KERN_ERR PFX
"ISR2 = 0x%x.\n",
175 ql_read32(qdev
, ISR2
));
176 printk(KERN_ERR PFX
"ISR3 = 0x%x.\n",
177 ql_read32(qdev
, ISR3
));
178 printk(KERN_ERR PFX
"ISR4 = 0x%x.\n",
179 ql_read32(qdev
, ISR4
));
180 printk(KERN_ERR PFX
"REV_ID = 0x%x.\n",
181 ql_read32(qdev
, REV_ID
));
182 printk(KERN_ERR PFX
"FRC_ECC_ERR = 0x%x.\n",
183 ql_read32(qdev
, FRC_ECC_ERR
));
184 printk(KERN_ERR PFX
"ERR_STS = 0x%x.\n",
185 ql_read32(qdev
, ERR_STS
));
186 printk(KERN_ERR PFX
"RAM_DBG_ADDR = 0x%x.\n",
187 ql_read32(qdev
, RAM_DBG_ADDR
));
188 printk(KERN_ERR PFX
"RAM_DBG_DATA = 0x%x.\n",
189 ql_read32(qdev
, RAM_DBG_DATA
));
190 printk(KERN_ERR PFX
"ECC_ERR_CNT = 0x%x.\n",
191 ql_read32(qdev
, ECC_ERR_CNT
));
192 printk(KERN_ERR PFX
"SEM = 0x%x.\n",
193 ql_read32(qdev
, SEM
));
194 printk(KERN_ERR PFX
"GPIO_1 = 0x%x.\n",
195 ql_read32(qdev
, GPIO_1
));
196 printk(KERN_ERR PFX
"GPIO_2 = 0x%x.\n",
197 ql_read32(qdev
, GPIO_2
));
198 printk(KERN_ERR PFX
"GPIO_3 = 0x%x.\n",
199 ql_read32(qdev
, GPIO_3
));
200 printk(KERN_ERR PFX
"XGMAC_ADDR = 0x%x.\n",
201 ql_read32(qdev
, XGMAC_ADDR
));
202 printk(KERN_ERR PFX
"XGMAC_DATA = 0x%x.\n",
203 ql_read32(qdev
, XGMAC_DATA
));
204 printk(KERN_ERR PFX
"NIC_ETS = 0x%x.\n",
205 ql_read32(qdev
, NIC_ETS
));
206 printk(KERN_ERR PFX
"CNA_ETS = 0x%x.\n",
207 ql_read32(qdev
, CNA_ETS
));
208 printk(KERN_ERR PFX
"FLASH_ADDR = 0x%x.\n",
209 ql_read32(qdev
, FLASH_ADDR
));
210 printk(KERN_ERR PFX
"FLASH_DATA = 0x%x.\n",
211 ql_read32(qdev
, FLASH_DATA
));
212 printk(KERN_ERR PFX
"CQ_STOP = 0x%x.\n",
213 ql_read32(qdev
, CQ_STOP
));
214 printk(KERN_ERR PFX
"PAGE_TBL_RID = 0x%x.\n",
215 ql_read32(qdev
, PAGE_TBL_RID
));
216 printk(KERN_ERR PFX
"WQ_PAGE_TBL_LO = 0x%x.\n",
217 ql_read32(qdev
, WQ_PAGE_TBL_LO
));
218 printk(KERN_ERR PFX
"WQ_PAGE_TBL_HI = 0x%x.\n",
219 ql_read32(qdev
, WQ_PAGE_TBL_HI
));
220 printk(KERN_ERR PFX
"CQ_PAGE_TBL_LO = 0x%x.\n",
221 ql_read32(qdev
, CQ_PAGE_TBL_LO
));
222 printk(KERN_ERR PFX
"CQ_PAGE_TBL_HI = 0x%x.\n",
223 ql_read32(qdev
, CQ_PAGE_TBL_HI
));
224 printk(KERN_ERR PFX
"COS_DFLT_CQ1 = 0x%x.\n",
225 ql_read32(qdev
, COS_DFLT_CQ1
));
226 printk(KERN_ERR PFX
"COS_DFLT_CQ2 = 0x%x.\n",
227 ql_read32(qdev
, COS_DFLT_CQ2
));
228 printk(KERN_ERR PFX
"SPLT_HDR = 0x%x.\n",
229 ql_read32(qdev
, SPLT_HDR
));
230 printk(KERN_ERR PFX
"FC_PAUSE_THRES = 0x%x.\n",
231 ql_read32(qdev
, FC_PAUSE_THRES
));
232 printk(KERN_ERR PFX
"NIC_PAUSE_THRES = 0x%x.\n",
233 ql_read32(qdev
, NIC_PAUSE_THRES
));
234 printk(KERN_ERR PFX
"FC_ETHERTYPE = 0x%x.\n",
235 ql_read32(qdev
, FC_ETHERTYPE
));
236 printk(KERN_ERR PFX
"FC_RCV_CFG = 0x%x.\n",
237 ql_read32(qdev
, FC_RCV_CFG
));
238 printk(KERN_ERR PFX
"NIC_RCV_CFG = 0x%x.\n",
239 ql_read32(qdev
, NIC_RCV_CFG
));
240 printk(KERN_ERR PFX
"FC_COS_TAGS = 0x%x.\n",
241 ql_read32(qdev
, FC_COS_TAGS
));
242 printk(KERN_ERR PFX
"NIC_COS_TAGS = 0x%x.\n",
243 ql_read32(qdev
, NIC_COS_TAGS
));
244 printk(KERN_ERR PFX
"MGMT_RCV_CFG = 0x%x.\n",
245 ql_read32(qdev
, MGMT_RCV_CFG
));
246 printk(KERN_ERR PFX
"XG_SERDES_ADDR = 0x%x.\n",
247 ql_read32(qdev
, XG_SERDES_ADDR
));
248 printk(KERN_ERR PFX
"XG_SERDES_DATA = 0x%x.\n",
249 ql_read32(qdev
, XG_SERDES_DATA
));
250 printk(KERN_ERR PFX
"PRB_MX_ADDR = 0x%x.\n",
251 ql_read32(qdev
, PRB_MX_ADDR
));
252 printk(KERN_ERR PFX
"PRB_MX_DATA = 0x%x.\n",
253 ql_read32(qdev
, PRB_MX_DATA
));
254 ql_dump_intr_states(qdev
);
255 ql_dump_xgmac_control_regs(qdev
);
256 ql_dump_ets_regs(qdev
);
257 ql_dump_cam_entries(qdev
);
258 ql_dump_routing_entries(qdev
);
263 void ql_dump_stat(struct ql_adapter
*qdev
)
265 printk(KERN_ERR
"%s: Enter.\n", __func__
);
266 printk(KERN_ERR
"tx_pkts = %ld\n",
267 (unsigned long)qdev
->nic_stats
.tx_pkts
);
268 printk(KERN_ERR
"tx_bytes = %ld\n",
269 (unsigned long)qdev
->nic_stats
.tx_bytes
);
270 printk(KERN_ERR
"tx_mcast_pkts = %ld.\n",
271 (unsigned long)qdev
->nic_stats
.tx_mcast_pkts
);
272 printk(KERN_ERR
"tx_bcast_pkts = %ld.\n",
273 (unsigned long)qdev
->nic_stats
.tx_bcast_pkts
);
274 printk(KERN_ERR
"tx_ucast_pkts = %ld.\n",
275 (unsigned long)qdev
->nic_stats
.tx_ucast_pkts
);
276 printk(KERN_ERR
"tx_ctl_pkts = %ld.\n",
277 (unsigned long)qdev
->nic_stats
.tx_ctl_pkts
);
278 printk(KERN_ERR
"tx_pause_pkts = %ld.\n",
279 (unsigned long)qdev
->nic_stats
.tx_pause_pkts
);
280 printk(KERN_ERR
"tx_64_pkt = %ld.\n",
281 (unsigned long)qdev
->nic_stats
.tx_64_pkt
);
282 printk(KERN_ERR
"tx_65_to_127_pkt = %ld.\n",
283 (unsigned long)qdev
->nic_stats
.tx_65_to_127_pkt
);
284 printk(KERN_ERR
"tx_128_to_255_pkt = %ld.\n",
285 (unsigned long)qdev
->nic_stats
.tx_128_to_255_pkt
);
286 printk(KERN_ERR
"tx_256_511_pkt = %ld.\n",
287 (unsigned long)qdev
->nic_stats
.tx_256_511_pkt
);
288 printk(KERN_ERR
"tx_512_to_1023_pkt = %ld.\n",
289 (unsigned long)qdev
->nic_stats
.tx_512_to_1023_pkt
);
290 printk(KERN_ERR
"tx_1024_to_1518_pkt = %ld.\n",
291 (unsigned long)qdev
->nic_stats
.tx_1024_to_1518_pkt
);
292 printk(KERN_ERR
"tx_1519_to_max_pkt = %ld.\n",
293 (unsigned long)qdev
->nic_stats
.tx_1519_to_max_pkt
);
294 printk(KERN_ERR
"tx_undersize_pkt = %ld.\n",
295 (unsigned long)qdev
->nic_stats
.tx_undersize_pkt
);
296 printk(KERN_ERR
"tx_oversize_pkt = %ld.\n",
297 (unsigned long)qdev
->nic_stats
.tx_oversize_pkt
);
298 printk(KERN_ERR
"rx_bytes = %ld.\n",
299 (unsigned long)qdev
->nic_stats
.rx_bytes
);
300 printk(KERN_ERR
"rx_bytes_ok = %ld.\n",
301 (unsigned long)qdev
->nic_stats
.rx_bytes_ok
);
302 printk(KERN_ERR
"rx_pkts = %ld.\n",
303 (unsigned long)qdev
->nic_stats
.rx_pkts
);
304 printk(KERN_ERR
"rx_pkts_ok = %ld.\n",
305 (unsigned long)qdev
->nic_stats
.rx_pkts_ok
);
306 printk(KERN_ERR
"rx_bcast_pkts = %ld.\n",
307 (unsigned long)qdev
->nic_stats
.rx_bcast_pkts
);
308 printk(KERN_ERR
"rx_mcast_pkts = %ld.\n",
309 (unsigned long)qdev
->nic_stats
.rx_mcast_pkts
);
310 printk(KERN_ERR
"rx_ucast_pkts = %ld.\n",
311 (unsigned long)qdev
->nic_stats
.rx_ucast_pkts
);
312 printk(KERN_ERR
"rx_undersize_pkts = %ld.\n",
313 (unsigned long)qdev
->nic_stats
.rx_undersize_pkts
);
314 printk(KERN_ERR
"rx_oversize_pkts = %ld.\n",
315 (unsigned long)qdev
->nic_stats
.rx_oversize_pkts
);
316 printk(KERN_ERR
"rx_jabber_pkts = %ld.\n",
317 (unsigned long)qdev
->nic_stats
.rx_jabber_pkts
);
318 printk(KERN_ERR
"rx_undersize_fcerr_pkts = %ld.\n",
319 (unsigned long)qdev
->nic_stats
.rx_undersize_fcerr_pkts
);
320 printk(KERN_ERR
"rx_drop_events = %ld.\n",
321 (unsigned long)qdev
->nic_stats
.rx_drop_events
);
322 printk(KERN_ERR
"rx_fcerr_pkts = %ld.\n",
323 (unsigned long)qdev
->nic_stats
.rx_fcerr_pkts
);
324 printk(KERN_ERR
"rx_align_err = %ld.\n",
325 (unsigned long)qdev
->nic_stats
.rx_align_err
);
326 printk(KERN_ERR
"rx_symbol_err = %ld.\n",
327 (unsigned long)qdev
->nic_stats
.rx_symbol_err
);
328 printk(KERN_ERR
"rx_mac_err = %ld.\n",
329 (unsigned long)qdev
->nic_stats
.rx_mac_err
);
330 printk(KERN_ERR
"rx_ctl_pkts = %ld.\n",
331 (unsigned long)qdev
->nic_stats
.rx_ctl_pkts
);
332 printk(KERN_ERR
"rx_pause_pkts = %ld.\n",
333 (unsigned long)qdev
->nic_stats
.rx_pause_pkts
);
334 printk(KERN_ERR
"rx_64_pkts = %ld.\n",
335 (unsigned long)qdev
->nic_stats
.rx_64_pkts
);
336 printk(KERN_ERR
"rx_65_to_127_pkts = %ld.\n",
337 (unsigned long)qdev
->nic_stats
.rx_65_to_127_pkts
);
338 printk(KERN_ERR
"rx_128_255_pkts = %ld.\n",
339 (unsigned long)qdev
->nic_stats
.rx_128_255_pkts
);
340 printk(KERN_ERR
"rx_256_511_pkts = %ld.\n",
341 (unsigned long)qdev
->nic_stats
.rx_256_511_pkts
);
342 printk(KERN_ERR
"rx_512_to_1023_pkts = %ld.\n",
343 (unsigned long)qdev
->nic_stats
.rx_512_to_1023_pkts
);
344 printk(KERN_ERR
"rx_1024_to_1518_pkts = %ld.\n",
345 (unsigned long)qdev
->nic_stats
.rx_1024_to_1518_pkts
);
346 printk(KERN_ERR
"rx_1519_to_max_pkts = %ld.\n",
347 (unsigned long)qdev
->nic_stats
.rx_1519_to_max_pkts
);
348 printk(KERN_ERR
"rx_len_err_pkts = %ld.\n",
349 (unsigned long)qdev
->nic_stats
.rx_len_err_pkts
);
354 void ql_dump_qdev(struct ql_adapter
*qdev
)
357 printk(KERN_ERR PFX
"qdev->flags = %lx.\n",
359 printk(KERN_ERR PFX
"qdev->vlgrp = %p.\n",
361 printk(KERN_ERR PFX
"qdev->pdev = %p.\n",
363 printk(KERN_ERR PFX
"qdev->ndev = %p.\n",
365 printk(KERN_ERR PFX
"qdev->chip_rev_id = %d.\n",
367 printk(KERN_ERR PFX
"qdev->reg_base = %p.\n",
369 printk(KERN_ERR PFX
"qdev->doorbell_area = %p.\n",
370 qdev
->doorbell_area
);
371 printk(KERN_ERR PFX
"qdev->doorbell_area_size = %d.\n",
372 qdev
->doorbell_area_size
);
373 printk(KERN_ERR PFX
"msg_enable = %x.\n",
375 printk(KERN_ERR PFX
"qdev->rx_ring_shadow_reg_area = %p.\n",
376 qdev
->rx_ring_shadow_reg_area
);
377 printk(KERN_ERR PFX
"qdev->rx_ring_shadow_reg_dma = %llx.\n",
378 (unsigned long long) qdev
->rx_ring_shadow_reg_dma
);
379 printk(KERN_ERR PFX
"qdev->tx_ring_shadow_reg_area = %p.\n",
380 qdev
->tx_ring_shadow_reg_area
);
381 printk(KERN_ERR PFX
"qdev->tx_ring_shadow_reg_dma = %llx.\n",
382 (unsigned long long) qdev
->tx_ring_shadow_reg_dma
);
383 printk(KERN_ERR PFX
"qdev->intr_count = %d.\n",
385 if (qdev
->msi_x_entry
)
386 for (i
= 0; i
< qdev
->intr_count
; i
++) {
388 "msi_x_entry.[%d]vector = %d.\n", i
,
389 qdev
->msi_x_entry
[i
].vector
);
391 "msi_x_entry.[%d]entry = %d.\n", i
,
392 qdev
->msi_x_entry
[i
].entry
);
394 for (i
= 0; i
< qdev
->intr_count
; i
++) {
396 "intr_context[%d].qdev = %p.\n", i
,
397 qdev
->intr_context
[i
].qdev
);
399 "intr_context[%d].intr = %d.\n", i
,
400 qdev
->intr_context
[i
].intr
);
402 "intr_context[%d].hooked = %d.\n", i
,
403 qdev
->intr_context
[i
].hooked
);
405 "intr_context[%d].intr_en_mask = 0x%08x.\n", i
,
406 qdev
->intr_context
[i
].intr_en_mask
);
408 "intr_context[%d].intr_dis_mask = 0x%08x.\n", i
,
409 qdev
->intr_context
[i
].intr_dis_mask
);
411 "intr_context[%d].intr_read_mask = 0x%08x.\n", i
,
412 qdev
->intr_context
[i
].intr_read_mask
);
414 printk(KERN_ERR PFX
"qdev->tx_ring_count = %d.\n", qdev
->tx_ring_count
);
415 printk(KERN_ERR PFX
"qdev->rx_ring_count = %d.\n", qdev
->rx_ring_count
);
416 printk(KERN_ERR PFX
"qdev->ring_mem_size = %d.\n", qdev
->ring_mem_size
);
417 printk(KERN_ERR PFX
"qdev->ring_mem = %p.\n", qdev
->ring_mem
);
418 printk(KERN_ERR PFX
"qdev->intr_count = %d.\n", qdev
->intr_count
);
419 printk(KERN_ERR PFX
"qdev->tx_ring = %p.\n",
421 printk(KERN_ERR PFX
"qdev->rss_ring_count = %d.\n",
422 qdev
->rss_ring_count
);
423 printk(KERN_ERR PFX
"qdev->rx_ring = %p.\n", qdev
->rx_ring
);
424 printk(KERN_ERR PFX
"qdev->default_rx_queue = %d.\n",
425 qdev
->default_rx_queue
);
426 printk(KERN_ERR PFX
"qdev->xg_sem_mask = 0x%08x.\n",
428 printk(KERN_ERR PFX
"qdev->port_link_up = 0x%08x.\n",
430 printk(KERN_ERR PFX
"qdev->port_init = 0x%08x.\n",
437 void ql_dump_wqicb(struct wqicb
*wqicb
)
439 printk(KERN_ERR PFX
"Dumping wqicb stuff...\n");
440 printk(KERN_ERR PFX
"wqicb->len = 0x%x.\n", le16_to_cpu(wqicb
->len
));
441 printk(KERN_ERR PFX
"wqicb->flags = %x.\n", le16_to_cpu(wqicb
->flags
));
442 printk(KERN_ERR PFX
"wqicb->cq_id_rss = %d.\n",
443 le16_to_cpu(wqicb
->cq_id_rss
));
444 printk(KERN_ERR PFX
"wqicb->rid = 0x%x.\n", le16_to_cpu(wqicb
->rid
));
445 printk(KERN_ERR PFX
"wqicb->wq_addr = 0x%llx.\n",
446 (unsigned long long) le64_to_cpu(wqicb
->addr
));
447 printk(KERN_ERR PFX
"wqicb->wq_cnsmr_idx_addr = 0x%llx.\n",
448 (unsigned long long) le64_to_cpu(wqicb
->cnsmr_idx_addr
));
451 void ql_dump_tx_ring(struct tx_ring
*tx_ring
)
456 "===================== Dumping tx_ring %d ===============.\n",
458 printk(KERN_ERR PFX
"tx_ring->base = %p.\n", tx_ring
->wq_base
);
459 printk(KERN_ERR PFX
"tx_ring->base_dma = 0x%llx.\n",
460 (unsigned long long) tx_ring
->wq_base_dma
);
462 "tx_ring->cnsmr_idx_sh_reg, addr = 0x%p, value = %d.\n",
463 tx_ring
->cnsmr_idx_sh_reg
,
464 tx_ring
->cnsmr_idx_sh_reg
465 ? ql_read_sh_reg(tx_ring
->cnsmr_idx_sh_reg
) : 0);
466 printk(KERN_ERR PFX
"tx_ring->size = %d.\n", tx_ring
->wq_size
);
467 printk(KERN_ERR PFX
"tx_ring->len = %d.\n", tx_ring
->wq_len
);
468 printk(KERN_ERR PFX
"tx_ring->prod_idx_db_reg = %p.\n",
469 tx_ring
->prod_idx_db_reg
);
470 printk(KERN_ERR PFX
"tx_ring->valid_db_reg = %p.\n",
471 tx_ring
->valid_db_reg
);
472 printk(KERN_ERR PFX
"tx_ring->prod_idx = %d.\n", tx_ring
->prod_idx
);
473 printk(KERN_ERR PFX
"tx_ring->cq_id = %d.\n", tx_ring
->cq_id
);
474 printk(KERN_ERR PFX
"tx_ring->wq_id = %d.\n", tx_ring
->wq_id
);
475 printk(KERN_ERR PFX
"tx_ring->q = %p.\n", tx_ring
->q
);
476 printk(KERN_ERR PFX
"tx_ring->tx_count = %d.\n",
477 atomic_read(&tx_ring
->tx_count
));
480 void ql_dump_ricb(struct ricb
*ricb
)
484 "===================== Dumping ricb ===============.\n");
485 printk(KERN_ERR PFX
"Dumping ricb stuff...\n");
487 printk(KERN_ERR PFX
"ricb->base_cq = %d.\n", ricb
->base_cq
& 0x1f);
488 printk(KERN_ERR PFX
"ricb->flags = %s%s%s%s%s%s%s%s%s.\n",
489 ricb
->base_cq
& RSS_L4K
? "RSS_L4K " : "",
490 ricb
->flags
& RSS_L6K
? "RSS_L6K " : "",
491 ricb
->flags
& RSS_LI
? "RSS_LI " : "",
492 ricb
->flags
& RSS_LB
? "RSS_LB " : "",
493 ricb
->flags
& RSS_LM
? "RSS_LM " : "",
494 ricb
->flags
& RSS_RI4
? "RSS_RI4 " : "",
495 ricb
->flags
& RSS_RT4
? "RSS_RT4 " : "",
496 ricb
->flags
& RSS_RI6
? "RSS_RI6 " : "",
497 ricb
->flags
& RSS_RT6
? "RSS_RT6 " : "");
498 printk(KERN_ERR PFX
"ricb->mask = 0x%.04x.\n", le16_to_cpu(ricb
->mask
));
499 for (i
= 0; i
< 16; i
++)
500 printk(KERN_ERR PFX
"ricb->hash_cq_id[%d] = 0x%.08x.\n", i
,
501 le32_to_cpu(ricb
->hash_cq_id
[i
]));
502 for (i
= 0; i
< 10; i
++)
503 printk(KERN_ERR PFX
"ricb->ipv6_hash_key[%d] = 0x%.08x.\n", i
,
504 le32_to_cpu(ricb
->ipv6_hash_key
[i
]));
505 for (i
= 0; i
< 4; i
++)
506 printk(KERN_ERR PFX
"ricb->ipv4_hash_key[%d] = 0x%.08x.\n", i
,
507 le32_to_cpu(ricb
->ipv4_hash_key
[i
]));
510 void ql_dump_cqicb(struct cqicb
*cqicb
)
512 printk(KERN_ERR PFX
"Dumping cqicb stuff...\n");
514 printk(KERN_ERR PFX
"cqicb->msix_vect = %d.\n", cqicb
->msix_vect
);
515 printk(KERN_ERR PFX
"cqicb->flags = %x.\n", cqicb
->flags
);
516 printk(KERN_ERR PFX
"cqicb->len = %d.\n", le16_to_cpu(cqicb
->len
));
517 printk(KERN_ERR PFX
"cqicb->addr = 0x%llx.\n",
518 (unsigned long long) le64_to_cpu(cqicb
->addr
));
519 printk(KERN_ERR PFX
"cqicb->prod_idx_addr = 0x%llx.\n",
520 (unsigned long long) le64_to_cpu(cqicb
->prod_idx_addr
));
521 printk(KERN_ERR PFX
"cqicb->pkt_delay = 0x%.04x.\n",
522 le16_to_cpu(cqicb
->pkt_delay
));
523 printk(KERN_ERR PFX
"cqicb->irq_delay = 0x%.04x.\n",
524 le16_to_cpu(cqicb
->irq_delay
));
525 printk(KERN_ERR PFX
"cqicb->lbq_addr = 0x%llx.\n",
526 (unsigned long long) le64_to_cpu(cqicb
->lbq_addr
));
527 printk(KERN_ERR PFX
"cqicb->lbq_buf_size = 0x%.04x.\n",
528 le16_to_cpu(cqicb
->lbq_buf_size
));
529 printk(KERN_ERR PFX
"cqicb->lbq_len = 0x%.04x.\n",
530 le16_to_cpu(cqicb
->lbq_len
));
531 printk(KERN_ERR PFX
"cqicb->sbq_addr = 0x%llx.\n",
532 (unsigned long long) le64_to_cpu(cqicb
->sbq_addr
));
533 printk(KERN_ERR PFX
"cqicb->sbq_buf_size = 0x%.04x.\n",
534 le16_to_cpu(cqicb
->sbq_buf_size
));
535 printk(KERN_ERR PFX
"cqicb->sbq_len = 0x%.04x.\n",
536 le16_to_cpu(cqicb
->sbq_len
));
539 void ql_dump_rx_ring(struct rx_ring
*rx_ring
)
544 "===================== Dumping rx_ring %d ===============.\n",
546 printk(KERN_ERR PFX
"Dumping rx_ring %d, type = %s%s%s.\n",
547 rx_ring
->cq_id
, rx_ring
->type
== DEFAULT_Q
? "DEFAULT" : "",
548 rx_ring
->type
== TX_Q
? "OUTBOUND COMPLETIONS" : "",
549 rx_ring
->type
== RX_Q
? "INBOUND_COMPLETIONS" : "");
550 printk(KERN_ERR PFX
"rx_ring->cqicb = %p.\n", &rx_ring
->cqicb
);
551 printk(KERN_ERR PFX
"rx_ring->cq_base = %p.\n", rx_ring
->cq_base
);
552 printk(KERN_ERR PFX
"rx_ring->cq_base_dma = %llx.\n",
553 (unsigned long long) rx_ring
->cq_base_dma
);
554 printk(KERN_ERR PFX
"rx_ring->cq_size = %d.\n", rx_ring
->cq_size
);
555 printk(KERN_ERR PFX
"rx_ring->cq_len = %d.\n", rx_ring
->cq_len
);
557 "rx_ring->prod_idx_sh_reg, addr = 0x%p, value = %d.\n",
558 rx_ring
->prod_idx_sh_reg
,
559 rx_ring
->prod_idx_sh_reg
560 ? ql_read_sh_reg(rx_ring
->prod_idx_sh_reg
) : 0);
561 printk(KERN_ERR PFX
"rx_ring->prod_idx_sh_reg_dma = %llx.\n",
562 (unsigned long long) rx_ring
->prod_idx_sh_reg_dma
);
563 printk(KERN_ERR PFX
"rx_ring->cnsmr_idx_db_reg = %p.\n",
564 rx_ring
->cnsmr_idx_db_reg
);
565 printk(KERN_ERR PFX
"rx_ring->cnsmr_idx = %d.\n", rx_ring
->cnsmr_idx
);
566 printk(KERN_ERR PFX
"rx_ring->curr_entry = %p.\n", rx_ring
->curr_entry
);
567 printk(KERN_ERR PFX
"rx_ring->valid_db_reg = %p.\n",
568 rx_ring
->valid_db_reg
);
570 printk(KERN_ERR PFX
"rx_ring->lbq_base = %p.\n", rx_ring
->lbq_base
);
571 printk(KERN_ERR PFX
"rx_ring->lbq_base_dma = %llx.\n",
572 (unsigned long long) rx_ring
->lbq_base_dma
);
573 printk(KERN_ERR PFX
"rx_ring->lbq_base_indirect = %p.\n",
574 rx_ring
->lbq_base_indirect
);
575 printk(KERN_ERR PFX
"rx_ring->lbq_base_indirect_dma = %llx.\n",
576 (unsigned long long) rx_ring
->lbq_base_indirect_dma
);
577 printk(KERN_ERR PFX
"rx_ring->lbq = %p.\n", rx_ring
->lbq
);
578 printk(KERN_ERR PFX
"rx_ring->lbq_len = %d.\n", rx_ring
->lbq_len
);
579 printk(KERN_ERR PFX
"rx_ring->lbq_size = %d.\n", rx_ring
->lbq_size
);
580 printk(KERN_ERR PFX
"rx_ring->lbq_prod_idx_db_reg = %p.\n",
581 rx_ring
->lbq_prod_idx_db_reg
);
582 printk(KERN_ERR PFX
"rx_ring->lbq_prod_idx = %d.\n",
583 rx_ring
->lbq_prod_idx
);
584 printk(KERN_ERR PFX
"rx_ring->lbq_curr_idx = %d.\n",
585 rx_ring
->lbq_curr_idx
);
586 printk(KERN_ERR PFX
"rx_ring->lbq_clean_idx = %d.\n",
587 rx_ring
->lbq_clean_idx
);
588 printk(KERN_ERR PFX
"rx_ring->lbq_free_cnt = %d.\n",
589 rx_ring
->lbq_free_cnt
);
590 printk(KERN_ERR PFX
"rx_ring->lbq_buf_size = %d.\n",
591 rx_ring
->lbq_buf_size
);
593 printk(KERN_ERR PFX
"rx_ring->sbq_base = %p.\n", rx_ring
->sbq_base
);
594 printk(KERN_ERR PFX
"rx_ring->sbq_base_dma = %llx.\n",
595 (unsigned long long) rx_ring
->sbq_base_dma
);
596 printk(KERN_ERR PFX
"rx_ring->sbq_base_indirect = %p.\n",
597 rx_ring
->sbq_base_indirect
);
598 printk(KERN_ERR PFX
"rx_ring->sbq_base_indirect_dma = %llx.\n",
599 (unsigned long long) rx_ring
->sbq_base_indirect_dma
);
600 printk(KERN_ERR PFX
"rx_ring->sbq = %p.\n", rx_ring
->sbq
);
601 printk(KERN_ERR PFX
"rx_ring->sbq_len = %d.\n", rx_ring
->sbq_len
);
602 printk(KERN_ERR PFX
"rx_ring->sbq_size = %d.\n", rx_ring
->sbq_size
);
603 printk(KERN_ERR PFX
"rx_ring->sbq_prod_idx_db_reg addr = %p.\n",
604 rx_ring
->sbq_prod_idx_db_reg
);
605 printk(KERN_ERR PFX
"rx_ring->sbq_prod_idx = %d.\n",
606 rx_ring
->sbq_prod_idx
);
607 printk(KERN_ERR PFX
"rx_ring->sbq_curr_idx = %d.\n",
608 rx_ring
->sbq_curr_idx
);
609 printk(KERN_ERR PFX
"rx_ring->sbq_clean_idx = %d.\n",
610 rx_ring
->sbq_clean_idx
);
611 printk(KERN_ERR PFX
"rx_ring->sbq_free_cnt = %d.\n",
612 rx_ring
->sbq_free_cnt
);
613 printk(KERN_ERR PFX
"rx_ring->sbq_buf_size = %d.\n",
614 rx_ring
->sbq_buf_size
);
615 printk(KERN_ERR PFX
"rx_ring->cq_id = %d.\n", rx_ring
->cq_id
);
616 printk(KERN_ERR PFX
"rx_ring->irq = %d.\n", rx_ring
->irq
);
617 printk(KERN_ERR PFX
"rx_ring->cpu = %d.\n", rx_ring
->cpu
);
618 printk(KERN_ERR PFX
"rx_ring->qdev = %p.\n", rx_ring
->qdev
);
621 void ql_dump_hw_cb(struct ql_adapter
*qdev
, int size
, u32 bit
, u16 q_id
)
625 printk(KERN_ERR PFX
"%s: Enter.\n", __func__
);
627 ptr
= kmalloc(size
, GFP_ATOMIC
);
629 printk(KERN_ERR PFX
"%s: Couldn't allocate a buffer.\n",
634 if (ql_write_cfg(qdev
, ptr
, size
, bit
, q_id
)) {
635 printk(KERN_ERR
"%s: Failed to upload control block!\n",
641 ql_dump_wqicb((struct wqicb
*)ptr
);
644 ql_dump_cqicb((struct cqicb
*)ptr
);
647 ql_dump_ricb((struct ricb
*)ptr
);
650 printk(KERN_ERR PFX
"%s: Invalid bit value = %x.\n",
660 void ql_dump_tx_desc(struct tx_buf_desc
*tbd
)
662 printk(KERN_ERR PFX
"tbd->addr = 0x%llx\n",
663 le64_to_cpu((u64
) tbd
->addr
));
664 printk(KERN_ERR PFX
"tbd->len = %d\n",
665 le32_to_cpu(tbd
->len
& TX_DESC_LEN_MASK
));
666 printk(KERN_ERR PFX
"tbd->flags = %s %s\n",
667 tbd
->len
& TX_DESC_C
? "C" : ".",
668 tbd
->len
& TX_DESC_E
? "E" : ".");
670 printk(KERN_ERR PFX
"tbd->addr = 0x%llx\n",
671 le64_to_cpu((u64
) tbd
->addr
));
672 printk(KERN_ERR PFX
"tbd->len = %d\n",
673 le32_to_cpu(tbd
->len
& TX_DESC_LEN_MASK
));
674 printk(KERN_ERR PFX
"tbd->flags = %s %s\n",
675 tbd
->len
& TX_DESC_C
? "C" : ".",
676 tbd
->len
& TX_DESC_E
? "E" : ".");
678 printk(KERN_ERR PFX
"tbd->addr = 0x%llx\n",
679 le64_to_cpu((u64
) tbd
->addr
));
680 printk(KERN_ERR PFX
"tbd->len = %d\n",
681 le32_to_cpu(tbd
->len
& TX_DESC_LEN_MASK
));
682 printk(KERN_ERR PFX
"tbd->flags = %s %s\n",
683 tbd
->len
& TX_DESC_C
? "C" : ".",
684 tbd
->len
& TX_DESC_E
? "E" : ".");
688 void ql_dump_ob_mac_iocb(struct ob_mac_iocb_req
*ob_mac_iocb
)
690 struct ob_mac_tso_iocb_req
*ob_mac_tso_iocb
=
691 (struct ob_mac_tso_iocb_req
*)ob_mac_iocb
;
692 struct tx_buf_desc
*tbd
;
695 printk(KERN_ERR PFX
"%s\n", __func__
);
696 printk(KERN_ERR PFX
"opcode = %s\n",
697 (ob_mac_iocb
->opcode
== OPCODE_OB_MAC_IOCB
) ? "MAC" : "TSO");
698 printk(KERN_ERR PFX
"flags1 = %s %s %s %s %s\n",
699 ob_mac_tso_iocb
->flags1
& OB_MAC_TSO_IOCB_OI
? "OI" : "",
700 ob_mac_tso_iocb
->flags1
& OB_MAC_TSO_IOCB_I
? "I" : "",
701 ob_mac_tso_iocb
->flags1
& OB_MAC_TSO_IOCB_D
? "D" : "",
702 ob_mac_tso_iocb
->flags1
& OB_MAC_TSO_IOCB_IP4
? "IP4" : "",
703 ob_mac_tso_iocb
->flags1
& OB_MAC_TSO_IOCB_IP6
? "IP6" : "");
704 printk(KERN_ERR PFX
"flags2 = %s %s %s\n",
705 ob_mac_tso_iocb
->flags2
& OB_MAC_TSO_IOCB_LSO
? "LSO" : "",
706 ob_mac_tso_iocb
->flags2
& OB_MAC_TSO_IOCB_UC
? "UC" : "",
707 ob_mac_tso_iocb
->flags2
& OB_MAC_TSO_IOCB_TC
? "TC" : "");
708 printk(KERN_ERR PFX
"flags3 = %s %s %s \n",
709 ob_mac_tso_iocb
->flags3
& OB_MAC_TSO_IOCB_IC
? "IC" : "",
710 ob_mac_tso_iocb
->flags3
& OB_MAC_TSO_IOCB_DFP
? "DFP" : "",
711 ob_mac_tso_iocb
->flags3
& OB_MAC_TSO_IOCB_V
? "V" : "");
712 printk(KERN_ERR PFX
"tid = %x\n", ob_mac_iocb
->tid
);
713 printk(KERN_ERR PFX
"txq_idx = %d\n", ob_mac_iocb
->txq_idx
);
714 printk(KERN_ERR PFX
"vlan_tci = %x\n", ob_mac_tso_iocb
->vlan_tci
);
715 if (ob_mac_iocb
->opcode
== OPCODE_OB_MAC_TSO_IOCB
) {
716 printk(KERN_ERR PFX
"frame_len = %d\n",
717 le32_to_cpu(ob_mac_tso_iocb
->frame_len
));
718 printk(KERN_ERR PFX
"mss = %d\n",
719 le16_to_cpu(ob_mac_tso_iocb
->mss
));
720 printk(KERN_ERR PFX
"prot_hdr_len = %d\n",
721 le16_to_cpu(ob_mac_tso_iocb
->total_hdrs_len
));
722 printk(KERN_ERR PFX
"hdr_offset = 0x%.04x\n",
723 le16_to_cpu(ob_mac_tso_iocb
->net_trans_offset
));
724 frame_len
= le32_to_cpu(ob_mac_tso_iocb
->frame_len
);
726 printk(KERN_ERR PFX
"frame_len = %d\n",
727 le16_to_cpu(ob_mac_iocb
->frame_len
));
728 frame_len
= le16_to_cpu(ob_mac_iocb
->frame_len
);
730 tbd
= &ob_mac_iocb
->tbd
[0];
731 ql_dump_tx_desc(tbd
);
734 void ql_dump_ob_mac_rsp(struct ob_mac_iocb_rsp
*ob_mac_rsp
)
736 printk(KERN_ERR PFX
"%s\n", __func__
);
737 printk(KERN_ERR PFX
"opcode = %d\n", ob_mac_rsp
->opcode
);
738 printk(KERN_ERR PFX
"flags = %s %s %s %s %s %s %s\n",
739 ob_mac_rsp
->flags1
& OB_MAC_IOCB_RSP_OI
? "OI" : ".",
740 ob_mac_rsp
->flags1
& OB_MAC_IOCB_RSP_I
? "I" : ".",
741 ob_mac_rsp
->flags1
& OB_MAC_IOCB_RSP_E
? "E" : ".",
742 ob_mac_rsp
->flags1
& OB_MAC_IOCB_RSP_S
? "S" : ".",
743 ob_mac_rsp
->flags1
& OB_MAC_IOCB_RSP_L
? "L" : ".",
744 ob_mac_rsp
->flags1
& OB_MAC_IOCB_RSP_P
? "P" : ".",
745 ob_mac_rsp
->flags2
& OB_MAC_IOCB_RSP_B
? "B" : ".");
746 printk(KERN_ERR PFX
"tid = %x\n", ob_mac_rsp
->tid
);
751 void ql_dump_ib_mac_rsp(struct ib_mac_iocb_rsp
*ib_mac_rsp
)
753 printk(KERN_ERR PFX
"%s\n", __func__
);
754 printk(KERN_ERR PFX
"opcode = 0x%x\n", ib_mac_rsp
->opcode
);
755 printk(KERN_ERR PFX
"flags1 = %s%s%s%s%s%s\n",
756 ib_mac_rsp
->flags1
& IB_MAC_IOCB_RSP_OI
? "OI " : "",
757 ib_mac_rsp
->flags1
& IB_MAC_IOCB_RSP_I
? "I " : "",
758 ib_mac_rsp
->flags1
& IB_MAC_IOCB_RSP_TE
? "TE " : "",
759 ib_mac_rsp
->flags1
& IB_MAC_IOCB_RSP_NU
? "NU " : "",
760 ib_mac_rsp
->flags1
& IB_MAC_IOCB_RSP_IE
? "IE " : "",
761 ib_mac_rsp
->flags1
& IB_MAC_IOCB_RSP_B
? "B " : "");
763 if (ib_mac_rsp
->flags1
& IB_MAC_IOCB_RSP_M_MASK
)
764 printk(KERN_ERR PFX
"%s%s%s Multicast.\n",
765 (ib_mac_rsp
->flags1
& IB_MAC_IOCB_RSP_M_MASK
) ==
766 IB_MAC_IOCB_RSP_M_HASH
? "Hash" : "",
767 (ib_mac_rsp
->flags1
& IB_MAC_IOCB_RSP_M_MASK
) ==
768 IB_MAC_IOCB_RSP_M_REG
? "Registered" : "",
769 (ib_mac_rsp
->flags1
& IB_MAC_IOCB_RSP_M_MASK
) ==
770 IB_MAC_IOCB_RSP_M_PROM
? "Promiscuous" : "");
772 printk(KERN_ERR PFX
"flags2 = %s%s%s%s%s\n",
773 (ib_mac_rsp
->flags2
& IB_MAC_IOCB_RSP_P
) ? "P " : "",
774 (ib_mac_rsp
->flags2
& IB_MAC_IOCB_RSP_V
) ? "V " : "",
775 (ib_mac_rsp
->flags2
& IB_MAC_IOCB_RSP_U
) ? "U " : "",
776 (ib_mac_rsp
->flags2
& IB_MAC_IOCB_RSP_T
) ? "T " : "",
777 (ib_mac_rsp
->flags2
& IB_MAC_IOCB_RSP_FO
) ? "FO " : "");
779 if (ib_mac_rsp
->flags2
& IB_MAC_IOCB_RSP_ERR_MASK
)
780 printk(KERN_ERR PFX
"%s%s%s%s%s error.\n",
781 (ib_mac_rsp
->flags2
& IB_MAC_IOCB_RSP_ERR_MASK
) ==
782 IB_MAC_IOCB_RSP_ERR_OVERSIZE
? "oversize" : "",
783 (ib_mac_rsp
->flags2
& IB_MAC_IOCB_RSP_ERR_MASK
) ==
784 IB_MAC_IOCB_RSP_ERR_UNDERSIZE
? "undersize" : "",
785 (ib_mac_rsp
->flags2
& IB_MAC_IOCB_RSP_ERR_MASK
) ==
786 IB_MAC_IOCB_RSP_ERR_PREAMBLE
? "preamble" : "",
787 (ib_mac_rsp
->flags2
& IB_MAC_IOCB_RSP_ERR_MASK
) ==
788 IB_MAC_IOCB_RSP_ERR_FRAME_LEN
? "frame length" : "",
789 (ib_mac_rsp
->flags2
& IB_MAC_IOCB_RSP_ERR_MASK
) ==
790 IB_MAC_IOCB_RSP_ERR_CRC
? "CRC" : "");
792 printk(KERN_ERR PFX
"flags3 = %s%s.\n",
793 ib_mac_rsp
->flags3
& IB_MAC_IOCB_RSP_DS
? "DS " : "",
794 ib_mac_rsp
->flags3
& IB_MAC_IOCB_RSP_DL
? "DL " : "");
796 if (ib_mac_rsp
->flags3
& IB_MAC_IOCB_RSP_RSS_MASK
)
797 printk(KERN_ERR PFX
"RSS flags = %s%s%s%s.\n",
798 ((ib_mac_rsp
->flags3
& IB_MAC_IOCB_RSP_RSS_MASK
) ==
799 IB_MAC_IOCB_RSP_M_IPV4
) ? "IPv4 RSS" : "",
800 ((ib_mac_rsp
->flags3
& IB_MAC_IOCB_RSP_RSS_MASK
) ==
801 IB_MAC_IOCB_RSP_M_IPV6
) ? "IPv6 RSS " : "",
802 ((ib_mac_rsp
->flags3
& IB_MAC_IOCB_RSP_RSS_MASK
) ==
803 IB_MAC_IOCB_RSP_M_TCP_V4
) ? "TCP/IPv4 RSS" : "",
804 ((ib_mac_rsp
->flags3
& IB_MAC_IOCB_RSP_RSS_MASK
) ==
805 IB_MAC_IOCB_RSP_M_TCP_V6
) ? "TCP/IPv6 RSS" : "");
807 printk(KERN_ERR PFX
"data_len = %d\n",
808 le32_to_cpu(ib_mac_rsp
->data_len
));
809 printk(KERN_ERR PFX
"data_addr = 0x%llx\n",
810 (unsigned long long) le64_to_cpu(ib_mac_rsp
->data_addr
));
811 if (ib_mac_rsp
->flags3
& IB_MAC_IOCB_RSP_RSS_MASK
)
812 printk(KERN_ERR PFX
"rss = %x\n",
813 le32_to_cpu(ib_mac_rsp
->rss
));
814 if (ib_mac_rsp
->flags2
& IB_MAC_IOCB_RSP_V
)
815 printk(KERN_ERR PFX
"vlan_id = %x\n",
816 le16_to_cpu(ib_mac_rsp
->vlan_id
));
818 printk(KERN_ERR PFX
"flags4 = %s%s%s.\n",
819 ib_mac_rsp
->flags4
& IB_MAC_IOCB_RSP_HV
? "HV " : "",
820 ib_mac_rsp
->flags4
& IB_MAC_IOCB_RSP_HS
? "HS " : "",
821 ib_mac_rsp
->flags4
& IB_MAC_IOCB_RSP_HL
? "HL " : "");
823 if (ib_mac_rsp
->flags4
& IB_MAC_IOCB_RSP_HV
) {
824 printk(KERN_ERR PFX
"hdr length = %d.\n",
825 le32_to_cpu(ib_mac_rsp
->hdr_len
));
826 printk(KERN_ERR PFX
"hdr addr = 0x%llx.\n",
827 (unsigned long long) le64_to_cpu(ib_mac_rsp
->hdr_addr
));
833 void ql_dump_all(struct ql_adapter
*qdev
)
839 for (i
= 0; i
< qdev
->tx_ring_count
; i
++) {
840 QL_DUMP_TX_RING(&qdev
->tx_ring
[i
]);
841 QL_DUMP_WQICB((struct wqicb
*)&qdev
->tx_ring
[i
]);
843 for (i
= 0; i
< qdev
->rx_ring_count
; i
++) {
844 QL_DUMP_RX_RING(&qdev
->rx_ring
[i
]);
845 QL_DUMP_CQICB((struct cqicb
*)&qdev
->rx_ring
[i
]);