]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[SCSI] qla4xxx: Fix bidirectional CHAP.
authorLalit Chandivade <lalit.chandivade@qlogic.com>
Fri, 7 Oct 2011 23:55:41 +0000 (16:55 -0700)
committerJames Bottomley <JBottomley@Parallels.com>
Sun, 16 Oct 2011 16:08:16 +0000 (11:08 -0500)
Driver was not setting the bidirectional CHAP bit correctly in
the DDB entry.

JIRA Key: UPSISCSI-108

Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/qla4xxx/ql4_def.h
drivers/scsi/qla4xxx/ql4_mbx.c

index d2f7cd64d0669393d5f1cb8f25ab1198aa864af8..a80adfc6d780781948396157cb3b777684edf635 100644 (file)
@@ -351,6 +351,8 @@ struct ipaddress_config {
 
 #define QL4_CHAP_MAX_NAME_LEN 256
 #define QL4_CHAP_MAX_SECRET_LEN 100
+#define LOCAL_CHAP     0
+#define BIDI_CHAP      1
 
 struct ql4_chap_format {
        u8  intr_chap_name[QL4_CHAP_MAX_NAME_LEN];
index de733a77780342e5c4e523d34d6435f5d61c1d12..b60b90301a8b69a63ce7dd0d2892c573d70ceb4d 100644 (file)
@@ -872,7 +872,6 @@ void qla4xxx_get_conn_event_log(struct scsi_qla_host * ha)
        uint32_t        max_event_log_entries;
        uint8_t         i;
 
-
        memset(&mbox_cmd, 0, sizeof(mbox_cmd));
        memset(&mbox_sts, 0, sizeof(mbox_cmd));
 
@@ -1578,7 +1577,8 @@ int qla4xxx_set_param_ddbentry(struct scsi_qla_host *ha,
                        }
 
                        rval = qla4xxx_set_chap(ha, sess->username,
-                                               sess->password, idx, 0);
+                                               sess->password, idx,
+                                               LOCAL_CHAP);
                        if (rval)
                                goto exit_set_param;
 
@@ -1599,7 +1599,8 @@ int qla4xxx_set_param_ddbentry(struct scsi_qla_host *ha,
                                goto exit_set_param;
                        }
                        rval = qla4xxx_set_chap(ha, sess->username_in,
-                                               sess->password_in, idx, 0);
+                                               sess->password_in, idx,
+                                               BIDI_CHAP);
                        if (rval)
                                goto exit_set_param;
                }