diff options
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_mid.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mid.c | 160 |
1 files changed, 108 insertions, 52 deletions
diff --git a/drivers/scsi/qla2xxx/qla_mid.c b/drivers/scsi/qla2xxx/qla_mid.c index 5e343919acad..c706ed370000 100644 --- a/drivers/scsi/qla2xxx/qla_mid.c +++ b/drivers/scsi/qla2xxx/qla_mid.c | |||
@@ -36,8 +36,9 @@ qla24xx_allocate_vp_id(scsi_qla_host_t *vha) | |||
36 | mutex_lock(&ha->vport_lock); | 36 | mutex_lock(&ha->vport_lock); |
37 | vp_id = find_first_zero_bit(ha->vp_idx_map, ha->max_npiv_vports + 1); | 37 | vp_id = find_first_zero_bit(ha->vp_idx_map, ha->max_npiv_vports + 1); |
38 | if (vp_id > ha->max_npiv_vports) { | 38 | if (vp_id > ha->max_npiv_vports) { |
39 | DEBUG15(printk ("vp_id %d is bigger than max-supported %d.\n", | 39 | ql_dbg(ql_dbg_vport, vha, 0xa000, |
40 | vp_id, ha->max_npiv_vports)); | 40 | "vp_id %d is bigger than max-supported %d.\n", |
41 | vp_id, ha->max_npiv_vports); | ||
41 | mutex_unlock(&ha->vport_lock); | 42 | mutex_unlock(&ha->vport_lock); |
42 | return vp_id; | 43 | return vp_id; |
43 | } | 44 | } |
@@ -131,9 +132,9 @@ qla2x00_mark_vp_devices_dead(scsi_qla_host_t *vha) | |||
131 | fc_port_t *fcport; | 132 | fc_port_t *fcport; |
132 | 133 | ||
133 | list_for_each_entry(fcport, &vha->vp_fcports, list) { | 134 | list_for_each_entry(fcport, &vha->vp_fcports, list) { |
134 | DEBUG15(printk("scsi(%ld): Marking port dead, " | 135 | ql_dbg(ql_dbg_vport, vha, 0xa001, |
135 | "loop_id=0x%04x :%x\n", | 136 | "Marking port dead, loop_id=0x%04x : %x.\n", |
136 | vha->host_no, fcport->loop_id, fcport->vp_idx)); | 137 | fcport->loop_id, fcport->vp_idx); |
137 | 138 | ||
138 | qla2x00_mark_device_lost(vha, fcport, 0, 0); | 139 | qla2x00_mark_device_lost(vha, fcport, 0, 0); |
139 | qla2x00_set_fcport_state(fcport, FCS_UNCONFIGURED); | 140 | qla2x00_set_fcport_state(fcport, FCS_UNCONFIGURED); |
@@ -187,13 +188,13 @@ qla24xx_enable_vp(scsi_qla_host_t *vha) | |||
187 | goto enable_failed; | 188 | goto enable_failed; |
188 | } | 189 | } |
189 | 190 | ||
190 | DEBUG15(qla_printk(KERN_INFO, ha, | 191 | ql_dbg(ql_dbg_taskm, vha, 0x801a, |
191 | "Virtual port with id: %d - Enabled\n", vha->vp_idx)); | 192 | "Virtual port with id: %d - Enabled.\n", vha->vp_idx); |
192 | return 0; | 193 | return 0; |
193 | 194 | ||
194 | enable_failed: | 195 | enable_failed: |
195 | DEBUG15(qla_printk(KERN_INFO, ha, | 196 | ql_dbg(ql_dbg_taskm, vha, 0x801b, |
196 | "Virtual port with id: %d - Disabled\n", vha->vp_idx)); | 197 | "Virtual port with id: %d - Disabled.\n", vha->vp_idx); |
197 | return 1; | 198 | return 1; |
198 | } | 199 | } |
199 | 200 | ||
@@ -205,12 +206,12 @@ qla24xx_configure_vp(scsi_qla_host_t *vha) | |||
205 | 206 | ||
206 | fc_vport = vha->fc_vport; | 207 | fc_vport = vha->fc_vport; |
207 | 208 | ||
208 | DEBUG15(printk("scsi(%ld): %s: change request #3 for this host.\n", | 209 | ql_dbg(ql_dbg_vport, vha, 0xa002, |
209 | vha->host_no, __func__)); | 210 | "%s: change request #3.\n", __func__); |
210 | ret = qla2x00_send_change_request(vha, 0x3, vha->vp_idx); | 211 | ret = qla2x00_send_change_request(vha, 0x3, vha->vp_idx); |
211 | if (ret != QLA_SUCCESS) { | 212 | if (ret != QLA_SUCCESS) { |
212 | DEBUG15(qla_printk(KERN_ERR, vha->hw, "Failed to enable " | 213 | ql_dbg(ql_dbg_vport, vha, 0xa003, "Failed to enable " |
213 | "receiving of RSCN requests: 0x%x\n", ret)); | 214 | "receiving of RSCN requests: 0x%x.\n", ret); |
214 | return; | 215 | return; |
215 | } else { | 216 | } else { |
216 | /* Corresponds to SCR enabled */ | 217 | /* Corresponds to SCR enabled */ |
@@ -248,9 +249,9 @@ qla2x00_alert_all_vps(struct rsp_que *rsp, uint16_t *mb) | |||
248 | case MBA_CHG_IN_CONNECTION: | 249 | case MBA_CHG_IN_CONNECTION: |
249 | case MBA_PORT_UPDATE: | 250 | case MBA_PORT_UPDATE: |
250 | case MBA_RSCN_UPDATE: | 251 | case MBA_RSCN_UPDATE: |
251 | DEBUG15(printk("scsi(%ld)%s: Async_event for" | 252 | ql_dbg(ql_dbg_async, vha, 0x5024, |
252 | " VP[%d], mb = 0x%x, vha=%p\n", | 253 | "Async_event for VP[%d], mb=0x%x vha=%p.\n", |
253 | vha->host_no, __func__, i, *mb, vha)); | 254 | i, *mb, vha); |
254 | qla2x00_async_event(vha, rsp, mb); | 255 | qla2x00_async_event(vha, rsp, mb); |
255 | break; | 256 | break; |
256 | } | 257 | } |
@@ -286,37 +287,49 @@ qla2x00_vp_abort_isp(scsi_qla_host_t *vha) | |||
286 | if (!test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags)) | 287 | if (!test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags)) |
287 | qla24xx_control_vp(vha, VCE_COMMAND_DISABLE_VPS_LOGO_ALL); | 288 | qla24xx_control_vp(vha, VCE_COMMAND_DISABLE_VPS_LOGO_ALL); |
288 | 289 | ||
289 | DEBUG15(printk("scsi(%ld): Scheduling enable of Vport %d...\n", | 290 | ql_dbg(ql_dbg_taskm, vha, 0x801d, |
290 | vha->host_no, vha->vp_idx)); | 291 | "Scheduling enable of Vport %d.\n", vha->vp_idx); |
291 | return qla24xx_enable_vp(vha); | 292 | return qla24xx_enable_vp(vha); |
292 | } | 293 | } |
293 | 294 | ||
294 | static int | 295 | static int |
295 | qla2x00_do_dpc_vp(scsi_qla_host_t *vha) | 296 | qla2x00_do_dpc_vp(scsi_qla_host_t *vha) |
296 | { | 297 | { |
298 | ql_dbg(ql_dbg_dpc, vha, 0x4012, | ||
299 | "Entering %s.\n", __func__); | ||
300 | ql_dbg(ql_dbg_dpc, vha, 0x4013, | ||
301 | "vp_flags: 0x%lx.\n", vha->vp_flags); | ||
302 | |||
297 | qla2x00_do_work(vha); | 303 | qla2x00_do_work(vha); |
298 | 304 | ||
299 | if (test_and_clear_bit(VP_IDX_ACQUIRED, &vha->vp_flags)) { | 305 | if (test_and_clear_bit(VP_IDX_ACQUIRED, &vha->vp_flags)) { |
300 | /* VP acquired. complete port configuration */ | 306 | /* VP acquired. complete port configuration */ |
307 | ql_dbg(ql_dbg_dpc, vha, 0x4014, | ||
308 | "Configure VP scheduled.\n"); | ||
301 | qla24xx_configure_vp(vha); | 309 | qla24xx_configure_vp(vha); |
310 | ql_dbg(ql_dbg_dpc, vha, 0x4015, | ||
311 | "Configure VP end.\n"); | ||
302 | return 0; | 312 | return 0; |
303 | } | 313 | } |
304 | 314 | ||
305 | if (test_bit(FCPORT_UPDATE_NEEDED, &vha->dpc_flags)) { | 315 | if (test_bit(FCPORT_UPDATE_NEEDED, &vha->dpc_flags)) { |
316 | ql_dbg(ql_dbg_dpc, vha, 0x4016, | ||
317 | "FCPort update scheduled.\n"); | ||
306 | qla2x00_update_fcports(vha); | 318 | qla2x00_update_fcports(vha); |
307 | clear_bit(FCPORT_UPDATE_NEEDED, &vha->dpc_flags); | 319 | clear_bit(FCPORT_UPDATE_NEEDED, &vha->dpc_flags); |
320 | ql_dbg(ql_dbg_dpc, vha, 0x4017, | ||
321 | "FCPort update end.\n"); | ||
308 | } | 322 | } |
309 | 323 | ||
310 | if ((test_and_clear_bit(RELOGIN_NEEDED, &vha->dpc_flags)) && | 324 | if ((test_and_clear_bit(RELOGIN_NEEDED, &vha->dpc_flags)) && |
311 | !test_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags) && | 325 | !test_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags) && |
312 | atomic_read(&vha->loop_state) != LOOP_DOWN) { | 326 | atomic_read(&vha->loop_state) != LOOP_DOWN) { |
313 | 327 | ||
314 | DEBUG(printk("scsi(%ld): qla2x00_port_login()\n", | 328 | ql_dbg(ql_dbg_dpc, vha, 0x4018, |
315 | vha->host_no)); | 329 | "Relogin needed scheduled.\n"); |
316 | qla2x00_relogin(vha); | 330 | qla2x00_relogin(vha); |
317 | 331 | ql_dbg(ql_dbg_dpc, vha, 0x4019, | |
318 | DEBUG(printk("scsi(%ld): qla2x00_port_login - end\n", | 332 | "Relogin needed end.\n"); |
319 | vha->host_no)); | ||
320 | } | 333 | } |
321 | 334 | ||
322 | if (test_and_clear_bit(RESET_MARKER_NEEDED, &vha->dpc_flags) && | 335 | if (test_and_clear_bit(RESET_MARKER_NEEDED, &vha->dpc_flags) && |
@@ -326,11 +339,17 @@ qla2x00_do_dpc_vp(scsi_qla_host_t *vha) | |||
326 | 339 | ||
327 | if (test_and_clear_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags)) { | 340 | if (test_and_clear_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags)) { |
328 | if (!(test_and_set_bit(LOOP_RESYNC_ACTIVE, &vha->dpc_flags))) { | 341 | if (!(test_and_set_bit(LOOP_RESYNC_ACTIVE, &vha->dpc_flags))) { |
342 | ql_dbg(ql_dbg_dpc, vha, 0x401a, | ||
343 | "Loop resync scheduled.\n"); | ||
329 | qla2x00_loop_resync(vha); | 344 | qla2x00_loop_resync(vha); |
330 | clear_bit(LOOP_RESYNC_ACTIVE, &vha->dpc_flags); | 345 | clear_bit(LOOP_RESYNC_ACTIVE, &vha->dpc_flags); |
346 | ql_dbg(ql_dbg_dpc, vha, 0x401b, | ||
347 | "Loop resync end.\n"); | ||
331 | } | 348 | } |
332 | } | 349 | } |
333 | 350 | ||
351 | ql_dbg(ql_dbg_dpc, vha, 0x401c, | ||
352 | "Exiting %s.\n", __func__); | ||
334 | return 0; | 353 | return 0; |
335 | } | 354 | } |
336 | 355 | ||
@@ -396,9 +415,10 @@ qla24xx_vport_create_req_sanity_check(struct fc_vport *fc_vport) | |||
396 | 415 | ||
397 | /* Check up max-npiv-supports */ | 416 | /* Check up max-npiv-supports */ |
398 | if (ha->num_vhosts > ha->max_npiv_vports) { | 417 | if (ha->num_vhosts > ha->max_npiv_vports) { |
399 | DEBUG15(printk("scsi(%ld): num_vhosts %ud is bigger than " | 418 | ql_dbg(ql_dbg_vport, vha, 0xa004, |
400 | "max_npv_vports %ud.\n", base_vha->host_no, | 419 | "num_vhosts %ud is bigger " |
401 | ha->num_vhosts, ha->max_npiv_vports)); | 420 | "than max_npiv_vports %ud.\n", |
421 | ha->num_vhosts, ha->max_npiv_vports); | ||
402 | return VPCERR_UNSUPPORTED; | 422 | return VPCERR_UNSUPPORTED; |
403 | } | 423 | } |
404 | return 0; | 424 | return 0; |
@@ -415,7 +435,8 @@ qla24xx_create_vhost(struct fc_vport *fc_vport) | |||
415 | 435 | ||
416 | vha = qla2x00_create_host(sht, ha); | 436 | vha = qla2x00_create_host(sht, ha); |
417 | if (!vha) { | 437 | if (!vha) { |
418 | DEBUG(printk("qla2xxx: scsi_host_alloc() failed for vport\n")); | 438 | ql_log(ql_log_warn, vha, 0xa005, |
439 | "scsi_host_alloc() failed for vport.\n"); | ||
419 | return(NULL); | 440 | return(NULL); |
420 | } | 441 | } |
421 | 442 | ||
@@ -429,8 +450,8 @@ qla24xx_create_vhost(struct fc_vport *fc_vport) | |||
429 | vha->device_flags = 0; | 450 | vha->device_flags = 0; |
430 | vha->vp_idx = qla24xx_allocate_vp_id(vha); | 451 | vha->vp_idx = qla24xx_allocate_vp_id(vha); |
431 | if (vha->vp_idx > ha->max_npiv_vports) { | 452 | if (vha->vp_idx > ha->max_npiv_vports) { |
432 | DEBUG15(printk("scsi(%ld): Couldn't allocate vp_id.\n", | 453 | ql_dbg(ql_dbg_vport, vha, 0xa006, |
433 | vha->host_no)); | 454 | "Couldn't allocate vp_id.\n"); |
434 | goto create_vhost_failed; | 455 | goto create_vhost_failed; |
435 | } | 456 | } |
436 | vha->mgmt_svr_loop_id = 10 + vha->vp_idx; | 457 | vha->mgmt_svr_loop_id = 10 + vha->vp_idx; |
@@ -461,8 +482,9 @@ qla24xx_create_vhost(struct fc_vport *fc_vport) | |||
461 | host->max_id = MAX_TARGETS_2200; | 482 | host->max_id = MAX_TARGETS_2200; |
462 | host->transportt = qla2xxx_transport_vport_template; | 483 | host->transportt = qla2xxx_transport_vport_template; |
463 | 484 | ||
464 | DEBUG15(printk("DEBUG: detect vport hba %ld at address = %p\n", | 485 | ql_dbg(ql_dbg_vport, vha, 0xa007, |
465 | vha->host_no, vha)); | 486 | "Detect vport hba %ld at address = %p.\n", |
487 | vha->host_no, vha); | ||
466 | 488 | ||
467 | vha->flags.init_done = 1; | 489 | vha->flags.init_done = 1; |
468 | 490 | ||
@@ -567,9 +589,9 @@ qla25xx_delete_queues(struct scsi_qla_host *vha) | |||
567 | if (req) { | 589 | if (req) { |
568 | ret = qla25xx_delete_req_que(vha, req); | 590 | ret = qla25xx_delete_req_que(vha, req); |
569 | if (ret != QLA_SUCCESS) { | 591 | if (ret != QLA_SUCCESS) { |
570 | qla_printk(KERN_WARNING, ha, | 592 | ql_log(ql_log_warn, vha, 0x00ea, |
571 | "Couldn't delete req que %d\n", | 593 | "Couldn't delete req que %d.\n", |
572 | req->id); | 594 | req->id); |
573 | return ret; | 595 | return ret; |
574 | } | 596 | } |
575 | } | 597 | } |
@@ -581,9 +603,9 @@ qla25xx_delete_queues(struct scsi_qla_host *vha) | |||
581 | if (rsp) { | 603 | if (rsp) { |
582 | ret = qla25xx_delete_rsp_que(vha, rsp); | 604 | ret = qla25xx_delete_rsp_que(vha, rsp); |
583 | if (ret != QLA_SUCCESS) { | 605 | if (ret != QLA_SUCCESS) { |
584 | qla_printk(KERN_WARNING, ha, | 606 | ql_log(ql_log_warn, vha, 0x00eb, |
585 | "Couldn't delete rsp que %d\n", | 607 | "Couldn't delete rsp que %d.\n", |
586 | rsp->id); | 608 | rsp->id); |
587 | return ret; | 609 | return ret; |
588 | } | 610 | } |
589 | } | 611 | } |
@@ -604,8 +626,8 @@ qla25xx_create_req_que(struct qla_hw_data *ha, uint16_t options, | |||
604 | 626 | ||
605 | req = kzalloc(sizeof(struct req_que), GFP_KERNEL); | 627 | req = kzalloc(sizeof(struct req_que), GFP_KERNEL); |
606 | if (req == NULL) { | 628 | if (req == NULL) { |
607 | qla_printk(KERN_WARNING, ha, "could not allocate memory" | 629 | ql_log(ql_log_fatal, base_vha, 0x00d9, |
608 | "for request que\n"); | 630 | "Failed to allocate memory for request queue.\n"); |
609 | goto failed; | 631 | goto failed; |
610 | } | 632 | } |
611 | 633 | ||
@@ -614,8 +636,8 @@ qla25xx_create_req_que(struct qla_hw_data *ha, uint16_t options, | |||
614 | (req->length + 1) * sizeof(request_t), | 636 | (req->length + 1) * sizeof(request_t), |
615 | &req->dma, GFP_KERNEL); | 637 | &req->dma, GFP_KERNEL); |
616 | if (req->ring == NULL) { | 638 | if (req->ring == NULL) { |
617 | qla_printk(KERN_WARNING, ha, | 639 | ql_log(ql_log_fatal, base_vha, 0x00da, |
618 | "Memory Allocation failed - request_ring\n"); | 640 | "Failed to allocte memory for request_ring.\n"); |
619 | goto que_failed; | 641 | goto que_failed; |
620 | } | 642 | } |
621 | 643 | ||
@@ -623,8 +645,8 @@ qla25xx_create_req_que(struct qla_hw_data *ha, uint16_t options, | |||
623 | que_id = find_first_zero_bit(ha->req_qid_map, ha->max_req_queues); | 645 | que_id = find_first_zero_bit(ha->req_qid_map, ha->max_req_queues); |
624 | if (que_id >= ha->max_req_queues) { | 646 | if (que_id >= ha->max_req_queues) { |
625 | mutex_unlock(&ha->vport_lock); | 647 | mutex_unlock(&ha->vport_lock); |
626 | qla_printk(KERN_INFO, ha, "No resources to create " | 648 | ql_log(ql_log_warn, base_vha, 0x00db, |
627 | "additional request queue\n"); | 649 | "No resources to create additional request queue.\n"); |
628 | goto que_failed; | 650 | goto que_failed; |
629 | } | 651 | } |
630 | set_bit(que_id, ha->req_qid_map); | 652 | set_bit(que_id, ha->req_qid_map); |
@@ -633,6 +655,12 @@ qla25xx_create_req_que(struct qla_hw_data *ha, uint16_t options, | |||
633 | req->vp_idx = vp_idx; | 655 | req->vp_idx = vp_idx; |
634 | req->qos = qos; | 656 | req->qos = qos; |
635 | 657 | ||
658 | ql_dbg(ql_dbg_multiq, base_vha, 0xc002, | ||
659 | "queue_id=%d rid=%d vp_idx=%d qos=%d.\n", | ||
660 | que_id, req->rid, req->vp_idx, req->qos); | ||
661 | ql_dbg(ql_dbg_init, base_vha, 0x00dc, | ||
662 | "queue_id=%d rid=%d vp_idx=%d qos=%d.\n", | ||
663 | que_id, req->rid, req->vp_idx, req->qos); | ||
636 | if (rsp_que < 0) | 664 | if (rsp_que < 0) |
637 | req->rsp = NULL; | 665 | req->rsp = NULL; |
638 | else | 666 | else |
@@ -645,6 +673,10 @@ qla25xx_create_req_que(struct qla_hw_data *ha, uint16_t options, | |||
645 | options |= BIT_5; | 673 | options |= BIT_5; |
646 | req->options = options; | 674 | req->options = options; |
647 | 675 | ||
676 | ql_dbg(ql_dbg_multiq, base_vha, 0xc003, | ||
677 | "options=0x%x.\n", req->options); | ||
678 | ql_dbg(ql_dbg_init, base_vha, 0x00dd, | ||
679 | "options=0x%x.\n", req->options); | ||
648 | for (cnt = 1; cnt < MAX_OUTSTANDING_COMMANDS; cnt++) | 680 | for (cnt = 1; cnt < MAX_OUTSTANDING_COMMANDS; cnt++) |
649 | req->outstanding_cmds[cnt] = NULL; | 681 | req->outstanding_cmds[cnt] = NULL; |
650 | req->current_outstanding_cmd = 1; | 682 | req->current_outstanding_cmd = 1; |
@@ -656,10 +688,21 @@ qla25xx_create_req_que(struct qla_hw_data *ha, uint16_t options, | |||
656 | reg = ISP_QUE_REG(ha, que_id); | 688 | reg = ISP_QUE_REG(ha, que_id); |
657 | req->max_q_depth = ha->req_q_map[0]->max_q_depth; | 689 | req->max_q_depth = ha->req_q_map[0]->max_q_depth; |
658 | mutex_unlock(&ha->vport_lock); | 690 | mutex_unlock(&ha->vport_lock); |
691 | ql_dbg(ql_dbg_multiq, base_vha, 0xc004, | ||
692 | "ring_ptr=%p ring_index=%d, " | ||
693 | "cnt=%d id=%d max_q_depth=%d.\n", | ||
694 | req->ring_ptr, req->ring_index, | ||
695 | req->cnt, req->id, req->max_q_depth); | ||
696 | ql_dbg(ql_dbg_init, base_vha, 0x00de, | ||
697 | "ring_ptr=%p ring_index=%d, " | ||
698 | "cnt=%d id=%d max_q_depth=%d.\n", | ||
699 | req->ring_ptr, req->ring_index, req->cnt, | ||
700 | req->id, req->max_q_depth); | ||
659 | 701 | ||
660 | ret = qla25xx_init_req_que(base_vha, req); | 702 | ret = qla25xx_init_req_que(base_vha, req); |
661 | if (ret != QLA_SUCCESS) { | 703 | if (ret != QLA_SUCCESS) { |
662 | qla_printk(KERN_WARNING, ha, "%s failed\n", __func__); | 704 | ql_log(ql_log_fatal, base_vha, 0x00df, |
705 | "%s failed.\n", __func__); | ||
663 | mutex_lock(&ha->vport_lock); | 706 | mutex_lock(&ha->vport_lock); |
664 | clear_bit(que_id, ha->req_qid_map); | 707 | clear_bit(que_id, ha->req_qid_map); |
665 | mutex_unlock(&ha->vport_lock); | 708 | mutex_unlock(&ha->vport_lock); |
@@ -700,8 +743,8 @@ qla25xx_create_rsp_que(struct qla_hw_data *ha, uint16_t options, | |||
700 | 743 | ||
701 | rsp = kzalloc(sizeof(struct rsp_que), GFP_KERNEL); | 744 | rsp = kzalloc(sizeof(struct rsp_que), GFP_KERNEL); |
702 | if (rsp == NULL) { | 745 | if (rsp == NULL) { |
703 | qla_printk(KERN_WARNING, ha, "could not allocate memory for" | 746 | ql_log(ql_log_warn, base_vha, 0x0066, |
704 | " response que\n"); | 747 | "Failed to allocate memory for response queue.\n"); |
705 | goto failed; | 748 | goto failed; |
706 | } | 749 | } |
707 | 750 | ||
@@ -710,8 +753,8 @@ qla25xx_create_rsp_que(struct qla_hw_data *ha, uint16_t options, | |||
710 | (rsp->length + 1) * sizeof(response_t), | 753 | (rsp->length + 1) * sizeof(response_t), |
711 | &rsp->dma, GFP_KERNEL); | 754 | &rsp->dma, GFP_KERNEL); |
712 | if (rsp->ring == NULL) { | 755 | if (rsp->ring == NULL) { |
713 | qla_printk(KERN_WARNING, ha, | 756 | ql_log(ql_log_warn, base_vha, 0x00e1, |
714 | "Memory Allocation failed - response_ring\n"); | 757 | "Failed to allocate memory for response ring.\n"); |
715 | goto que_failed; | 758 | goto que_failed; |
716 | } | 759 | } |
717 | 760 | ||
@@ -719,8 +762,8 @@ qla25xx_create_rsp_que(struct qla_hw_data *ha, uint16_t options, | |||
719 | que_id = find_first_zero_bit(ha->rsp_qid_map, ha->max_rsp_queues); | 762 | que_id = find_first_zero_bit(ha->rsp_qid_map, ha->max_rsp_queues); |
720 | if (que_id >= ha->max_rsp_queues) { | 763 | if (que_id >= ha->max_rsp_queues) { |
721 | mutex_unlock(&ha->vport_lock); | 764 | mutex_unlock(&ha->vport_lock); |
722 | qla_printk(KERN_INFO, ha, "No resources to create " | 765 | ql_log(ql_log_warn, base_vha, 0x00e2, |
723 | "additional response queue\n"); | 766 | "No resources to create additional request queue.\n"); |
724 | goto que_failed; | 767 | goto que_failed; |
725 | } | 768 | } |
726 | set_bit(que_id, ha->rsp_qid_map); | 769 | set_bit(que_id, ha->rsp_qid_map); |
@@ -728,12 +771,16 @@ qla25xx_create_rsp_que(struct qla_hw_data *ha, uint16_t options, | |||
728 | if (ha->flags.msix_enabled) | 771 | if (ha->flags.msix_enabled) |
729 | rsp->msix = &ha->msix_entries[que_id + 1]; | 772 | rsp->msix = &ha->msix_entries[que_id + 1]; |
730 | else | 773 | else |
731 | qla_printk(KERN_WARNING, ha, "msix not enabled\n"); | 774 | ql_log(ql_log_warn, base_vha, 0x00e3, |
775 | "MSIX not enalbled.\n"); | ||
732 | 776 | ||
733 | ha->rsp_q_map[que_id] = rsp; | 777 | ha->rsp_q_map[que_id] = rsp; |
734 | rsp->rid = rid; | 778 | rsp->rid = rid; |
735 | rsp->vp_idx = vp_idx; | 779 | rsp->vp_idx = vp_idx; |
736 | rsp->hw = ha; | 780 | rsp->hw = ha; |
781 | ql_dbg(ql_dbg_init, base_vha, 0x00e4, | ||
782 | "queue_id=%d rid=%d vp_idx=%d hw=%p.\n", | ||
783 | que_id, rsp->rid, rsp->vp_idx, rsp->hw); | ||
737 | /* Use alternate PCI bus number */ | 784 | /* Use alternate PCI bus number */ |
738 | if (MSB(rsp->rid)) | 785 | if (MSB(rsp->rid)) |
739 | options |= BIT_4; | 786 | options |= BIT_4; |
@@ -750,6 +797,14 @@ qla25xx_create_rsp_que(struct qla_hw_data *ha, uint16_t options, | |||
750 | rsp->rsp_q_in = ®->isp25mq.rsp_q_in; | 797 | rsp->rsp_q_in = ®->isp25mq.rsp_q_in; |
751 | rsp->rsp_q_out = ®->isp25mq.rsp_q_out; | 798 | rsp->rsp_q_out = ®->isp25mq.rsp_q_out; |
752 | mutex_unlock(&ha->vport_lock); | 799 | mutex_unlock(&ha->vport_lock); |
800 | ql_dbg(ql_dbg_multiq, base_vha, 0xc00b, | ||
801 | "options=%x id=%d rsp_q_in=%p rsp_q_out=%p", | ||
802 | rsp->options, rsp->id, rsp->rsp_q_in, | ||
803 | rsp->rsp_q_out); | ||
804 | ql_dbg(ql_dbg_init, base_vha, 0x00e5, | ||
805 | "options=%x id=%d rsp_q_in=%p rsp_q_out=%p", | ||
806 | rsp->options, rsp->id, rsp->rsp_q_in, | ||
807 | rsp->rsp_q_out); | ||
753 | 808 | ||
754 | ret = qla25xx_request_irq(rsp); | 809 | ret = qla25xx_request_irq(rsp); |
755 | if (ret) | 810 | if (ret) |
@@ -757,7 +812,8 @@ qla25xx_create_rsp_que(struct qla_hw_data *ha, uint16_t options, | |||
757 | 812 | ||
758 | ret = qla25xx_init_rsp_que(base_vha, rsp); | 813 | ret = qla25xx_init_rsp_que(base_vha, rsp); |
759 | if (ret != QLA_SUCCESS) { | 814 | if (ret != QLA_SUCCESS) { |
760 | qla_printk(KERN_WARNING, ha, "%s failed\n", __func__); | 815 | ql_log(ql_log_fatal, base_vha, 0x00e7, |
816 | "%s failed.\n", __func__); | ||
761 | mutex_lock(&ha->vport_lock); | 817 | mutex_lock(&ha->vport_lock); |
762 | clear_bit(que_id, ha->rsp_qid_map); | 818 | clear_bit(que_id, ha->rsp_qid_map); |
763 | mutex_unlock(&ha->vport_lock); | 819 | mutex_unlock(&ha->vport_lock); |