scsi: iscsi_tcp: Fix shost can_queue initialization
authorMike Christie <michael.christie@oracle.com>
Sun, 7 Feb 2021 04:46:05 +0000 (22:46 -0600)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 9 Feb 2021 03:39:04 +0000 (22:39 -0500)
commit25c400db2083732a5fbdd72f0d3a0337119b2fa5
tree8b25f6b392368a7621381534d7d757b5a847b3bf
parentb4046922b3c0740ad50a6e9c59e12f4dc43946d4
scsi: iscsi_tcp: Fix shost can_queue initialization

We are setting the shost's can_queue after we add the host which is too
late, because the SCSI midlayer will have allocated the tag set based on
the can_queue value at that time. This patch has us use the
iscsi_host_get_max_scsi_cmds() helper to figure out the number of SCSI
cmds.

It also fixes up the template can_queue so it reflects the max SCSI cmds we
can support like how other drivers work.

Link: https://lore.kernel.org/r/20210207044608.27585-7-michael.christie@oracle.com
Reviewed-by: Lee Duncan <lduncan@suse.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/iscsi_tcp.c