qedf: Populate sysfs attributes for vport
Subsystems (2)
PATCH v2 1/1 qedf: Populate sysfs attributes for vport
From: Saurav Kashyap <[email protected]>
Few vport parameters were displayed by systool as 'Unknown' or 'NULL'.
Copy speed, supported_speed, frame_size and update port_type for NPIV port.
Tested-by Guangwu Zhang <[email protected]>
Reviewed-by John Meneghini <[email protected]>
Signed-off-by Saurav Kashyap <[email protected]>
Signed-off-by Nilesh Javali <[email protected]>
---
v1 -> v2:
Add more description, add Tested-by, Reviewed-by, Cc tags.
drivers/scsi/qedf/qedf_main.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
drivers/scsi/qedf/qedf_main.c +21 -0
@@ -1921,6 +1921,27 @@ static int qedf_vport_create(struct fc_vport *vport, bool disabled)fc_vport_setlink (vn_port); } +/* Set symbolic node name */ +if (base_qedf->pdev->device == QL45xxx) +snprintf (fc_host_symbolic_name (vn_port->host),256 , +"Marvell FastLinQ 45xxx FCoE v%s" ,QEDF_VERSION ); + +if (base_qedf->pdev->device == QL41xxx) +snprintf (fc_host_symbolic_name (vn_port->host),256 , +"Marvell FastLinQ 41xxx FCoE v%s" ,QEDF_VERSION ); + +/* Set supported speed */ +fc_host_supported_speeds (vn_port->host) = n_port->link_supported_speeds; + +/* Set speed */ + vn_port->link_speed = n_port->link_speed; + +/* Set port type */ +fc_host_port_type (vn_port->host) =FC_PORTTYPE_NPIV ; + +/* Set maxframe size */ +fc_host_maxframe_size (vn_port->host) = n_port->mfs; +QEDF_INFO (&(base_qedf->dbg_ctx),QEDF_LOG_NPIV ,"vn_port=%p.\n" , vn_port);
Signature · 1 line
2.23.1
Martin K. Petersen
AppliedNilesh,
Quoted 3 lines
Few vport parameters were displayed by systool as 'Unknown' or 'NULL'. Copy speed,
supported_speed,frame_sizeand updateport_typefor NPIV port.
Applied to 6.1/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering