summaryrefslogtreecommitdiff
path: root/drivers/scsi/qla2xxx/qla_os.c
diff options
context:
space:
mode:
authorMadhuranath Iyengar <madhuranath.iyengar@qlogic.com>2010-05-05 02:01:28 +0400
committerJames Bottomley <James.Bottomley@suse.de>2010-05-17 02:21:56 +0400
commit4916392b56921b4aaaeaca3ef492135f42fbb5f2 (patch)
tree6f3a209b1386b74009c197978e677afa04f0d651 /drivers/scsi/qla2xxx/qla_os.c
parentb7d2280c153b33fc60f1a89406d2329137a8b61c (diff)
downloadlinux-4916392b56921b4aaaeaca3ef492135f42fbb5f2.tar.xz
[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)
ctx = sp->ctx;
if (ctx->type == SRB_LOGIN_CMD ||
ctx->type == SRB_LOGOUT_CMD) {
- del_timer_sync(&ctx->timer);
- ctx->free(sp);
+ ctx->u.iocb_cmd->free(sp);
} else {
- struct srb_bsg *sp_bsg =
- (struct srb_bsg *)sp->ctx;
struct fc_bsg_job *bsg_job =
- sp_bsg->bsg_job;
-
+ ctx->u.bsg_job;
if (bsg_job->request->msgcode
== FC_BSG_HST_CT)
kfree(sp->fcport);
bsg_job->req->errors = 0;
bsg_job->reply->result = res;
- bsg_job->job_done(
- sp_bsg->bsg_job);
+ bsg_job->job_done(bsg_job);
kfree(sp->ctx);
mempool_free(sp,
- ha->srb_mempool);
+ ha->srb_mempool);
}
}
}