[PATCH v3 25/25] net/axgbe: modify debug messages

2024-06-04 Thread Venkat Kumar Ande
From: Venkat Kumar Ande Modify debug messages to get better information from debug logs Signed-off-by: Venkat Kumar Ande Acked-by: Selwin Sebastian --- drivers/net/axgbe/axgbe_ethdev.c | 4 ++-- drivers/net/axgbe/axgbe_phy_impl.c | 2 -- 2 files changed, 2 insertions(+), 4 deletions

[PATCH v3 24/25] net/axgbe: extend 10Mbps support to MAC version 21H

2024-06-04 Thread Venkat Kumar Ande
From: Venkat Kumar Ande MAC version 21H supports the 10Mbps speed. So, extend support to platforms that support it. Signed-off-by: Venkat Kumar Ande Acked-by: Selwin Sebastian --- drivers/net/axgbe/axgbe_phy_impl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a

[PATCH v3 23/25] net/axgbe: add support for Rx adaptation

2024-06-04 Thread Venkat Kumar Ande
From: Venkat Kumar Ande The existing implementation for non-Autonegotiation 10G speed modes does not enable RX adaptation in the Driver and FW. The RX Equalization settings (AFE settings alone) are manually configured and the existing link-up sequence in the driver does not perform rx adaptation

[PATCH v3 22/25] net/axgbe: add 2.5GbE support to 10G BaseT mode

2024-06-04 Thread Venkat Kumar Ande
From: Venkat Kumar Ande Add support to the driver to fully recognize and enable 2.5GbE speed in 10GBaseT mode. Signed-off-by: Venkat Kumar Ande Acked-by: Selwin Sebastian --- drivers/net/axgbe/axgbe_phy_impl.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a

[PATCH v3 19/25] net/axgbe: add support for 10 Mbps speed

2024-06-04 Thread Venkat Kumar Ande
From: Venkat Kumar Ande Add the necessary changes to support 10 Mbps speed for BaseT and SFP port modes. This is supported in MAC ver >= 30H. Signed-off-by: Venkat Kumar Ande Acked-by: Selwin Sebastian --- drivers/net/axgbe/axgbe_dev.c | 3 ++ drivers/net/axgbe/axgbe_ethdev.h |

[PATCH v3 20/25] net/axgbe: separate C22 and C45 transactions

2024-06-04 Thread Venkat Kumar Ande
From: Venkat Kumar Ande The xgbe MDIO bus driver can perform both C22 and C45 transfers, when using its MDIO bus hardware. The SFP I2C mdio bus driver only supports C22. Create separate functions for each and register the C45 versions using the new API calls where appropriate. Signed-off-by

[PATCH v3 18/25] net/axgbe: use definitions for mailbox commands

2024-06-04 Thread Venkat Kumar Ande
From: Venkat Kumar Ande Instead of using hardcoded values, use enumerations for mailbox command and sub commands. Signed-off-by: Venkat Kumar Ande Acked-by: Selwin Sebastian --- drivers/net/axgbe/axgbe_ethdev.h | 25 + drivers/net/axgbe/axgbe_phy_impl.c | 28

[PATCH v3 21/25] net/axgbe: replace mii generic macro for c45 with AXGBE

2024-06-04 Thread Venkat Kumar Ande
From: Venkat Kumar Ande The axgbe driver reuses MII_ADDR_C45 for its own purpose. The values derived with it are never passed to phylib or a linux MDIO bus driver. In order that MII_ADDR_C45 can be removed, add AXGBE specific macro. Signed-off-by: Venkat Kumar Ande Acked-by: Selwin Sebastian

[PATCH v3 17/25] net/axgbe: remove unnecessary conversion to bool

2024-06-04 Thread Venkat Kumar Ande
From: Venkat Kumar Ande The conversion to bool is not needed, remove it. Signed-off-by: Venkat Kumar Ande Acked-by: Selwin Sebastian --- drivers/net/axgbe/axgbe_phy_impl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net

