aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_os.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_os.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 48c37e38ed0..6bdc7de82c5 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -1130,18 +1130,26 @@ qla2x00_abort_all_cmds(scsi_qla_host_t *vha, int res)
1130 qla2x00_sp_compl(ha, sp); 1130 qla2x00_sp_compl(ha, sp);
1131 } else { 1131 } else {
1132 ctx = sp->ctx; 1132 ctx = sp->ctx;
1133 if (ctx->type == SRB_LOGIN_CMD || ctx->type == SRB_LOGOUT_CMD) { 1133 if (ctx->type == SRB_LOGIN_CMD ||
1134 ctx->type == SRB_LOGOUT_CMD) {
1134 del_timer_sync(&ctx->timer); 1135 del_timer_sync(&ctx->timer);
1135 ctx->free(sp); 1136 ctx->free(sp);
1136 } else { 1137 } else {
1137 struct srb_bsg* sp_bsg = (struct srb_bsg*)sp->ctx; 1138 struct srb_bsg *sp_bsg =
1138 if (sp_bsg->bsg_job->request->msgcode == FC_BSG_HST_CT) 1139 (struct srb_bsg *)sp->ctx;
1140 struct fc_bsg_job *bsg_job =
1141 sp_bsg->bsg_job;
1142
1143 if (bsg_job->request->msgcode
1144 == FC_BSG_HST_CT)
1139 kfree(sp->fcport); 1145 kfree(sp->fcport);
1140 sp_bsg->bsg_job->req->errors = 0; 1146 bsg_job->req->errors = 0;
1141 sp_bsg->bsg_job->reply->result = res; 1147 bsg_job->reply->result = res;
1142 sp_bsg->bsg_job->job_done(sp_bsg->bsg_job); 1148 bsg_job->job_done(
1149 sp_bsg->bsg_job);
1143 kfree(sp->ctx); 1150 kfree(sp->ctx);
1144 mempool_free(sp, ha->srb_mempool); 1151 mempool_free(sp,
1152 ha->srb_mempool);
1145 } 1153 }
1146 } 1154 }
1147 } 1155 }