Skip to content

Commit

Permalink
net: amd-xgbe: Disable the CDR workaround path for Yellow Carp Devices
Browse files Browse the repository at this point in the history
commit 6f60ecf upstream.

Yellow Carp Ethernet devices do not require
Autonegotiation CDR workaround, hence disable the same.

Co-developed-by: Shyam Sundar S K <[email protected]>
Signed-off-by: Shyam Sundar S K <[email protected]>
Signed-off-by: Raju Rangoju <[email protected]>
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: chenwei.0515 <[email protected]>
  • Loading branch information
RajuRangoju authored and guojinhui-liam committed Jan 6, 2025
1 parent 165da45 commit 76a6ca2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/net/ethernet/amd/xgbe/xgbe-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,9 @@ static int xgbe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
(rdev->device == 0x14b5)) {
pdata->xpcs_window_def_reg = PCS_V2_YC_WINDOW_DEF;
pdata->xpcs_window_sel_reg = PCS_V2_YC_WINDOW_SELECT;

/* Yellow Carp devices do not need cdr workaround */
pdata->vdata->an_cdr_workaround = 0;
} else {
pdata->xpcs_window_def_reg = PCS_V2_WINDOW_DEF;
pdata->xpcs_window_sel_reg = PCS_V2_WINDOW_SELECT;
Expand Down Expand Up @@ -467,7 +470,7 @@ static int __maybe_unused xgbe_pci_resume(struct device *dev)
return ret;
}

static const struct xgbe_version_data xgbe_v2a = {
static struct xgbe_version_data xgbe_v2a = {
.init_function_ptrs_phy_impl = xgbe_init_function_ptrs_phy_v2,
.xpcs_access = XGBE_XPCS_ACCESS_V2,
.mmc_64bit = 1,
Expand All @@ -482,7 +485,7 @@ static const struct xgbe_version_data xgbe_v2a = {
.an_cdr_workaround = 1,
};

static const struct xgbe_version_data xgbe_v2b = {
static struct xgbe_version_data xgbe_v2b = {
.init_function_ptrs_phy_impl = xgbe_init_function_ptrs_phy_v2,
.xpcs_access = XGBE_XPCS_ACCESS_V2,
.mmc_64bit = 1,
Expand Down

0 comments on commit 76a6ca2

Please sign in to comment.