Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Oct 2025 16:44:36 GMT
From:      Zhenlei Huang <zlei@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 49fbc8dcf77d - stable/13 - qlnxe: Unconditionally enable extended media types
Message-ID:  <202510041644.594GiaMw058184@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by zlei:

URL: https://cgit.FreeBSD.org/src/commit/?id=49fbc8dcf77d4ef21b7e93986ff5fcd8f0e53c1d

commit 49fbc8dcf77d4ef21b7e93986ff5fcd8f0e53c1d
Author:     Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2025-09-09 10:04:54 +0000
Commit:     Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2025-10-04 16:43:23 +0000

    qlnxe: Unconditionally enable extended media types
    
    Those extended media types are available since about 2015 [1]. All
    supported branches already have them defined.
    
    No functional change intended.
    
    [1] eb7e25b22f1c ifmedia changes: Extend the number of available subtypes for Ethernet media ...
    
    Reviewed by:    kbowling
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D52374
    
    (cherry picked from commit 08356a733eb7a7bef1afe20ded2d983b55310de7)
    (cherry picked from commit 5aa49c98edfc48fbe96f7aba0e0631d4c0f29493)
    (cherry picked from commit 2cb20b25a5739fb542513571e3f6d7ffd607f346)
---
 sys/dev/qlnx/qlnxe/qlnx_def.h | 16 ----------------
 sys/dev/qlnx/qlnxe/qlnx_os.c  | 21 +++++++++------------
 2 files changed, 9 insertions(+), 28 deletions(-)

diff --git a/sys/dev/qlnx/qlnxe/qlnx_def.h b/sys/dev/qlnx/qlnxe/qlnx_def.h
index 276804c08ab5..898d85fdba89 100644
--- a/sys/dev/qlnx/qlnxe/qlnx_def.h
+++ b/sys/dev/qlnx/qlnxe/qlnx_def.h
@@ -696,22 +696,6 @@ extern int qlnx_alloc_mem_sb(qlnx_host_t *ha, struct ecore_sb_info *sb_info,
  * Some OS specific stuff
  */
 
-#if (defined IFM_100G_SR4)
-#define QLNX_IFM_100G_SR4 IFM_100G_SR4
-#define QLNX_IFM_100G_LR4 IFM_100G_LR4
-#define QLNX_IFM_100G_CR4 IFM_100G_CR4
-#else
-#define QLNX_IFM_100G_SR4 IFM_UNKNOWN
-#define QLNX_IFM_100G_LR4 IFM_UNKNOWN
-#endif /* #if (defined IFM_100G_SR4) */
-
-#if (defined IFM_25G_SR)
-#define QLNX_IFM_25G_SR IFM_25G_SR
-#define QLNX_IFM_25G_CR IFM_25G_CR
-#else
-#define QLNX_IFM_25G_SR IFM_UNKNOWN
-#define QLNX_IFM_25G_CR IFM_UNKNOWN
-#endif /* #if (defined IFM_25G_SR) */
 
 #if __FreeBSD_version < 1100000
 
diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.c b/sys/dev/qlnx/qlnxe/qlnx_os.c
index 66c715a7bfc7..0b0b653ab90d 100644
--- a/sys/dev/qlnx/qlnxe/qlnx_os.c
+++ b/sys/dev/qlnx/qlnxe/qlnx_os.c
@@ -2425,18 +2425,15 @@ qlnx_init_ifnet(device_t dev, qlnx_host_t *ha)
 		ifmedia_add(&ha->media, (IFM_ETHER | IFM_40G_CR4), 0, NULL);
         } else if ((device_id == QLOGIC_PCI_DEVICE_ID_1656) ||
 			(device_id == QLOGIC_PCI_DEVICE_ID_8070)) {
-		ifmedia_add(&ha->media, (IFM_ETHER | QLNX_IFM_25G_SR), 0, NULL);
-		ifmedia_add(&ha->media, (IFM_ETHER | QLNX_IFM_25G_CR), 0, NULL);
+		ifmedia_add(&ha->media, (IFM_ETHER | IFM_25G_SR), 0, NULL);
+		ifmedia_add(&ha->media, (IFM_ETHER | IFM_25G_CR), 0, NULL);
         } else if (device_id == QLOGIC_PCI_DEVICE_ID_1654) {
 		ifmedia_add(&ha->media, (IFM_ETHER | IFM_50G_KR2), 0, NULL);
 		ifmedia_add(&ha->media, (IFM_ETHER | IFM_50G_CR2), 0, NULL);
         } else if (device_id == QLOGIC_PCI_DEVICE_ID_1644) {
-		ifmedia_add(&ha->media,
-			(IFM_ETHER | QLNX_IFM_100G_LR4), 0, NULL);
-		ifmedia_add(&ha->media,
-			(IFM_ETHER | QLNX_IFM_100G_SR4), 0, NULL);
-		ifmedia_add(&ha->media,
-			(IFM_ETHER | QLNX_IFM_100G_CR4), 0, NULL);
+		ifmedia_add(&ha->media, (IFM_ETHER | IFM_100G_LR4), 0, NULL);
+		ifmedia_add(&ha->media, (IFM_ETHER | IFM_100G_SR4), 0, NULL);
+		ifmedia_add(&ha->media, (IFM_ETHER | IFM_100G_CR4), 0, NULL);
 	}
 
         ifmedia_add(&ha->media, (IFM_ETHER | IFM_FDX), 0, NULL);
@@ -3860,11 +3857,11 @@ qlnx_get_optics(qlnx_host_t *ha, struct qlnx_link_output *if_link)
 	case MEDIA_MODULE_FIBER:
 	case MEDIA_UNSPECIFIED:
 		if (if_link->speed == (100 * 1000))
-			ifm_type = QLNX_IFM_100G_SR4;
+			ifm_type = IFM_100G_SR4;
 		else if (if_link->speed == (40 * 1000))
 			ifm_type = IFM_40G_SR4;
 		else if (if_link->speed == (25 * 1000))
-			ifm_type = QLNX_IFM_25G_SR;
+			ifm_type = IFM_25G_SR;
 		else if (if_link->speed == (10 * 1000))
 			ifm_type = (IFM_10G_LR | IFM_10G_SR);
 		else if (if_link->speed == (1 * 1000))
@@ -3874,11 +3871,11 @@ qlnx_get_optics(qlnx_host_t *ha, struct qlnx_link_output *if_link)
 
 	case MEDIA_DA_TWINAX:
 		if (if_link->speed == (100 * 1000))
-			ifm_type = QLNX_IFM_100G_CR4;
+			ifm_type = IFM_100G_CR4;
 		else if (if_link->speed == (40 * 1000))
 			ifm_type = IFM_40G_CR4;
 		else if (if_link->speed == (25 * 1000))
-			ifm_type = QLNX_IFM_25G_CR;
+			ifm_type = IFM_25G_CR;
 		else if (if_link->speed == (10 * 1000))
 			ifm_type = IFM_10G_TWINAX;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202510041644.594GiaMw058184>