]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[SCSI] iscsi tcp: bidi capable
authorPete Wyckoff <pw@padd.com>
Thu, 5 Mar 2009 20:45:56 +0000 (14:45 -0600)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Fri, 13 Mar 2009 20:26:21 +0000 (15:26 -0500)
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 <pw@padd.com>
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/iscsi_tcp.c

index 23808dfe22ba43da866a37e033b1b7fdd42badab..5a08ca48fb3aff87f5179ee7fa3ecd155bad1958 100644 (file)
@@ -813,6 +813,12 @@ static void iscsi_sw_tcp_session_destroy(struct iscsi_cls_session *cls_session)
        iscsi_host_free(shost);
 }
 
+static int iscsi_sw_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);
@@ -833,6 +839,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_sw_tcp_slave_alloc,
        .slave_configure        = iscsi_sw_tcp_slave_configure,
        .proc_name              = "iscsi_tcp",
        .this_id                = -1,