[openib-general] [PATCH] IB/SRP - increase supported CDB size

Arne Redlich arne.redlich at xiranet.com
Wed Nov 15 03:43:00 PST 2006


This patch sets the Scsi_Host's max_cmd_len from 12 (default) to
16. Otherwise scsi_dispatch_cmd() won't pass down certain commands such
as READ CAPACITY 16, required for supporting disks > 2TB.

Signed-off-by: Arne Redlich <arne.redlich at xiranet.com>

diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index 4b09147..01776c9 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -1716,7 +1716,8 @@ static ssize_t srp_create_target(struct
 	if (!target_host)
 		return -ENOMEM;
 
-	target_host->max_lun = SRP_MAX_LUN;
+	target_host->max_lun     = SRP_MAX_LUN;
+	target_host->max_cmd_len = SRP_MAX_CMD_LEN;
 
 	target = host_to_target(target_host);
 
diff --git a/drivers/infiniband/ulp/srp/ib_srp.h b/drivers/infiniband/ulp/srp/ib_srp.h
index d4e35ef..8503af0 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.h
+++ b/drivers/infiniband/ulp/srp/ib_srp.h
@@ -57,6 +57,7 @@ enum {
 
 	SRP_MAX_LUN		= 512,
 	SRP_DEF_SG_TABLESIZE	= 12,
+	SRP_MAX_CMD_LEN         = 16,
 
 	SRP_RQ_SHIFT    	= 6,
 	SRP_RQ_SIZE		= 1 << SRP_RQ_SHIFT,




More information about the general mailing list