public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Nilesh Javali <njavali@marvell.com>
To: <martin.petersen@oracle.com>
Cc: <linux-scsi@vger.kernel.org>,
	<GR-QLogic-Storage-Upstream@marvell.com>,
	<agurumurthy@marvell.com>, <sdeodhar@marvell.com>,
	<emilne@redhat.com>, <jmeneghi@redhat.com>
Subject: [PATCH v2 02/12] qla2xxx: Add support for 64G SFP speed
Date: Thu, 4 Dec 2025 20:47:41 +0530	[thread overview]
Message-ID: <20251204151751.2321801-3-njavali@marvell.com> (raw)
In-Reply-To: <20251204151751.2321801-1-njavali@marvell.com>

From: Manish Rangankar <mrangankar@marvell.com>

Incorrect speed info is shown in driver logs for 64G SFP.
Add support for 64G SFP speed as per SFF-8472 specification.

Signed-off-by: Manish Rangankar <mrangankar@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Reviewed-by: Himanshu Madhani <hmadhani2024@gmail.com>
---
 drivers/scsi/qla2xxx/qla_def.h  | 6 ++++--
 drivers/scsi/qla2xxx/qla_init.c | 4 +++-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index cb95b7b12051..34c6e3f06a5b 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -5369,7 +5369,7 @@ struct edif_sa_index_entry {
 	struct list_head next;
 };
 
-/* Refer to SNIA SFF 8247 */
+/* Refer to SNIA SFF 8472 */
 struct sff_8247_a0 {
 	u8 txid;	/* transceiver id */
 	u8 ext_txid;
@@ -5413,6 +5413,7 @@ struct sff_8247_a0 {
 #define FC_SP_32 BIT_3
 #define FC_SP_2  BIT_2
 #define FC_SP_1  BIT_0
+#define FC_SPEED_2	BIT_1
 	u8 fc_sp_cc10;
 	u8 encode;
 	u8 bitrate;
@@ -5431,7 +5432,8 @@ struct sff_8247_a0 {
 	u8 vendor_pn[SFF_PART_NAME_LEN];	/* part number */
 	u8 vendor_rev[4];
 	u8 wavelength[2];
-	u8 resv;
+#define FC_SP_64	BIT_0
+	u8 fiber_channel_speed2;
 	u8 cc_base;
 	u8 options[2];	/* offset 64 */
 	u8 br_max;
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 66eeee84be05..b83029b55a05 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -4075,9 +4075,11 @@ static void qla2xxx_print_sfp_info(struct scsi_qla_host *vha)
 	int leftover, len;
 
 	ql_dbg(ql_dbg_init, vha, 0x015a,
-	    "SFP: %.*s -> %.*s ->%s%s%s%s%s%s\n",
+	    "SFP: %.*s -> %.*s ->%s%s%s%s%s%s%s\n",
 	    (int)sizeof(a0->vendor_name), a0->vendor_name,
 	    (int)sizeof(a0->vendor_pn), a0->vendor_pn,
+	    a0->fc_sp_cc10 & FC_SP_2 ? a0->fiber_channel_speed2  &  FC_SP_64 ?
+					" 64G" : "" : "",
 	    a0->fc_sp_cc10 & FC_SP_32 ? " 32G" : "",
 	    a0->fc_sp_cc10 & FC_SP_16 ? " 16G" : "",
 	    a0->fc_sp_cc10 & FC_SP_8  ?  " 8G" : "",
-- 
2.23.1


  parent reply	other threads:[~2025-12-04 15:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-04 15:17 [PATCH v2 00/12] qla2xxx: Misc feature and bug fixes Nilesh Javali
2025-12-04 15:17 ` [PATCH v2 01/12] qla2xxx: Add Speed in SFP print information Nilesh Javali
2025-12-04 15:17 ` Nilesh Javali [this message]
2025-12-04 15:17 ` [PATCH v2 03/12] qla2xxx: Add load flash firmware mailbox support for 28xxx Nilesh Javali
2025-12-04 15:17 ` [PATCH v2 04/12] qla2xxx: Validate MCU signature before executing MBC 03h Nilesh Javali
2025-12-04 15:17 ` [PATCH v2 05/12] qla2xxx: Add bsg interface to support firmware img validation Nilesh Javali
2025-12-04 15:17 ` [PATCH v2 06/12] qla2xxx: Allow recovery for tape devices Nilesh Javali
2025-12-04 15:17 ` [PATCH v2 07/12] qla2xxx: Delay module unload while fabric scan in progress Nilesh Javali
2025-12-09  8:14   ` Dan Carpenter
2025-12-04 15:17 ` [PATCH v2 08/12] qla2xxx: free sp in error path to fix system crash Nilesh Javali
2025-12-04 15:17 ` [PATCH v2 09/12] qla2xxx: validate sp before freeing associated memory Nilesh Javali
2025-12-04 15:17 ` [PATCH v2 10/12] qla2xxx: Query FW again before proceeding with login Nilesh Javali
2025-12-04 15:17 ` [PATCH v2 11/12] qla2xxx: fix bsg_done causing double free Nilesh Javali
2025-12-04 15:17 ` [PATCH v2 12/12] qla2xxx: Update version to 10.02.10.100-k Nilesh Javali

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251204151751.2321801-3-njavali@marvell.com \
    --to=njavali@marvell.com \
    --cc=GR-QLogic-Storage-Upstream@marvell.com \
    --cc=agurumurthy@marvell.com \
    --cc=emilne@redhat.com \
    --cc=jmeneghi@redhat.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=sdeodhar@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox