Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7fb1921b07a83f71a77f806a2a7d2dd721ea641b
Commit:     7fb1921b07a83f71a77f806a2a7d2dd721ea641b
Parent:     b635930de91be0a217292e3fe381af273e5ffaf7
Author:     Mike Christie <[EMAIL PROTECTED]>
AuthorDate: Thu Jan 31 13:36:45 2008 -0600
Committer:  James Bottomley <[EMAIL PROTECTED]>
CommitDate: Thu Feb 7 18:02:35 2008 -0600

    [SCSI] qla4xxx: use iscsi class session state check ready
    
    This has qla4xxx use the iscsi class's check ready function
    in the queue command function, so all iscsi drivers return the
    same error value for common problems.
    
    Signed-off-by: Mike Christie <[EMAIL PROTECTED]>
    Cc: David Somayajulu <[EMAIL PROTECTED]>
    Signed-off-by: James Bottomley <[EMAIL PROTECTED]>
---
 drivers/scsi/qla4xxx/ql4_os.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index a87fb9f..437d169 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -398,9 +398,21 @@ static int qla4xxx_queuecommand(struct scsi_cmnd *cmd,
 {
        struct scsi_qla_host *ha = to_qla_host(cmd->device->host);
        struct ddb_entry *ddb_entry = cmd->device->hostdata;
+       struct iscsi_cls_session *sess = ddb_entry->sess;
        struct srb *srb;
        int rval;
 
+       if (!sess) {
+               cmd->result = DID_IMM_RETRY << 16;
+               goto qc_fail_command;
+       }
+
+       rval = iscsi_session_chkready(sess);
+       if (rval) {
+               cmd->result = rval;
+               goto qc_fail_command;
+       }
+
        if (atomic_read(&ddb_entry->state) != DDB_STATE_ONLINE) {
                if (atomic_read(&ddb_entry->state) == DDB_STATE_DEAD) {
                        cmd->result = DID_NO_CONNECT << 16;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to