Thread (500 messages) 500 messages, 17 authors, 2025-11-07
STALE259d

[PATCH AUTOSEL 6.17-6.1] scsi: mpt3sas: Add support for 22.5 Gbps SAS link rate

From: Sasha Levin <sashal@kernel.org>
Date: 2025-10-25 16:27:37
Also in: linux-patches, linux-scsi
Subsystem: lsilogic mpt fusion drivers (fc/sas/spi), scsi subsystem, the rest · Maintainers: Sathya Prakash, Sreekanth Reddy, Suganath Prabu Subramani, Ranjan Kumar, "James E.J. Bottomley", "Martin K. Petersen", Linus Torvalds

From: Ranjan Kumar <ranjan.kumar@broadcom.com>

[ Upstream commit 4be7599d6b27bade41bfccca42901b917c01c30c ]

Add handling for MPI26_SAS_NEG_LINK_RATE_22_5 in
_transport_convert_phy_link_rate(). This maps the new 22.5 Gbps
negotiated rate to SAS_LINK_RATE_22_5_GBPS, to get correct PHY link
speeds.

Signed-off-by: Ranjan Kumar <ranjan.kumar@broadcom.com>
Message-Id: [off-list ref]
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---

LLM Generated explanations, may be completely bogus:

YES
- Adding the `MPI26_SAS_NEG_LINK_RATE_22_5` case in
  `_transport_convert_phy_link_rate()` maps firmware’s new 22.5 Gbps
  negotiation code to the existing transport-layer enum
  (`SAS_LINK_RATE_22_5_GBPS`), ensuring the driver reports the correct
  speed instead of falling into the “unknown” default path
  (`drivers/scsi/mpt3sas/mpt3sas_transport.c:169`,
  `drivers/scsi/mpt3sas/mpt3sas_transport.c:188`).
- The converted value feeds directly into each SAS phy’s
  `negotiated_linkrate` field when links are refreshed
  (`drivers/scsi/mpt3sas/mpt3sas_transport.c:1160`), which backs sysfs
  reporting and link-management heuristics; without the mapping,
  hardware running at 22.5 Gbps is exposed as “unknown”, degrading
  diagnostics and any policy that depends on link speed.
- All constants used here have been present in stables for years (e.g.,
  `MPI26_SAS_NEG_LINK_RATE_22_5` in
  `drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h:2067`, `SAS_LINK_RATE_22_5_GBPS`
  in `include/scsi/scsi_transport_sas.h:44`), so the change is self-
  contained, matches what the newer mpi3mr driver already does for the
  same rate, and carries negligible regression risk.

 drivers/scsi/mpt3sas/mpt3sas_transport.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/drivers/scsi/mpt3sas/mpt3sas_transport.c b/drivers/scsi/mpt3sas/mpt3sas_transport.c
index 66fd301f03b0d..f3400d01cc2ae 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_transport.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_transport.c
@@ -166,6 +166,9 @@ _transport_convert_phy_link_rate(u8 link_rate)
 	case MPI25_SAS_NEG_LINK_RATE_12_0:
 		rc = SAS_LINK_RATE_12_0_GBPS;
 		break;
+	case MPI26_SAS_NEG_LINK_RATE_22_5:
+		rc = SAS_LINK_RATE_22_5_GBPS;
+		break;
 	case MPI2_SAS_NEG_LINK_RATE_PHY_DISABLED:
 		rc = SAS_PHY_DISABLED;
 		break;
-- 
2.51.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help