aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_os.c
diff options
context:
space:
mode:
authorMadhuranath Iyengar <madhuranath.iyengar@qlogic.com>2010-05-04 18:01:28 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-05-16 18:21:56 -0400
commit4916392b56921b4aaaeaca3ef492135f42fbb5f2 (patch)
tree6f3a209b1386b74009c197978e677afa04f0d651 /drivers/scsi/qla2xxx/qla_os.c
parentb7d2280c153b33fc60f1a89406d2329137a8b61c (diff)
[SCSI] qla2xxx: Provide common framework for BSG and IOCB commands.
Currently, BSG and IOCB/Logio commands have a different framework (srb structs). The purpose of this effort is to consolidate them into a generalized framework for these as well as other asynchronous operations in the future. Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_os.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 2e083c0d9215..70651f9fa653 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -1191,24 +1191,19 @@ qla2x00_abort_all_cmds(scsi_qla_host_t *vha, int res)
1191 ctx = sp->ctx; 1191 ctx = sp->ctx;
1192 if (ctx->type == SRB_LOGIN_CMD || 1192 if (ctx->type == SRB_LOGIN_CMD ||
1193 ctx->type == SRB_LOGOUT_CMD) { 1193 ctx->type == SRB_LOGOUT_CMD) {
1194 del_timer_sync(&ctx->timer); 1194 ctx->u.iocb_cmd->free(sp);
1195 ctx->free(sp);
1196 } else { 1195 } else {
1197 struct srb_bsg *sp_bsg =
1198 (struct srb_bsg *)sp->ctx;
1199 struct fc_bsg_job *bsg_job = 1196 struct fc_bsg_job *bsg_job =
1200 sp_bsg->bsg_job; 1197 ctx->u.bsg_job;
1201
1202 if (bsg_job->request->msgcode 1198 if (bsg_job->request->msgcode
1203 == FC_BSG_HST_CT) 1199 == FC_BSG_HST_CT)
1204 kfree(sp->fcport); 1200 kfree(sp->fcport);
1205 bsg_job->req->errors = 0; 1201 bsg_job->req->errors = 0;
1206 bsg_job->reply->result = res; 1202 bsg_job->reply->result = res;
1207 bsg_job->job_done( 1203 bsg_job->job_done(bsg_job);
1208 sp_bsg->bsg_job);
1209 kfree(sp->ctx); 1204 kfree(sp->ctx);
1210 mempool_free(sp, 1205 mempool_free(sp,
1211 ha->srb_mempool); 1206 ha->srb_mempool);
1212 } 1207 }
1213 } 1208 }
1214 } 1209 }