[PATCH] Revert "scsi: core: Cap scsi_host cmd_per_lun at can_queue"

Tim Gardner tim.gardner at canonical.com
Thu Oct 7 12:51:39 UTC 2021

BugLink: https://bugs.launchpad.net/bugs/1940564

This reverts commit e2a706e22f4eb174045a3e915c9b08d8ae65284e.

This patch causes boot failures on instances with large numbers
of CPUs and SCSI LUNs, the product of which overflows a 16 bit
quantity. To date, that combination exists in Azure instance
types Standard_M416s_v2 and Azure Standard_D48_v3.

Signed-off-by: Tim Gardner <tim.gardner at canonical.com>
 drivers/scsi/hosts.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
index 7c736e4ddafe7..119c292cdb8f4 100644
--- a/drivers/scsi/hosts.c
+++ b/drivers/scsi/hosts.c
@@ -219,9 +219,6 @@ int scsi_add_host_with_dma(struct Scsi_Host *shost, struct device *dev,
 		goto fail;
-	shost->cmd_per_lun = min_t(short, shost->cmd_per_lun,
-				   shost->can_queue);
 	error = scsi_init_sense_cache(shost);
 	if (error)
 		goto fail;

More information about the kernel-team mailing list