[PATCH v3 16/25] net/axgbe: improve SFP 100Mbps auto-negotiation

2024-06-04 Thread Venkat Kumar Ande
From: Venkat Kumar Ande After changing speed to 100Mbps as a result of auto-negotiation (AN), some 10/100/1000Mbps SFPs indicate a successful link (no faults or loss of signal), but cannot successfully transmit or receive data. These SFPs required an extra auto-negotiation (AN) after the speed

[PATCH v3 15/25] net/axgbe: remove field of SFP diagnostic support

2024-06-04 Thread Venkat Kumar Ande
From: Venkat Kumar Ande The driver currently sets an indication of whether the SFP supports, and that the driver can obtain, diagnostics data. This isn't currently used by the driver. Remove this field and the logic supporting it. Signed-off-by: Venkat Kumar Ande Acked-by: Selwin Seba

[PATCH v3 14/25] net/axgbe: remove use of comm owned field

2024-06-04 Thread Venkat Kumar Ande
From: Venkat Kumar Ande The comm_owned field can hide logic where double locking is attempted and prevent multiple threads for the same device from accessing the mutex properly. Remove the comm_owned field and use the mutex API exclusively for gaining ownership. Signed-off-by: Venkat Kumar

[PATCH v3 13/25] net/axgbe: fix the false linkup in axgbe PHY status

2024-06-04 Thread Venkat Kumar Ande
From: Venkat Kumar Ande In the event of a change in AXGBE mode, the current auto-negotiation needs to be reset and the AN cycle needs to be re-triggered. However, the current code ignores the return value of axgbe_set_mode(), leading to false information as the link is declared without checking

[PATCH v3 12/25] net/axgbe: delay AN timeout during KR training

2024-06-04 Thread Venkat Kumar Ande
From: Venkat Kumar Ande AN restart triggered during KR training not only aborts the KR training process but also move the HW to unstable state. Driver has to wait up to 500ms or until the KR training is completed before restarting AN cycle. Without the fix the user will face KR training failure

[PATCH v3 11/25] net/axgbe: flow Tx Ctrl Registers are h/w version dependent

2024-06-04 Thread Venkat Kumar Ande
From: Venkat Kumar Ande There is difference in the TX Flow Control registers (TFCR) between the revisions of the hardware. The older revisions of hardware used to have single register per queue. Whereas, the newer revision of hardware (from ver 30H onwards) have one register per priority

[PATCH v3 10/25] net/axgbe: check only the minimum speed for cables

2024-06-04 Thread Venkat Kumar Ande
From: Venkat Kumar Ande There are cables that exist that can support speeds in excess of 10GbE. The driver, however, restricts the EEPROM advertised nominal bitrate to a specific range, which can prevent usage of cables that can support, for example, up to 25GbE. Rather than checking that an

[PATCH v3 09/25] net/axgbe: fix logic around active and passive cables

2024-06-04 Thread Venkat Kumar Ande
From: Venkat Kumar Ande SFP+ active and passive cables are copper cables with fixed SFP+ end connectors. Due to a misinterpretation of this, SFP+ active cables could end up not being recognized, causing the driver to fail to establish a connection. Introduce a new enum in SFP+ cable types

[PATCH v3 08/25] net/axgbe: fix the SFP codes check for DAC cables

2024-06-04 Thread Venkat Kumar Ande
From: Venkat Kumar Ande The current AXGBE code assumes that offset 6 of EEPROM SFP DAC (passive) cables is NULL. However, some cables (the 5 meter and 7 meter Molex passive cables) have non-zero data at offset 6. Fix the logic by moving the passive cable check above the active checks, so as not

[PATCH v3 07/25] net/axgbe: enable PLL control for fixed PHY modes only

2024-06-04 Thread Venkat Kumar Ande
From: Venkat Kumar Ande PLL control setting(RRC) is needed only in fixed PHY configuration to fix the peer-peer issues. Without the PLL control setting, the link up takes longer time in a fixed phy configuration. Without the fix the user will not get the link come UP. Driver implements SW RRC

