Skip to contentSkip to conversation

iscsi changes for scsi-misc

PATCH New [email protected] 1 participant 5 messages Apr 10, 2010

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

PATCH 1/4 iscsi_tcp: change & to &&

From: Dan Carpenter <[email protected]>

This change is basically a clean up.

datadgst_en is an int which comes from the user. I didn't see anything limiting it to 1 and 0 although obviously that's what it's supposed to be. If the user passed in 2 this test would fail.

This same if condition is repeated in another function and it uses && there.

---
 drivers/scsi/libiscsi_tcp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/scsi/libiscsi_tcp.c +1 -1
index 5c92620..8eeb39f 100644
@@ -421,7 +421,7 @@ iscsi_tcp_data_recv_prep(struct iscsi_tcp_conn *tcp_conn)
 	struct iscsi_conn *conn = tcp_conn->iscsi_conn;
 	struct hash_desc *rx_hash = NULL;
 
-	if (conn->datadgst_en &
+	if (conn->datadgst_en &&
 	    !(conn->session->tt->caps & CAP_DIGEST_OFFLOAD))
 		rx_hash = tcp_conn->rx_hash;
 
Signature · 1 line
1.6.6.1
#2 lore raw

PATCH 2/4 scsi_dh_emc: request flag cleanup

From: Mike Christie <[email protected]>

blk_get_request sets the cmd_flags, so we should not and do not need to set them. If we did set them to a different value then it can cause a oops in the elevator code.

---
 drivers/scsi/device_handler/scsi_dh_emc.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
drivers/scsi/device_handler/scsi_dh_emc.c +0 -2
index e8a0bc3..6faf472 100644
@@ -285,13 +285,11 @@ static struct request *get_req(struct scsi_device *sdev, int cmd,
 	switch (cmd) {
 	case MODE_SELECT:
 		len = sizeof(short_trespass);
-		rq->cmd_flags |= REQ_RW;
 		rq->cmd[1] = 0x10;
 		rq->cmd[4] = len;
 		break;
 	case MODE_SELECT_10:
 		len = sizeof(long_trespass);
-		rq->cmd_flags |= REQ_RW;
 		rq->cmd[1] = 0x10;
 		rq->cmd[8] = len;
 		break;
Signature · 1 line
1.6.6.1
#3 lore raw

PATCH 3/4 iscsi_tcp: Change iscsi_sw_tcp_conn_restore_callbacks arguments

From: Avi Kaplan <[email protected]>

This patch changes the arguments to iscsi_sw_tcp_conn_restore_callbacks, so that it works like the function to set the callbacks and because in upcoming patches we need a iscsi_conn.

---
 drivers/scsi/iscsi_tcp.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
drivers/scsi/iscsi_tcp.c +4 -2
index 0ee725c..d0bb1f9 100644
@@ -206,8 +206,10 @@ static void iscsi_sw_tcp_conn_set_callbacks(struct iscsi_conn *conn)
 }
 
 static void
-iscsi_sw_tcp_conn_restore_callbacks(struct iscsi_sw_tcp_conn *tcp_sw_conn)
+iscsi_sw_tcp_conn_restore_callbacks(struct iscsi_conn *conn)
 {
+	struct iscsi_tcp_conn *tcp_conn = conn->dd_data;
+	struct iscsi_sw_tcp_conn *tcp_sw_conn = tcp_conn->dd_data;
 	struct sock *sk = tcp_sw_conn->sock->sk;
 
 	/* restore socket callbacks, see also: iscsi_conn_set_callbacks() */
@@ -555,7 +557,7 @@ static void iscsi_sw_tcp_release_conn(struct iscsi_conn *conn)
 		return;
 
 	sock_hold(sock->sk);
-	iscsi_sw_tcp_conn_restore_callbacks(tcp_sw_conn);
+	iscsi_sw_tcp_conn_restore_callbacks(conn);
 	sock_put(sock->sk);
 
 	spin_lock_bh(&session->lock);
Signature · 1 line
1.6.6.1
#4 lore raw

PATCH 4/4 iscsi_tcp: Remove unused field iscsi_conn from struct iscsi_sw_tcp_conn

From: Avi Kaplan <[email protected]>

iscsi_conn is not used so remove it from iscsi_sw_tcp_conn.

---
 drivers/scsi/iscsi_tcp.h |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
drivers/scsi/iscsi_tcp.h +0 -1
index ca6b7bc..94644ba 100644
@@ -36,7 +36,6 @@ struct iscsi_sw_tcp_send {
 };
 
 struct iscsi_sw_tcp_conn {
-	struct iscsi_conn	*iscsi_conn;
 	struct socket		*sock;
 
 	struct iscsi_sw_tcp_send out;
Signature · 1 line
1.6.6.1