From: Raju Rangoju <Raju.Rangoju@amd.com>
Add support for newer version of Hardware, the Yellow Carp Ethernet device
Raju Rangoju (3):
net: amd-xgbe: Add Support for Yellow Carp Ethernet device
net: amd-xgbe: Alter the port speed bit range
net: amd-xgbe: Disable the CDR workaround path for Yellow Carp Devices
drivers/net/ethernet/amd/xgbe/xgbe-common.h | 6 ++++--
drivers/net/ethernet/amd/xgbe/xgbe-pci.c | 18 ++++++++++++------
drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 8 ++++----
3 files changed, 20 insertions(+), 12 deletions(-)
--
2.25.1
From: Raju Rangoju <Raju.Rangoju@amd.com>
Yellow Carp Ethernet devices use the existing PCI ID but
the window settings for the indirect PCS access have been
altered. Add the check for Yellow Carp Ethernet devices to
use the new register values.
Co-developed-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Signed-off-by: Raju Rangoju <Raju.Rangoju@amd.com>
---
drivers/net/ethernet/amd/xgbe/xgbe-common.h | 2 ++
drivers/net/ethernet/amd/xgbe/xgbe-pci.c | 12 ++++++++----
2 files changed, 10 insertions(+), 4 deletions(-)
From: Raju Rangoju <Raju.Rangoju@amd.com>
Newer generation Hardware uses the slightly different
port speed bit widths, so alter the existing port speed
bit range to extend support to the newer generation hardware
while maintaining the backward compatibility with older
generation hardware.
The previously reserved bits are now being used which
then requires the adjustment to the BIT values, e.g.:
Before:
PORT_PROPERTY_0[22:21] - Reserved
PORT_PROPERTY_0[26:23] - Supported Speeds
After:
PORT_PROPERTY_0[21] - Reserved
PORT_PROPERTY_0[26:22] - Supported Speeds
To make this backwards compatible, the existing BIT
definitions for the port speeds are incremented by one
to maintain the original position.
Co-developed-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Signed-off-by: Raju Rangoju <Raju.Rangoju@amd.com>
---
drivers/net/ethernet/amd/xgbe/xgbe-common.h | 4 ++--
drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
From: Tom Lendacky <thomas.lendacky@amd.com> Date: 2021-12-17 14:28:07
On 12/17/21 5:15 AM, Raju Rangoju wrote:
quoted hunk
From: Raju Rangoju <Raju.Rangoju@amd.com>
Yellow Carp Ethernet devices use the existing PCI ID but
the window settings for the indirect PCS access have been
altered. Add the check for Yellow Carp Ethernet devices to
use the new register values.
Co-developed-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Signed-off-by: Raju Rangoju <Raju.Rangoju@amd.com>
---
drivers/net/ethernet/amd/xgbe/xgbe-common.h | 2 ++
drivers/net/ethernet/amd/xgbe/xgbe-pci.c | 12 ++++++++----
2 files changed, 10 insertions(+), 4 deletions(-)
@@ -274,10 +274,14 @@ static int xgbe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)/* Set the PCS indirect addressing definition registers */rdev=pci_get_domain_bus_and_slot(0,0,PCI_DEVFN(0,0));-if(rdev&&-(rdev->vendor==PCI_VENDOR_ID_AMD)&&(rdev->device==0x15d0)){-pdata->xpcs_window_def_reg=PCS_V2_RV_WINDOW_DEF;-pdata->xpcs_window_sel_reg=PCS_V2_RV_WINDOW_SELECT;+if(rdev&&rdev->vendor==PCI_VENDOR_ID_AMD){+if(rdev->device==0x15d0){+pdata->xpcs_window_def_reg=PCS_V2_RV_WINDOW_DEF;+pdata->xpcs_window_sel_reg=PCS_V2_RV_WINDOW_SELECT;+}elseif(rdev->device==0x14b5){+pdata->xpcs_window_def_reg=PCS_V2_YC_WINDOW_DEF;+pdata->xpcs_window_sel_reg=PCS_V2_YC_WINDOW_SELECT;+}
Hmmm... now that I look at this, pdata->xpcs_window... won't be set for non RV or YC platforms, right? All rdev devices should have an AMD vendor ID and therefore always take the if path. But only RV and YC will set the values. So this needs to be reworked.
Thanks,
Tom
From: Raju Rangoju <Raju.Rangoju@amd.com>
Yellow Carp Ethernet devices use the existing PCI ID but
the window settings for the indirect PCS access have been
altered. Add the check for Yellow Carp Ethernet devices to
use the new register values.
Co-developed-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Signed-off-by: Raju Rangoju <Raju.Rangoju@amd.com>
---
drivers/net/ethernet/amd/xgbe/xgbe-common.h | 2 ++
drivers/net/ethernet/amd/xgbe/xgbe-pci.c | 12 ++++++++----
2 files changed, 10 insertions(+), 4 deletions(-)
Hmmm... now that I look at this, pdata->xpcs_window... won't be set for non RV or YC platforms, right? All rdev devices should have an AMD vendor ID and therefore always take the if path. But only RV and YC will set the values. So this needs to be reworked.
Hi Tom,
Good catch, thanks! I missed it.
I'll re-spin the next version with the rework.
Thanks,
Raju