[PATCH v3 06/25] net/axgbe: yellow carp devices do not need rrc

2024-06-04 Thread Venkat Kumar Ande
From: Venkat Kumar Ande Link stability issues are noticed on Yellow carp platforms when Receiver Reset Cycle is issued. Since the CDR workaround is disabled on these platforms, the Receiver Reset Cycle is not needed. So, avoid issuing rrc on Yellow carp platforms. Without the fix the user will

[PATCH v3 05/25] net/axgbe: disable interrupts during device removal

2024-06-04 Thread Venkat Kumar Ande
From: Venkat Kumar Ande Hardware interrupts are enabled during the init, however, they are not disabled during close. Disable all hardware interrupts during close operation to avoid any issues. Fixes: 9e890103267e ("net/axgbe: add Rx/Tx setup") Cc: sta...@dpdk.org Signed-off-by: Ve

[PATCH v3 04/25] net/axgbe: update DMA coherency values

2024-06-04 Thread Venkat Kumar Ande
From: Venkat Kumar Ande Based on the IOMMU configuration, the current cache control settings can result in possible coherency issues. The hardware team has recommended new settings for the PCI device path to eliminate the issue. Without the fix the user will get incorrect data in TSO

[PATCH v3 03/25] net/axgbe: fix fluctuations for 1G BELFUSE SFP

2024-06-04 Thread Venkat Kumar Ande
From: Venkat Kumar Ande Frequent link up/down events can happen when a Bel Fuse SFP part is connected to the amd-xgbe device. Try to avoid the frequent link issues by resetting the PHY as documented in Bel Fuse SFP datasheets. Without the fix user will see continuous port link up and down

[PATCH v3 02/25] net/axgbe: reset link when the link never comes back

2024-06-04 Thread Venkat Kumar Ande
From: Venkat Kumar Ande Normally, auto negotiation and reconnect should be automatically done by the hardware. But there seems to be an issue where auto negotiation has to be restarted manually. This happens because of link training and so even though still connected to the partner the link

[PATCH v3 01/25] net/axgbe: fix mdio access for non-zero ports and CL45 PHYs

2024-06-04 Thread Venkat Kumar Ande
From: Venkat Kumar Ande The XGBE supports performing MDIO operations using an MDIO command request. The driver mistakenly uses the mdio port address as the MDIO command request device address instead of the MDIO command request port address. Additionally, the driver does not properly check for

[PATCH v2 25/25] net/axgbe: modify debug messages

2024-05-07 Thread Venkat Kumar Ande
Modify debug messages to get better information from debug logs Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_ethdev.c | 4 ++-- drivers/net/axgbe/axgbe_phy_impl.c | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers

[PATCH v2 24/25] net/axgbe: extend 10Mbps support to MAC version 21H

2024-05-07 Thread Venkat Kumar Ande
MAC version 21H supports the 10Mbps speed. So, extend support to platforms that support it. Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_phy_impl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe

[PATCH v2 23/25] net/axgbe: fix the false linkup in axgbe PHY status

2024-05-07 Thread Venkat Kumar Ande
this by propagating the mode switch status information to axgbe_phy_status(). Fixes: 102b6ec3d5c3 ("net/axgbe: support auto-negotiation for 1Gbps") Cc: sta...@dpdk.org Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_mdio.c | 14 +++--- 1 file changed, 11 insert

[PATCH v2 22/25] net/axgbe: add support for Rx adaptation

2024-05-07 Thread Venkat Kumar Ande
Carp devices to ensure seamless RX Adaptation for 10G-SFI (LONG DAC) and 10G-KR without AN (CL72 not present). The RX adaptation core algorithm is executed by firmware, however, to achieve that a new mailbox sub-command is required to be sent by the driver. Signed-off-by: Venkat Kumar

[PATCH v2 21/25] net/axgbe: add 2.5GbE support to 10G BaseT mode

2024-05-07 Thread Venkat Kumar Ande
Add support to the driver to fully recognize and enable 2.5GbE speed in 10GBaseT mode. Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_phy_impl.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe

