[SCSI] qla2xxx: Generalize srb structure usage.
authorAndrew Vasquez <andrew.vasquez@qlogic.com>
Thu, 20 Aug 2009 18:06:04 +0000 (11:06 -0700)
committerJames Bottomley <James.Bottomley@suse.de>
Sat, 5 Sep 2009 14:41:55 +0000 (09:41 -0500)
Lay groundwork for adding alternative asynchronous operations by
generalize and extending the SRB structure.  This allows for
follow-on patches to add support for:

- Asynchronous logins.
- ELS/CT passthru requests.
- Loopback requests.
- Non-blocking mailbox commands (ABTS, Task Management, etc).

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/qla2xxx/qla_def.h
drivers/scsi/qla2xxx/qla_iocb.c
drivers/scsi/qla2xxx/qla_os.c

index 68ab28c..9eb7be6 100644 (file)
@@ -189,6 +189,7 @@ struct req_que;
  */
 typedef struct srb {
        struct fc_port *fcport;
+       uint32_t handle;
 
        struct scsi_cmnd *cmd;          /* Linux SCSI command pkt */
 
@@ -196,6 +197,8 @@ typedef struct srb {
 
        uint32_t request_sense_length;
        uint8_t *request_sense_ptr;
+
+       void *ctx;
 } srb_t;
 
 /*
index c0ba370..d37554e 100644 (file)
@@ -350,6 +350,7 @@ qla2x00_start_scsi(srb_t *sp)
        /* Build command packet */
        req->current_outstanding_cmd = handle;
        req->outstanding_cmds[handle] = sp;
+       sp->handle = handle;
        sp->cmd->host_scribble = (unsigned char *)(unsigned long)handle;
        req->cnt -= req_cnt;
 
@@ -778,6 +779,7 @@ qla24xx_start_scsi(srb_t *sp)
        /* Build command packet. */
        req->current_outstanding_cmd = handle;
        req->outstanding_cmds[handle] = sp;
+       sp->handle = handle;
        sp->cmd->host_scribble = (unsigned char *)(unsigned long)handle;
        req->cnt -= req_cnt;
 
Simple merge