diff options
Diffstat (limited to 'drivers/scsi/libiscsi.c')
-rw-r--r-- | drivers/scsi/libiscsi.c | 11 |
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 | */ |
2065 | struct Scsi_Host *iscsi_host_alloc(struct scsi_host_template *sht, | 2067 | struct 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) { |