[PATCH v2 20/25] net/axgbe: replace mii generic macro for c45 with AXGBE

2024-05-07 Thread Venkat Kumar Ande
The axgbe driver reuses MII_ADDR_C45 for its own purpose. The values derived with it are never passed to phylib or a linux MDIO bus driver. In order that MII_ADDR_C45 can be removed, add an AXGBE specific Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_common.h | 4 ++-- drivers

[PATCH v2 19/25] net/axgbe: separate C22 and C45 transactions

2024-05-07 Thread Venkat Kumar Ande
The xgbe MDIO bus driver can perform both C22 and C45 transfers, when using its MDIO bus hardware. The SFP I2C mdio bus driver only supports C22. Create separate functions for each and register the C45 versions using the new API calls where appropriate. Signed-off-by: Venkat Kumar Ande

[PATCH v2 18/25] net/axgbe: add support for 10 Mbps speed

2024-05-07 Thread Venkat Kumar Ande
Add the necessary changes to support 10 Mbps speed for BaseT and SFP port modes. This is supported in MAC ver >= 30H. Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_dev.c | 3 ++ drivers/net/axgbe/axgbe_ethdev.h | 2 + drivers/net/axgbe/axgbe_mdio.c |

[PATCH v2 16/25] net/axgbe: remove unnecessary conversion to bool

2024-05-07 Thread Venkat Kumar Ande
The conversion to bool is not needed, remove it. Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_phy_impl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c index 87ef8b6048..2620d44dfb

[PATCH v2 17/25] net/axgbe: use definitions for mailbox commands

2024-05-07 Thread Venkat Kumar Ande
Instead of using hardcoded values, use enumerations for mailbox command and sub commands. Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_ethdev.h | 25 + drivers/net/axgbe/axgbe_phy_impl.c | 25 +++-- 2 files changed, 40 insertions

[PATCH v2 15/25] net/axgbe: improve SFP 100Mbps auto-negotiation

2024-05-07 Thread Venkat Kumar Ande
properly. Add a quirk for these SFPs so that if the outcome of the AN actually results in changing to a new speed, re-initiate AN at that new speed. Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_ethdev.h | 1 + drivers/net/axgbe/axgbe_mdio.c | 73

[PATCH v2 11/25] net/axgbe: flow Tx Ctrl Registers are h/w version dependent

2024-05-07 Thread Venkat Kumar Ande
face problem in TX operation on new 30H HW Fixes: 7c4158a5b592 ("net/axgbe: add DMA programming and start/stop") Cc: sta...@dpdk.org Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_dev.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) di

[PATCH v2 14/25] net/axgbe: remove field of SFP diagnostic support

2024-05-07 Thread Venkat Kumar Ande
The driver currently sets an indication of whether the SFP supports, and that the driver can obtain, diagnostics data. This isn't currently used by the driver. Remove this field and the logic supporting it. Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_phy_impl.c

[PATCH v2 13/25] net/axgbe: remove use of comm owned field

2024-05-07 Thread Venkat Kumar Ande
The comm_owned field can hide logic where double locking is attempted and prevent multiple threads for the same device from accessing the mutex properly. Remove the comm_owned field and use the mutex API exclusively for gaining ownership. Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe

[PATCH v2 12/25] net/axgbe: delay AN timeout during KR training

2024-05-07 Thread Venkat Kumar Ande
: a5c7273771e8 ("net/axgbe: add phy programming APIs") Cc: sta...@dpdk.org Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_ethdev.h | 2 ++ drivers/net/axgbe/axgbe_mdio.c | 25 + 2 files changed, 27 insertions(+) diff --git a/drivers/net/axgbe/axgbe_

[PATCH v2 10/25] net/axgbe: check only the minimum speed for cables

2024-05-07 Thread Venkat Kumar Ande
supports a specific range, only check for a minimum supported speed. Fixes: a5c7273771e8 ("net/axgbe: add phy programming APIs") Cc: sta...@dpdk.org Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_phy_impl.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) di

