aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/iscsi_tcp.c
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2007-05-30 13:57:19 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-06-02 15:34:46 -0400
commit1548271ece9e9312fd5feb41fd58773b56a71d39 (patch)
tree89f990788a619a52c3ba4ecbf5f2a596c5711d04 /drivers/scsi/iscsi_tcp.c
parent77a23c21aaa723f6b0ffc4a701be8c8e5a32346d (diff)
[SCSI] libiscsi: make can_queue configurable
This patch allows us to set can_queue and cmds_per_lun from userspace when we create the session/host. From there we can set it on a per target basis. The patch fully converts iscsi_tcp, but only hooks up ib_iser for cmd_per_lun since it currently has a lots of preallocations based on can_queue. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Cc: Roland Dreier <rdreier@cisco.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/iscsi_tcp.c')
-rw-r--r--drivers/scsi/iscsi_tcp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c
index 8edcfddc0baf..eca4d611dd49 100644
--- a/drivers/scsi/iscsi_tcp.c
+++ b/drivers/scsi/iscsi_tcp.c
@@ -2114,6 +2114,7 @@ iscsi_conn_get_stats(struct iscsi_cls_conn *cls_conn, struct iscsi_stats *stats)
2114static struct iscsi_cls_session * 2114static struct iscsi_cls_session *
2115iscsi_tcp_session_create(struct iscsi_transport *iscsit, 2115iscsi_tcp_session_create(struct iscsi_transport *iscsit,
2116 struct scsi_transport_template *scsit, 2116 struct scsi_transport_template *scsit,
2117 uint16_t cmds_max, uint16_t qdepth,
2117 uint32_t initial_cmdsn, uint32_t *hostno) 2118 uint32_t initial_cmdsn, uint32_t *hostno)
2118{ 2119{
2119 struct iscsi_cls_session *cls_session; 2120 struct iscsi_cls_session *cls_session;
@@ -2121,7 +2122,7 @@ iscsi_tcp_session_create(struct iscsi_transport *iscsit,
2121 uint32_t hn; 2122 uint32_t hn;
2122 int cmd_i; 2123 int cmd_i;
2123 2124
2124 cls_session = iscsi_session_setup(iscsit, scsit, 2125 cls_session = iscsi_session_setup(iscsit, scsit, cmds_max, qdepth,
2125 sizeof(struct iscsi_tcp_cmd_task), 2126 sizeof(struct iscsi_tcp_cmd_task),
2126 sizeof(struct iscsi_tcp_mgmt_task), 2127 sizeof(struct iscsi_tcp_mgmt_task),
2127 initial_cmdsn, &hn); 2128 initial_cmdsn, &hn);
@@ -2164,7 +2165,7 @@ static struct scsi_host_template iscsi_sht = {
2164 .name = "iSCSI Initiator over TCP/IP", 2165 .name = "iSCSI Initiator over TCP/IP",
2165 .queuecommand = iscsi_queuecommand, 2166 .queuecommand = iscsi_queuecommand,
2166 .change_queue_depth = iscsi_change_queue_depth, 2167 .change_queue_depth = iscsi_change_queue_depth,
2167 .can_queue = ISCSI_XMIT_CMDS_MAX - 1, 2168 .can_queue = ISCSI_DEF_XMIT_CMDS_MAX - 1,
2168 .sg_tablesize = ISCSI_SG_TABLESIZE, 2169 .sg_tablesize = ISCSI_SG_TABLESIZE,
2169 .max_sectors = 0xFFFF, 2170 .max_sectors = 0xFFFF,
2170 .cmd_per_lun = ISCSI_DEF_CMD_PER_LUN, 2171 .cmd_per_lun = ISCSI_DEF_CMD_PER_LUN,