Skip to contentSkip to conversation

be2iscsi: Fix for Login failure

PATCH In review Jayamohan Kallickal 2 participants 2 messages Aug 12, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 be2iscsi: Fix for Login failure

The current code in tree has problems with Login.
This patch fixes the Login Failure .

This patch has been made on the latest scsi-misc tree pulled today

---
 drivers/scsi/be2iscsi/be_iscsi.c |    5 ++---
 drivers/scsi/be2iscsi/be_mgmt.c  |    2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)
drivers/scsi/be2iscsi/be_iscsi.c +2 -3
index 7d4d227..7f11f3e 100644
@@ -300,8 +300,7 @@ int beiscsi_get_host_param(struct Scsi_Host *shost,
 			   enum iscsi_host_param param, char *buf)
 {
 	struct beiscsi_hba *phba = (struct beiscsi_hba *)iscsi_host_priv(shost);
-	int len = 0;
-	int status;
+	int status = 0;
 
 	SE_DEBUG(DBG_LVL_8, "In beiscsi_get_host_param, param= %d\n", param);
 	switch (param) {
@@ -315,7 +314,7 @@ int beiscsi_get_host_param(struct Scsi_Host *shost,
 	default:
 		return iscsi_host_get_param(shost, param, buf);
 	}
-	return len;
+	return status;
 }
 
 int beiscsi_get_macaddr(char *buf, struct beiscsi_hba *phba)
drivers/scsi/be2iscsi/be_mgmt.c +1 -1
index 26350e4..877324f 100644
@@ -368,7 +368,7 @@ int mgmt_open_connection(struct beiscsi_hba *phba,
 	memset(req, 0, sizeof(*req));
 	wrb->tag0 |= tag;
 
-	be_wrb_hdr_prepare(wrb, sizeof(*req), true, 1);
+	be_wrb_hdr_prepare(wrb, sizeof(*req), false, 1);
 	be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_ISCSI,
 			   OPCODE_COMMON_ISCSI_TCP_CONNECT_AND_OFFLOAD,
 			   sizeof(*req));
Signature · 1 line
1.6.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 26 lines · Jayamohan Kallickal

The current code in tree has problems with Login.
This patch fixes the Login Failure .

This patch has been made on the latest scsi-misc tree pulled today

---
  drivers/scsi/be2iscsi/be_iscsi.c |    5 ++---
  drivers/scsi/be2iscsi/be_mgmt.c  |    2 +-
  2 files changed, 3 insertions(+), 4 deletions(-)
drivers/scsi/be2iscsi/be_iscsi.c +1 -2
index 7d4d227..7f11f3e 100644
@@ -300,8 +300,7 @@ int beiscsi_get_host_param(struct Scsi_Host *shost,
  			   enum iscsi_host_param param, char *buf)
  {
  	struct beiscsi_hba *phba = (struct beiscsi_hba *)iscsi_host_priv(shost);
-	int len = 0;
-	int status;
+	int status = 0;
 
  	SE_DEBUG(DBG_LVL_8, "In beiscsi_get_host_param, param= %d\n", param);
  	switch (param) {

drivers/scsi/be2iscsi/be_iscsi.c int beiscsi_get_host_param(struct Scsi_Host *shost, · line 317

Quoted 5 lines
drivers/scsi/be2iscsi/be_iscsi.c +1 -1
@@ -315,7 +314,7 @@ int beiscsi_get_host_param(struct Scsi_Host *shost,
  	default:
  		return iscsi_host_get_param(shost, param, buf);
  	}
-	return len;
+	return status;

Can't believe I missed that.