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

scsi: qedf: Populate sysfs attributes for vport

Few vport parameters were displayed by systool as 'Unknown' or 'NULL'.
Copy speed, supported_speed, frame_size and update port_type for NPIV port.

Link: https://lore.kernel.org/r/20220919134434.3513-1-njavali@marvell.com
Cc: stable@vger.kernel.org
Tested-by: Guangwu Zhang <guazhang@redhat.com>
Reviewed-by: John Meneghini <jmeneghi@redhat.com>
Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Saurav Kashyap and committed by
Martin K. Petersen
592642e6 fd2f0452

+21
+21
drivers/scsi/qedf/qedf_main.c
··· 1921 1921 fc_vport_setlink(vn_port); 1922 1922 } 1923 1923 1924 + /* Set symbolic node name */ 1925 + if (base_qedf->pdev->device == QL45xxx) 1926 + snprintf(fc_host_symbolic_name(vn_port->host), 256, 1927 + "Marvell FastLinQ 45xxx FCoE v%s", QEDF_VERSION); 1928 + 1929 + if (base_qedf->pdev->device == QL41xxx) 1930 + snprintf(fc_host_symbolic_name(vn_port->host), 256, 1931 + "Marvell FastLinQ 41xxx FCoE v%s", QEDF_VERSION); 1932 + 1933 + /* Set supported speed */ 1934 + fc_host_supported_speeds(vn_port->host) = n_port->link_supported_speeds; 1935 + 1936 + /* Set speed */ 1937 + vn_port->link_speed = n_port->link_speed; 1938 + 1939 + /* Set port type */ 1940 + fc_host_port_type(vn_port->host) = FC_PORTTYPE_NPIV; 1941 + 1942 + /* Set maxframe size */ 1943 + fc_host_maxframe_size(vn_port->host) = n_port->mfs; 1944 + 1924 1945 QEDF_INFO(&(base_qedf->dbg_ctx), QEDF_LOG_NPIV, "vn_port=%p.\n", 1925 1946 vn_port); 1926 1947