From: Pete Wyckoff <p...@padd.com>

Mark iscsi_tcp as being capable of bidirectional transfers.  The
bsg interface checks this bit before attempting any bidirectional
commands.

Signed-off-by: Pete Wyckoff <p...@padd.com>
Signed-off-by: Boaz Harrosh <bharr...@panasas.com>
---
 drivers/scsi/iscsi_tcp.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c
index af092a8..9e2d4fb 100644
--- a/drivers/scsi/iscsi_tcp.c
+++ b/drivers/scsi/iscsi_tcp.c
@@ -806,6 +806,12 @@ static void iscsi_sw_tcp_session_destroy(struct 
iscsi_cls_session *cls_session)
        iscsi_host_free(shost);
 }
 
+static int iscsi_tcp_slave_alloc(struct scsi_device *sdev)
+{
+       set_bit(QUEUE_FLAG_BIDI, &sdev->request_queue->queue_flags);
+       return 0;
+}
+
 static int iscsi_sw_tcp_slave_configure(struct scsi_device *sdev)
 {
        blk_queue_bounce_limit(sdev->request_queue, BLK_BOUNCE_ANY);
@@ -826,6 +832,7 @@ static struct scsi_host_template iscsi_sw_tcp_sht = {
        .eh_device_reset_handler= iscsi_eh_device_reset,
        .eh_target_reset_handler= iscsi_eh_target_reset,
        .use_clustering         = DISABLE_CLUSTERING,
+       .slave_alloc            = iscsi_tcp_slave_alloc,
        .slave_configure        = iscsi_sw_tcp_slave_configure,
        .proc_name              = "iscsi_tcp",
        .this_id                = -1,
-- 
1.6.0.1


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~----------~----~----~----~------~----~------~--~---

Reply via email to