[PATCH v2 09/25] net/axgbe: fix logic around active and passive cables

2024-05-07 Thread Venkat Kumar Ande
the default cable type, and handle active and passive cables when they are specifically detected. Fixes: a5c7273771e8 ("net/axgbe: add phy programming APIs") Cc: sta...@dpdk.org Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_phy_impl.c | 9 ++--- 1 file changed, 6

[PATCH v2 08/25] net/axgbe: fix the SFP codes check for DAC cables

2024-05-07 Thread Venkat Kumar Ande
identified as an active cable. This will fix the issue for any passive cable that advertises 1000Base-CX in offset 6. Without the fix the user will not get link UP for few DAC cables. Fixes: a5c7273771e8 ("net/axgbe: add phy programming APIs") Cc: sta...@dpdk.org Signed-off-by: Venkat

[PATCH v2 07/25] net/axgbe: enable PLL control for fixed PHY modes only

2024-05-07 Thread Venkat Kumar Ande
tings during rate change") Cc: sta...@dpdk.org Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_phy_impl.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c index f51830f800..

[PATCH v2 06/25] net/axgbe: yellow carp devices do not need rrc

2024-05-07 Thread Venkat Kumar Ande
. Fixes: a5c7273771e8 ("net/axgbe: add phy programming APIs") Cc: sta...@dpdk.org Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_ethdev.c | 5 + drivers/net/axgbe/axgbe_ethdev.h | 1 + drivers/net/axgbe/axgbe_phy_impl.c | 2 +- 3 files changed, 7 insertions(+),

[PATCH v2 05/25] net/axgbe: disable interrupts during device removal

2024-05-07 Thread Venkat Kumar Ande
Hardware interrupts are enabled during the init, however, they are not disabled during close. Disable all hardware interrupts during close operation to avoid any issues. Fixes: 9e890103267e ("net/axgbe: add Rx/Tx setup") Cc: sta...@dpdk.org Signed-off-by: Venkat Kumar Ande --- d

[PATCH v2 04/25] net/axgbe: update DMA coherency values

2024-05-07 Thread Venkat Kumar Ande
("net/axgbe: add DMA programming and start/stop") Cc: sta...@dpdk.org Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_dev.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/net/axgbe/axgbe_dev.c b/drivers/net/axgbe/axgbe_d

[PATCH v2 03/25] net/axgbe: fix fluctuations for 1G BELFUSE SFP

2024-05-07 Thread Venkat Kumar Ande
t;net/axgbe: add phy programming APIs") Cc: sta...@dpdk.org Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_phy_impl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c index 54fe9faae0..ee9dcbe3da 10

[PATCH v2 02/25] net/axgbe: reset link when the link never comes back

2024-05-07 Thread Venkat Kumar Ande
This needs an auto-negotiation restart. Without the fix the user will not see the link up status Fixes: a5c7273771e8 ("net/axgbe: add phy programming APIs") Cc: sta...@dpdk.org Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_mdio.c | 2 +- drivers/net/axgbe/

[PATCH v2 01/25] net/axgbe: fix mdio access for non-zero ports and CL45 PHYs

2024-05-07 Thread Venkat Kumar Ande
request port address. Fixes: 4ac7516b8b39 ("net/axgbe: add phy init and related APIs") Cc: sta...@dpdk.org Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_common.h | 2 -- drivers/net/axgbe/axgbe_dev.c| 22 -- 2 files changed, 16 insertions(+), 8

[PATCH 05/24] net/axgbe: remove unnecessary conversion to bool

2024-04-12 Thread Venkat Kumar Ande
The conversion to bool is not needed, remove it. Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_phy_impl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c index 5acccf9146..b5796b13e0

[PATCH 22/24] net/axgbe: add support for Rx adaptation

2024-04-12 Thread Venkat Kumar Ande
Carp devices to ensure seamless RX Adaptation for 10G-SFI (LONG DAC) and 10G-KR without AN (CL72 not present). The RX adaptation core algorithm is executed by firmware, however, to achieve that a new mailbox sub-command is required to be sent by the driver. Signed-off-by: Venkat Kumar

