summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc.h
diff options
context:
space:
mode:
authorJames Smart <jsmart2021@gmail.com>2020-03-22 19:12:56 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2020-03-27 04:15:08 +0100
commitc90b448023582200c54595232e7c004c93d52ae1 (patch)
tree3f81d702131a4a101fef12f6e52fc779ede44601 /drivers/scsi/lpfc/lpfc.h
parentscsi: lpfc: Fix lpfc overwrite of sg_cnt field in nvmefc_tgt_fcp_req (diff)
downloadlinux-c90b448023582200c54595232e7c004c93d52ae1.tar.xz
linux-c90b448023582200c54595232e7c004c93d52ae1.zip
scsi: lpfc: Fix scsi host template for SLI3 vports
SCSI layer sends driver IOs with more s/g segments than driver can handle. This results in "Too many sg segments from dma_map_sg. Config 64, seg_cnt 219" error messages from the lpfc_scsi_prep_dma_buf_s3() routine. The was due to use the driver using individual templates for pport and vport, host reset enabled or not, nvme vs scsi, etc. In the end, there was a combination for a vport that didn't match the pport. Rather than enumerating more templates and more discretionary assignments, revert to a base template that is copied to a template specific to the pport/vport. Then, based on role, attributes and sli type, modify the fields that are different for that port. Added a log message to lpfc_create_port to validate values. Link: https://lore.kernel.org/r/20200322181304.37655-5-jsmart2021@gmail.com Signed-off-by: James Smart <jsmart2021@gmail.com> Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc.h')
-rw-r--r--drivers/scsi/lpfc/lpfc.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h
index 357fdec06bae..e940a49f9f02 100644
--- a/drivers/scsi/lpfc/lpfc.h
+++ b/drivers/scsi/lpfc/lpfc.h
@@ -1225,6 +1225,11 @@ struct lpfc_hba {
#define LPFC_POLL_SLOWPATH 1 /* called from slowpath */
char os_host_name[MAXHOSTNAMELEN];
+
+ /* SCSI host template information - for physical port */
+ struct scsi_host_template port_template;
+ /* SCSI host template information - for all vports */
+ struct scsi_host_template vport_template;
};
static inline struct Scsi_Host *