aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libiscsi.c
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2009-03-05 15:46:04 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-03-13 16:28:55 -0400
commit4d1083509a69a36cc1394f188b7b8956e5526a16 (patch)
tree7afdc7d1e1ae88ee5199d57d3fc8952f985620b7 /drivers/scsi/libiscsi.c
parent32ae763e3fce4192cd008956a340353a2e5c3192 (diff)
[SCSI] iscsi lib: remove qdepth param from iscsi host allocation
The qdepth setting was useful when we needed libiscsi to verify the setting. Now we just need to make sure if older tools passed in zero then we need to set some default. So this patch just has us use the sht->cmd_per_lun or if for LLD does a host per session then we can set it on per host basis. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/libiscsi.c')
-rw-r--r--drivers/scsi/libiscsi.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index ff891543df22..d12f9794fcd0 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -2046,6 +2046,9 @@ int iscsi_host_add(struct Scsi_Host *shost, struct device *pdev)
2046 if (!shost->can_queue) 2046 if (!shost->can_queue)
2047 shost->can_queue = ISCSI_DEF_XMIT_CMDS_MAX; 2047 shost->can_queue = ISCSI_DEF_XMIT_CMDS_MAX;
2048 2048
2049 if (!shost->cmd_per_lun)
2050 shost->cmd_per_lun = ISCSI_DEF_CMD_PER_LUN;
2051
2049 if (!shost->transportt->eh_timed_out) 2052 if (!shost->transportt->eh_timed_out)
2050 shost->transportt->eh_timed_out = iscsi_eh_cmd_timed_out; 2053 shost->transportt->eh_timed_out = iscsi_eh_cmd_timed_out;
2051 return scsi_add_host(shost, pdev); 2054 return scsi_add_host(shost, pdev);
@@ -2056,15 +2059,13 @@ EXPORT_SYMBOL_GPL(iscsi_host_add);
2056 * iscsi_host_alloc - allocate a host and driver data 2059 * iscsi_host_alloc - allocate a host and driver data
2057 * @sht: scsi host template 2060 * @sht: scsi host template
2058 * @dd_data_size: driver host data size 2061 * @dd_data_size: driver host data size
2059 * @qdepth: default device queue depth
2060 * @xmit_can_sleep: bool indicating if LLD will queue IO from a work queue 2062 * @xmit_can_sleep: bool indicating if LLD will queue IO from a work queue
2061 * 2063 *
2062 * This should be called by partial offload and software iscsi drivers. 2064 * This should be called by partial offload and software iscsi drivers.
2063 * To access the driver specific memory use the iscsi_host_priv() macro. 2065 * To access the driver specific memory use the iscsi_host_priv() macro.
2064 */ 2066 */
2065struct Scsi_Host *iscsi_host_alloc(struct scsi_host_template *sht, 2067struct Scsi_Host *iscsi_host_alloc(struct scsi_host_template *sht,
2066 int dd_data_size, uint16_t qdepth, 2068 int dd_data_size, bool xmit_can_sleep)
2067 bool xmit_can_sleep)
2068{ 2069{
2069 struct Scsi_Host *shost; 2070 struct Scsi_Host *shost;
2070 struct iscsi_host *ihost; 2071 struct iscsi_host *ihost;
@@ -2072,10 +2073,6 @@ struct Scsi_Host *iscsi_host_alloc(struct scsi_host_template *sht,
2072 shost = scsi_host_alloc(sht, sizeof(struct iscsi_host) + dd_data_size); 2073 shost = scsi_host_alloc(sht, sizeof(struct iscsi_host) + dd_data_size);
2073 if (!shost) 2074 if (!shost)
2074 return NULL; 2075 return NULL;
2075
2076 if (qdepth == 0)
2077 qdepth = ISCSI_DEF_CMD_PER_LUN;
2078 shost->cmd_per_lun = qdepth;
2079 ihost = shost_priv(shost); 2076 ihost = shost_priv(shost);
2080 2077
2081 if (xmit_can_sleep) { 2078 if (xmit_can_sleep) {