Patch "net: sfp: handle 100G/25G active optical cables in sfp_parse_support" has been added to the 6.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net: sfp: handle 100G/25G active optical cables in sfp_parse_support

to the 6.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-sfp-handle-100g-25g-active-optical-cables-in-sfp.patch
and it can be found in the queue-6.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 27099e3d1a223c2ff0cfee3b3217b01682c89206
Author: Josua Mayer <josua@xxxxxxxxxxxxx>
Date:   Fri Aug 18 13:05:56 2023 +0200

    net: sfp: handle 100G/25G active optical cables in sfp_parse_support
    
    [ Upstream commit db1a6ad77c180efc7242d7204b9a0c72c8a5a1bb ]
    
    Handle extended compliance code 0x1 (SFF8024_ECC_100G_25GAUI_C2M_AOC)
    for active optical cables supporting 25G and 100G speeds.
    
    Since the specification makes no statement about transmitter range, and
    as the specific sfp module that had been tested features only 2m fiber -
    short-range (SR) modes are selected.
    
    The 100G speed is irrelevant because it would require multiple fibers /
    multiple SFP28 modules combined under one netdev.
    sfp-bus.c only handles a single module per netdev, so only 25Gbps modes
    are selected.
    
    sfp_parse_support already handles SFF8024_ECC_100GBASE_SR4_25GBASE_SR
    with compatible properties, however that entry is a contradiction in
    itself since with SFP(28) 100GBASE_SR4 is impossible - that would likely
    be a mode for qsfp modules only.
    
    Add a case for SFF8024_ECC_100G_25GAUI_C2M_AOC selecting 25gbase-r
    interface mode and 25000baseSR link mode.
    Also enforce SFP28 bitrate limits on the values read from sfp eeprom as
    requested by Russell King.
    
    Tested with fs.com S28-AO02 AOC SFP28 module.
    
    Signed-off-by: Josua Mayer <josua@xxxxxxxxxxxxx>
    Reviewed-by: Russell King (Oracle) <rmk+kernel@xxxxxxxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/phy/sfp-bus.c b/drivers/net/phy/sfp-bus.c
index 9372e5a4cadcf..5093fc82a0248 100644
--- a/drivers/net/phy/sfp-bus.c
+++ b/drivers/net/phy/sfp-bus.c
@@ -258,6 +258,16 @@ void sfp_parse_support(struct sfp_bus *bus, const struct sfp_eeprom_id *id,
 	switch (id->base.extended_cc) {
 	case SFF8024_ECC_UNSPEC:
 		break;
+	case SFF8024_ECC_100G_25GAUI_C2M_AOC:
+		if (br_min <= 28000 && br_max >= 25000) {
+			/* 25GBASE-R, possibly with FEC */
+			__set_bit(PHY_INTERFACE_MODE_25GBASER, interfaces);
+			/* There is currently no link mode for 25000base
+			 * with unspecified range, reuse SR.
+			 */
+			phylink_set(modes, 25000baseSR_Full);
+		}
+		break;
 	case SFF8024_ECC_100GBASE_SR4_25GBASE_SR:
 		phylink_set(modes, 100000baseSR4_Full);
 		phylink_set(modes, 25000baseSR_Full);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux