Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 15622
b: refs/heads/master
c: 9e3961b
h: refs/heads/master
v: v3
  • Loading branch information
Mike Christie authored and James Bottomley committed Dec 14, 2005
1 parent 4c4f4f6 commit dd52154
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f6cfba1d21e9e4afd80e2274aa4df3dc1bd0aab7
refs/heads/master: 9e3961ba2be51a88c6223143568c80e0616d93ce
20 changes: 15 additions & 5 deletions trunk/drivers/scsi/iscsi_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2401,6 +2401,15 @@ iscsi_queuecommand(struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *))
return 0;
}

static int
iscsi_change_queue_depth(struct scsi_device *sdev, int depth)
{
if (depth > ISCSI_MAX_CMD_PER_LUN)
depth = ISCSI_MAX_CMD_PER_LUN;
scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), depth);
return sdev->queue_depth;
}

static int
iscsi_pool_init(struct iscsi_queue *q, int max, void ***items, int item_size)
{
Expand Down Expand Up @@ -3260,13 +3269,14 @@ iscsi_r2tpool_free(struct iscsi_session *session)
static struct scsi_host_template iscsi_sht = {
.name = "iSCSI Initiator over TCP/IP, v."
ISCSI_VERSION_STR,
.queuecommand = iscsi_queuecommand,
.queuecommand = iscsi_queuecommand,
.change_queue_depth = iscsi_change_queue_depth,
.can_queue = ISCSI_XMIT_CMDS_MAX - 1,
.sg_tablesize = ISCSI_SG_TABLESIZE,
.cmd_per_lun = ISCSI_CMD_PER_LUN,
.eh_abort_handler = iscsi_eh_abort,
.eh_host_reset_handler = iscsi_eh_host_reset,
.use_clustering = DISABLE_CLUSTERING,
.cmd_per_lun = ISCSI_DEF_CMD_PER_LUN,
.eh_abort_handler = iscsi_eh_abort,
.eh_host_reset_handler = iscsi_eh_host_reset,
.use_clustering = DISABLE_CLUSTERING,
.proc_name = "iscsi_tcp",
.this_id = -1,
};
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/scsi/iscsi_tcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@
#define ISCSI_MGMT_CMDS_MAX 32 /* must be power of 2 */
#define ISCSI_MGMT_ITT_OFFSET 0xa00
#define ISCSI_SG_TABLESIZE SG_ALL
#define ISCSI_CMD_PER_LUN 128
#define ISCSI_DEF_CMD_PER_LUN 32
#define ISCSI_MAX_CMD_PER_LUN 128
#define ISCSI_TCP_MAX_CMD_LEN 16

#define ITT_MASK (0xfff)
Expand Down

0 comments on commit dd52154

Please sign in to comment.