diff options
author | Madhuranath Iyengar <madhuranath.iyengar@qlogic.com> | 2010-05-05 00:01:28 +0200 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-05-17 00:21:56 +0200 |
commit | 4916392b56921b4aaaeaca3ef492135f42fbb5f2 (patch) | |
tree | 6f3a209b1386b74009c197978e677afa04f0d651 /drivers/scsi/qla2xxx/qla_def.h | |
parent | [SCSI] qla2xxx: Cleanup FCP-command-status processing debug statements. (diff) | |
download | linux-4916392b56921b4aaaeaca3ef492135f42fbb5f2.tar.xz linux-4916392b56921b4aaaeaca3ef492135f42fbb5f2.zip |
[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 a491338e1bfe..08f5fd5359dd 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 { |