[PATCH 24/24] net/axgbe: extend 10Mbps support to MAC version 21H

2024-04-12 Thread Venkat Kumar Ande
MAC version 21H supports the 10Mbps speed. So, extend support to platforms that support it. Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_phy_impl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe

[PATCH 23/24] net/axgbe: improve the false linkup in axgbe PHY status

2024-04-12 Thread Venkat Kumar Ande
this by propagating the mode switch status information to axgbe_phy_status(). Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_mdio.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/net/axgbe/axgbe_mdio.c b/drivers/net/axgbe/axgbe_mdio.c

[PATCH 21/24] net/axgbe: add 2.5GbE support to 10G BaseT mode

2024-04-12 Thread Venkat Kumar Ande
Add support to the driver to fully recognize and enable 2.5GbE speed in 10GBaseT mode. Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_phy_impl.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe

[PATCH 19/24] net/axgbe: separate C22 and C45 transactions

2024-04-12 Thread Venkat Kumar Ande
The xgbe MDIO bus driver can perform both C22 and C45 transfers, when using its MDIO bus hardware. The SFP I2C mdio bus driver only supports C22. Create separate functions for each and register the C45 versions using the new API calls where appropriate. Signed-off-by: Venkat Kumar Ande

[PATCH 20/24] net/axgbe: replace mii generic macro for c45 with AXGBE

2024-04-12 Thread Venkat Kumar Ande
The axgbe driver reuses MII_ADDR_C45 for its own purpose. The values derived with it are never passed to phylib or a linux MDIO bus driver. In order that MII_ADDR_C45 can be removed, add an AXGBE specific Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_common.h | 4 ++-- drivers

[PATCH 18/24] net/axgbe: delay AN timeout during KR training

2024-04-12 Thread Venkat Kumar Ande
AN restart triggered during KR training not only aborts the KR training process but also move the HW to unstable state. Driver has to wait up to 500ms or until the KR training is completed before restarting AN cycle. Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_ethdev.h | 2

[PATCH 17/24] net/axgbe: flow Tx Ctrl Registers are h/w ver dependent

2024-04-12 Thread Venkat Kumar Ande
There is difference in the TX Flow Control registers (TFCR) between the revisions of the hardware. The older revisions of hardware used to have single register per queue. Whereas, the newer revision of hardware (from ver 30H onwards) have one register per priority. Signed-off-by: Venkat Kumar

[PATCH 15/24] net/axgbe: check only the minimum speed for cables

2024-04-12 Thread Venkat Kumar Ande
supports a specific range, only check for a minimum supported speed. Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_phy_impl.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c index

[PATCH 16/24] net/axgbe: add support for 10 Mbps speed

2024-04-12 Thread Venkat Kumar Ande
Add the necessary changes to support 10 Mbps speed for BaseT and SFP port modes. This is supported in MAC ver >= 30H. Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_dev.c | 3 ++ drivers/net/axgbe/axgbe_ethdev.h | 2 + drivers/net/axgbe/axgbe_mdio.c |

[PATCH 14/24] net/axgbe: improve logic around active and passive cables

2024-04-12 Thread Venkat Kumar Ande
the default cable type, and handle active and passive cables when they are specifically detected. Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_phy_impl.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net

[PATCH 13/24] net/axgbe: improve the SFP codes check for DAC cables

2024-04-12 Thread Venkat Kumar Ande
identified as an active cable. This will fix the issue for any passive cable that advertises 1000Base-CX in offset 6. Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_phy_impl.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b

[PATCH 12/24] net/axgbe: enable PLL control for fixed PHY modes only

2024-04-12 Thread Venkat Kumar Ande
On configuration, and can be skipped. Also, PLL re-initialization is not needed for PHY Power Off and RRC commands. Otherwise, they lead to mailbox errors. Added the changes accordingly. Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_phy_impl.c | 10 -- 1 file changed, 8

