From 643ecdf115f785260ee16636df881dc1294d57dc Mon Sep 17 00:00:00 2001 From: Gleb Chesnokov Date: Mon, 19 Oct 2026 15:10:51 +0300 Subject: [PATCH] scst/include/backport.h: Define the 128 Gbit FC speed for older kernels The imported QLA29xx speed reporting uses FC_PORTSPEED_128GBIT. Supply its upstream value before v4.16, following the existing 64 Gbit definition and retaining vendor definitions when present. The newer QLogic driver is the only current consumer; the legacy driver and other transports are unaffected. --- scst/include/backport.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scst/include/backport.h b/scst/include/backport.h index 9668ff38e..255585a36 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -2482,6 +2482,15 @@ enum { #define FC_PORTSPEED_64GBIT 0x1000 #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0) && \ + !defined(FC_PORTSPEED_128GBIT) +/* + * See also commit cc019a5a3b58 ("scsi: scsi_transport_fc: fix typos on 64/128 + * GBit define names") # v4.16. + */ +#define FC_PORTSPEED_128GBIT 0x2000 +#endif + #ifndef FC_PORT_ROLE_UNKNOWN #define FC_PORT_ROLE_UNKNOWN 0x00 #define FC_PORT_ROLE_FCP_TARGET 0x01