Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scsi: lpfc: Enlarge max_sectors in scsi host templates

The driver supports arbitrarily large scatter-gather lists and the current
value for max_sectors is limiting.

Change max_sectors to the largest value. This was actually done prior but
it only corrected one template and that template was later removed.

So change the remaining 2 templates. Other areas which hard-set the sectors
value should be inheriting what is in the template.

Link: https://lore.kernel.org/r/20201020202719.54726-7-james.smart@broadcom.com
Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

James Smart and committed by
Martin K. Petersen
7c30bb62 f5201f87

+3 -6
+1 -4
drivers/scsi/lpfc/lpfc_init.c
··· 4343 4343 /* Seed physical port template */ 4344 4344 memcpy(template, &lpfc_template, sizeof(*template)); 4345 4345 4346 - if (use_no_reset_hba) { 4346 + if (use_no_reset_hba) 4347 4347 /* template is for a no reset SCSI Host */ 4348 - template->max_sectors = 0xffff; 4349 4348 template->eh_host_reset_handler = NULL; 4350 - } 4351 4349 4352 4350 /* Template for all vports this physical port creates */ 4353 4351 memcpy(&phba->vport_template, &lpfc_template, 4354 4352 sizeof(*template)); 4355 - phba->vport_template.max_sectors = 0xffff; 4356 4353 phba->vport_template.shost_attrs = lpfc_vport_attrs; 4357 4354 phba->vport_template.eh_bus_reset_handler = NULL; 4358 4355 phba->vport_template.eh_host_reset_handler = NULL;
+2 -2
drivers/scsi/lpfc/lpfc_scsi.c
··· 6028 6028 .sg_tablesize = 1, 6029 6029 .cmd_per_lun = 1, 6030 6030 .shost_attrs = lpfc_hba_attrs, 6031 - .max_sectors = 0xFFFF, 6031 + .max_sectors = 0xFFFFFFFF, 6032 6032 .vendor_id = LPFC_NL_VENDOR_ID, 6033 6033 .track_queue_depth = 0, 6034 6034 }; ··· 6053 6053 .sg_tablesize = LPFC_DEFAULT_SG_SEG_CNT, 6054 6054 .cmd_per_lun = LPFC_CMD_PER_LUN, 6055 6055 .shost_attrs = lpfc_hba_attrs, 6056 - .max_sectors = 0xFFFF, 6056 + .max_sectors = 0xFFFFFFFF, 6057 6057 .vendor_id = LPFC_NL_VENDOR_ID, 6058 6058 .change_queue_depth = scsi_change_queue_depth, 6059 6059 .track_queue_depth = 1,