[PATCH 11/24] net/axgbe: use definitions for mailbox commands

2024-04-12 Thread Venkat Kumar Ande
Instead of using hardcoded values, use enumerations for mailbox command and sub commands. Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_ethdev.h | 25 + drivers/net/axgbe/axgbe_phy_impl.c | 25 +++-- 2 files changed, 40 insertions

[PATCH 08/24] net/axgbe: update DMA coherency values

2024-04-12 Thread Venkat Kumar Ande
Based on the IOMMU configuration, the current cache control settings can result in possible coherency issues. The hardware team has recommended new settings for the PCI device path to eliminate the issue. Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_dev.c | 20

[PATCH 10/24] net/axgbe: yellow carp devices do not need rrc

2024-04-12 Thread Venkat Kumar Ande
Link stability issues are noticed on Yellow carp platforms when Receiver Reset Cycle is issued. Since the CDR workaround is disabled on these platforms, the Receiver Reset Cycle is not needed. So, avoid issuing rrc on Yellow carp platforms. Signed-off-by: Venkat Kumar Ande --- drivers/net

[PATCH 09/24] net/axgbe: disable interrupts during device removal

2024-04-12 Thread Venkat Kumar Ande
Hardware interrupts are enabled during the init, however, they are not disabled during close. Disable all hardware interrupts during close operation to avoid any issues. Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_ethdev.c | 5 + 1 file changed, 5 insertions(+) diff --git

[PATCH 07/24] net/axgbe: check fluctuations for 1G BELFUSE SFP

2024-04-12 Thread Venkat Kumar Ande
Frequent link up/down events can happen when a Bel Fuse SFP part is connected to the amd-xgbe device. Try to avoid the frequent link issues by resetting the PHY as documented in Bel Fuse SFP datasheets. Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_phy_impl.c | 3 +++ 1 file

[PATCH 06/24] net/axgbe: reset link when the link never comes back

2024-04-12 Thread Venkat Kumar Ande
This needs an auto-negotiation restart. Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_mdio.c | 2 +- drivers/net/axgbe/axgbe_phy_impl.c | 7 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/axgbe/axgbe_mdio.c b/drivers/net/axgbe/axgbe_md

[PATCH 04/24] net/axgbe: check mdio for non-zero ports and CL45 PHYs

2024-04-12 Thread Venkat Kumar Ande
Kumar Ande --- drivers/net/axgbe/axgbe_common.h | 2 -- drivers/net/axgbe/axgbe_dev.c| 22 -- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/drivers/net/axgbe/axgbe_common.h b/drivers/net/axgbe/axgbe_common.h index a5d11c5832..51532fb34a 100644 --- a/drivers

[PATCH 03/24] net/axgbe: improve SFP 100Mbps auto-negotiation

2024-04-12 Thread Venkat Kumar Ande
properly. Add a quirk for these SFPs so that if the outcome of the AN actually results in changing to a new speed, re-initiate AN at that new speed. Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_ethdev.h | 1 + drivers/net/axgbe/axgbe_mdio.c | 73

[PATCH 02/24] net/axgbe: remove field of SFP diagnostic support

2024-04-12 Thread Venkat Kumar Ande
The driver currently sets an indication of whether the SFP supports, and that the driver can obtain, diagnostics data. This isn't currently used by the driver. Remove this field and the logic supporting it. Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_phy_impl.c

[PATCH 01/24] net/axgbe: remove use of comm_owned field

2024-04-12 Thread Venkat Kumar Ande
The comm_owned field can hide logic where double locking is attempted and prevent multiple threads for the same device from accessing the mutex properly. Remove the comm_owned field and use the mutex API exclusively for gaining ownership. Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe

[PATCH v1] net/axgbe: read and save the port property register

2024-01-05 Thread Venkat Kumar Ande
From: Venkat Kumar Ande Read and save the port property registers once during the device probe and then use the saved values as they are needed. Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_ethdev.c | 21 + drivers/net/axgbe/axgbe_ethdev.h | 7 +++ drivers/net