diff options
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_mid.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mid.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_mid.c b/drivers/scsi/qla2xxx/qla_mid.c index 20fd974f903a..95cb6e78bbcd 100644 --- a/drivers/scsi/qla2xxx/qla_mid.c +++ b/drivers/scsi/qla2xxx/qla_mid.c | |||
@@ -523,6 +523,7 @@ qla25xx_free_req_que(struct scsi_qla_host *vha, struct req_que *req) | |||
523 | clear_bit(que_id, ha->req_qid_map); | 523 | clear_bit(que_id, ha->req_qid_map); |
524 | mutex_unlock(&ha->vport_lock); | 524 | mutex_unlock(&ha->vport_lock); |
525 | } | 525 | } |
526 | kfree(req->outstanding_cmds); | ||
526 | kfree(req); | 527 | kfree(req); |
527 | req = NULL; | 528 | req = NULL; |
528 | } | 529 | } |
@@ -649,6 +650,10 @@ qla25xx_create_req_que(struct qla_hw_data *ha, uint16_t options, | |||
649 | goto que_failed; | 650 | goto que_failed; |
650 | } | 651 | } |
651 | 652 | ||
653 | ret = qla2x00_alloc_outstanding_cmds(ha, req); | ||
654 | if (ret != QLA_SUCCESS) | ||
655 | goto que_failed; | ||
656 | |||
652 | mutex_lock(&ha->vport_lock); | 657 | mutex_lock(&ha->vport_lock); |
653 | que_id = find_first_zero_bit(ha->req_qid_map, ha->max_req_queues); | 658 | que_id = find_first_zero_bit(ha->req_qid_map, ha->max_req_queues); |
654 | if (que_id >= ha->max_req_queues) { | 659 | if (que_id >= ha->max_req_queues) { |
@@ -685,7 +690,7 @@ qla25xx_create_req_que(struct qla_hw_data *ha, uint16_t options, | |||
685 | "options=0x%x.\n", req->options); | 690 | "options=0x%x.\n", req->options); |
686 | ql_dbg(ql_dbg_init, base_vha, 0x00dd, | 691 | ql_dbg(ql_dbg_init, base_vha, 0x00dd, |
687 | "options=0x%x.\n", req->options); | 692 | "options=0x%x.\n", req->options); |
688 | for (cnt = 1; cnt < MAX_OUTSTANDING_COMMANDS; cnt++) | 693 | for (cnt = 1; cnt < req->num_outstanding_cmds; cnt++) |
689 | req->outstanding_cmds[cnt] = NULL; | 694 | req->outstanding_cmds[cnt] = NULL; |
690 | req->current_outstanding_cmd = 1; | 695 | req->current_outstanding_cmd = 1; |
691 | 696 | ||