* [PATCH v2] qedf: Populate sysfs attributes for vport
@ 2022-09-19 13:44 Nilesh Javali
2022-09-25 17:17 ` Martin K. Petersen
0 siblings, 1 reply; 2+ messages in thread
From: Nilesh Javali @ 2022-09-19 13:44 UTC (permalink / raw)
To: martin.petersen
Cc: linux-scsi, jmeneghi, guazhang, GR-QLogic-Storage-Upstream
From: Saurav Kashyap <skashyap@marvell.com>
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 <guazhang@redhat.com>
Reviewed-by: John Meneghini <jmeneghi@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
---
v1 -> v2:
Add more description, add Tested-by, Reviewed-by, Cc tags.
drivers/scsi/qedf/qedf_main.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c
index 3d6b137314f3..cc6d9decf62c 100644
--- a/drivers/scsi/qedf/qedf_main.c
+++ b/drivers/scsi/qedf/qedf_main.c
@@ -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);
--
2.23.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] qedf: Populate sysfs attributes for vport
2022-09-19 13:44 [PATCH v2] qedf: Populate sysfs attributes for vport Nilesh Javali
@ 2022-09-25 17:17 ` Martin K. Petersen
0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2022-09-25 17:17 UTC (permalink / raw)
To: Nilesh Javali
Cc: martin.petersen, linux-scsi, jmeneghi, guazhang,
GR-QLogic-Storage-Upstream
Nilesh,
> Few vport parameters were displayed by systool as 'Unknown' or 'NULL'.
> Copy speed, supported_speed, frame_size and update port_type for NPIV
> port.
Applied to 6.1/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-09-25 17:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-19 13:44 [PATCH v2] qedf: Populate sysfs attributes for vport Nilesh Javali
2022-09-25 17:17 ` Martin K. Petersen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.