1
0

qla2xxx: Simplify usage of SRB structure in driver

This patch simplifies SRB structure usage in driver.

- Simplify sp->done() and sp->free() interfaces.
- Remove sp->fcport->vha to use vha pointer from sp.
- Use sp->vha context in qla2x00_rel_sp().

Signed-off-by: Joe Carnuccio <joe.carnuccio@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
This commit is contained in:
Joe Carnuccio
2017-01-19 22:28:04 -08:00
committed by Nicholas Bellinger
parent 41dc529a46
commit 25ff6af105
11 changed files with 201 additions and 211 deletions

View File

@@ -433,7 +433,7 @@ struct srb_iocb {
typedef struct srb {
atomic_t ref_count;
struct fc_port *fcport;
void *vha;
struct scsi_qla_host *vha;
uint32_t handle;
uint16_t flags;
uint16_t type;
@@ -447,8 +447,8 @@ typedef struct srb {
struct bsg_job *bsg_job;
struct srb_cmd scmd;
} u;
void (*done)(void *, void *, int);
void (*free)(void *, void *);
void (*done)(void *, int);
void (*free)(void *);
} srb_t;
#define GET_CMD_SP(sp) (sp->u.scmd.cmd)
@@ -3224,6 +3224,7 @@ struct qla_qpair {
struct qla_hw_data *hw;
struct work_struct q_work;
struct list_head qp_list_elem; /* vha->qp_list */
struct scsi_qla_host *vha;
};
/* Place holder for FW buffer parameters */