diff options
author | Madhuranath Iyengar <madhuranath.iyengar@qlogic.com> | 2010-05-04 15:01:28 -0700 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-05-16 18:21:56 -0400 |
commit | 4916392b56921b4aaaeaca3ef492135f42fbb5f2 (patch) | |
tree | 6f3a209b1386b74009c197978e677afa04f0d651 /drivers/scsi/qla2xxx/qla_def.h | |
parent | b7d2280c153b33fc60f1a89406d2329137a8b61c (diff) | |
download | kernel_goldelico_gta04-4916392b56921b4aaaeaca3ef492135f42fbb5f2.zip kernel_goldelico_gta04-4916392b56921b4aaaeaca3ef492135f42fbb5f2.tar.gz kernel_goldelico_gta04-4916392b56921b4aaaeaca3ef492135f42fbb5f2.tar.bz2 |
[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_def.h')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_def.h | 48 |
1 files changed, 23 insertions, 25 deletions
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index a491338..08f5fd5 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h @@ -214,16 +214,16 @@ typedef struct srb { /* * SRB extensions. */ -#define SRB_LOGIN_CMD 1 -#define SRB_LOGOUT_CMD 2 -#define SRB_ELS_CMD_RPT 3 -#define SRB_ELS_CMD_HST 4 -#define SRB_CT_CMD 5 -#define SRB_ADISC_CMD 6 - -struct srb_ctx { - uint16_t type; - char *name; +struct srb_iocb { + union { + struct { + uint16_t flags; +#define SRB_LOGIN_RETRIED BIT_0 +#define SRB_LOGIN_COND_PLOGI BIT_1 +#define SRB_LOGIN_SKIP_PRLI BIT_2 + uint16_t data[2]; + } logio; + } u; struct timer_list timer; @@ -232,23 +232,21 @@ struct srb_ctx { void (*timeout)(srb_t *); }; -struct srb_logio { - struct srb_ctx ctx; - -#define SRB_LOGIN_RETRIED BIT_0 -#define SRB_LOGIN_COND_PLOGI BIT_1 -#define SRB_LOGIN_SKIP_PRLI BIT_2 - uint16_t flags; - uint16_t data[2]; -}; +/* Values for srb_ctx type */ +#define SRB_LOGIN_CMD 1 +#define SRB_LOGOUT_CMD 2 +#define SRB_ELS_CMD_RPT 3 +#define SRB_ELS_CMD_HST 4 +#define SRB_CT_CMD 5 +#define SRB_ADISC_CMD 6 -struct srb_bsg_ctx { +struct srb_ctx { uint16_t type; -}; - -struct srb_bsg { - struct srb_bsg_ctx ctx; - struct fc_bsg_job *bsg_job; + char *name; + union { + struct srb_iocb *iocb_cmd; + struct fc_bsg_job *bsg_job; + } u; }; struct msg_echo_lb { |