The branch main has been updated by np:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=4b17bb0edea0341d81eba3d369bd7739e5683d4b

commit 4b17bb0edea0341d81eba3d369bd7739e5683d4b
Author:     Navdeep Parhar <[email protected]>
AuthorDate: 2025-10-16 18:23:49 +0000
Commit:     Navdeep Parhar <[email protected]>
CommitDate: 2025-11-13 00:11:47 +0000

    cxgbe(4): Add support for QSFP-DD connector and 400G transceivers
    
    Tested with SR8 and DR4 transceivers.
    
    MFC after:      1 week
    Sponsored by:   Chelsio Communications
---
 sys/dev/cxgbe/firmware/t4fw_interface.h |  7 ++++---
 sys/dev/cxgbe/t4_main.c                 | 15 ++++++++++++++-
 2 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/sys/dev/cxgbe/firmware/t4fw_interface.h 
b/sys/dev/cxgbe/firmware/t4fw_interface.h
index 5874f0343b03..b11552dce021 100644
--- a/sys/dev/cxgbe/firmware/t4fw_interface.h
+++ b/sys/dev/cxgbe/firmware/t4fw_interface.h
@@ -8967,9 +8967,10 @@ enum fw_port_type {
        FW_PORT_TYPE_SFP28      = 20,   /* No, 1, 25G/10G/1G */
        FW_PORT_TYPE_KR_SFP28   = 21,   /* No, 1, 25G/10G/1G using Backplane */
        FW_PORT_TYPE_KR_XLAUI   = 22,   /* No, 4, 40G/10G/1G, No AN*/
-       FW_PORT_TYPE_SFP56      = 26,
-       FW_PORT_TYPE_QSFP56     = 27,
-       FW_PORT_TYPE_NONE = M_FW_PORT_CMD_PTYPE
+       FW_PORT_TYPE_SFP56      = 26,   /* No, 1, 50G/25G */
+       FW_PORT_TYPE_QSFP56     = 27,   /* No, 4, 200G/100G/50G/25G */
+       FW_PORT_TYPE_QSFPDD     = 34,   /* No, 8, 400G/200G/100G/50G */
+       FW_PORT_TYPE_NONE = M_FW_PORT_CMD_PORTTYPE32
 };
 
 static inline bool
diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c
index 6133d810c003..99d9cad9f013 100644
--- a/sys/dev/cxgbe/t4_main.c
+++ b/sys/dev/cxgbe/t4_main.c
@@ -3652,6 +3652,7 @@ port_mword(struct port_info *pi, uint32_t speed)
        case FW_PORT_TYPE_SFP28:
        case FW_PORT_TYPE_SFP56:
        case FW_PORT_TYPE_QSFP56:
+       case FW_PORT_TYPE_QSFPDD:
                /* Pluggable transceiver */
                switch (pi->mod_type) {
                case FW_PORT_MOD_TYPE_LR:
@@ -3671,6 +3672,8 @@ port_mword(struct port_info *pi, uint32_t speed)
                                return (IFM_100G_LR4);
                        case FW_PORT_CAP32_SPEED_200G:
                                return (IFM_200G_LR4);
+                       case FW_PORT_CAP32_SPEED_400G:
+                               return (IFM_400G_LR8);
                        }
                        break;
                case FW_PORT_MOD_TYPE_SR:
@@ -3689,6 +3692,8 @@ port_mword(struct port_info *pi, uint32_t speed)
                                return (IFM_100G_SR4);
                        case FW_PORT_CAP32_SPEED_200G:
                                return (IFM_200G_SR4);
+                       case FW_PORT_CAP32_SPEED_400G:
+                               return (IFM_400G_SR8);
                        }
                        break;
                case FW_PORT_MOD_TYPE_ER:
@@ -3712,6 +3717,8 @@ port_mword(struct port_info *pi, uint32_t speed)
                                return (IFM_100G_CR4);
                        case FW_PORT_CAP32_SPEED_200G:
                                return (IFM_200G_CR4_PAM4);
+                       case FW_PORT_CAP32_SPEED_400G:
+                               return (IFM_400G_CR8);
                        }
                        break;
                case FW_PORT_MOD_TYPE_LRM:
@@ -3723,10 +3730,12 @@ port_mword(struct port_info *pi, uint32_t speed)
                                return (IFM_100G_DR);
                        if (speed == FW_PORT_CAP32_SPEED_200G)
                                return (IFM_200G_DR4);
+                       if (speed == FW_PORT_CAP32_SPEED_400G)
+                               return (IFM_400G_DR4);
                        break;
                case FW_PORT_MOD_TYPE_NA:
                        MPASS(0);       /* Not pluggable? */
-                       /* fall throough */
+                       /* fall through */
                case FW_PORT_MOD_TYPE_ERROR:
                case FW_PORT_MOD_TYPE_UNKNOWN:
                case FW_PORT_MOD_TYPE_NOTSUPPORTED:
@@ -3735,6 +3744,10 @@ port_mword(struct port_info *pi, uint32_t speed)
                        return (IFM_NONE);
                }
                break;
+       case M_FW_PORT_CMD_PTYPE:       /* FW_PORT_TYPE_NONE for old firmware */
+               if (chip_id(pi->adapter) >= CHELSIO_T7)
+                       return (IFM_UNKNOWN);
+               /* fall through */
        case FW_PORT_TYPE_NONE:
                return (IFM_NONE);
        }

Reply via email to