diff options
Diffstat (limited to 'meta-snowyowl/recipes-kernel/linux/files/0172-Modification-to-previous-commit-305f3ad05fec3a5f0d7b.patch')
-rw-r--r-- | meta-snowyowl/recipes-kernel/linux/files/0172-Modification-to-previous-commit-305f3ad05fec3a5f0d7b.patch | 184 |
1 files changed, 184 insertions, 0 deletions
diff --git a/meta-snowyowl/recipes-kernel/linux/files/0172-Modification-to-previous-commit-305f3ad05fec3a5f0d7b.patch b/meta-snowyowl/recipes-kernel/linux/files/0172-Modification-to-previous-commit-305f3ad05fec3a5f0d7b.patch new file mode 100644 index 00000000..70a98481 --- /dev/null +++ b/meta-snowyowl/recipes-kernel/linux/files/0172-Modification-to-previous-commit-305f3ad05fec3a5f0d7b.patch @@ -0,0 +1,184 @@ +From 9ce3ea9ed41bd4ecab41d7c23c8a924deb047616 Mon Sep 17 00:00:00 2001 +From: Sudheesh Mavila <sudheesh.mavila@amd.com> +Date: Thu, 3 May 2018 11:52:34 +0530 +Subject: [PATCH 9/9] Modification to previous commit + 305f3ad05fec3a5f0d7b51857b4bc99f527db7a4 and commit + 41fb5f9d75199370d9b3adc05bf642b0b13e29d4 + + Based on upstream commit 4d945663a6a0acf3cbe45940503f2eb9584bfee7 and 96f4d430c507ed4856048c2dc9c1a2ea5b5e74e4 + amd-xgbe: Improve KR auto-negotiation and training + amd-xgbe: Add pre/post auto-negotiation phy hooks + +Signed-off-by: Sudheesh Mavila <sudheesh.mavila@amd.com> +--- + drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c | 20 +++++++++++++++----- + drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 1 + + drivers/net/ethernet/amd/xgbe/xgbe-i2c.c | 1 + + drivers/net/ethernet/amd/xgbe/xgbe-main.c | 1 + + drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 1 + + drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 15 ++++++++++----- + drivers/net/ethernet/amd/xgbe/xgbe.h | 3 ++- + 7 files changed, 31 insertions(+), 11 deletions(-) + +diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c b/drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c +index 79387b4..b911439 100755 +--- a/drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c ++++ b/drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c +@@ -519,11 +519,21 @@ void xgbe_debugfs_init(struct xgbe_prv_data *pdata) + "debugfs_create_file failed\n"); + } + +- pfile = debugfs_create_bool("cdr_track_early", 0600, +- pdata->xgbe_debugfs, +- &pdata->debugfs_cdr_track_early); +- if (!pfile) +- netdev_err(pdata->netdev, "debugfs_create_bool failed\n"); ++ if (pdata->vdata->an_cdr_workaround) { ++ pfile = debugfs_create_bool("an_cdr_workaround", 0600, ++ pdata->xgbe_debugfs, ++ &pdata->debugfs_an_cdr_workaround); ++ if (!pfile) ++ netdev_err(pdata->netdev, ++ "debugfs_create_bool failed\n"); ++ ++ pfile = debugfs_create_bool("an_cdr_track_early", 0600, ++ pdata->xgbe_debugfs, ++ &pdata->debugfs_an_cdr_track_early); ++ if (!pfile) ++ netdev_err(pdata->netdev, ++ "debugfs_create_bool failed\n"); ++ } + + kfree(buf); + } +diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c +index 6bd8f38..b70832e 100755 +--- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c ++++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c +@@ -118,6 +118,7 @@ + #include <linux/spinlock.h> + #include <linux/tcp.h> + #include <linux/if_vlan.h> ++#include <linux/interrupt.h> + #include <net/busy_poll.h> + #include <linux/clk.h> + #include <linux/if_ether.h> +diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-i2c.c b/drivers/net/ethernet/amd/xgbe/xgbe-i2c.c +index dc74341..4d9062d 100755 +--- a/drivers/net/ethernet/amd/xgbe/xgbe-i2c.c ++++ b/drivers/net/ethernet/amd/xgbe/xgbe-i2c.c +@@ -115,6 +115,7 @@ + */ + + #include <linux/module.h> ++#include <linux/interrupt.h> + #include <linux/kmod.h> + #include <linux/delay.h> + #include <linux/completion.h> +diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-main.c b/drivers/net/ethernet/amd/xgbe/xgbe-main.c +index 795e556..441d0973 100755 +--- a/drivers/net/ethernet/amd/xgbe/xgbe-main.c ++++ b/drivers/net/ethernet/amd/xgbe/xgbe-main.c +@@ -349,6 +349,7 @@ int xgbe_config_netdev(struct xgbe_prv_data *pdata) + XGMAC_SET_BITS(pdata->rss_options, MAC_RSSCR, UDP4TE, 1); + + /* Call MDIO/PHY initialization routine */ ++ pdata->debugfs_an_cdr_workaround = pdata->vdata->an_cdr_workaround; + ret = pdata->phy_if.phy_init(pdata); + if (ret) + return ret; +diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c +index a511e61..1b45cd7 100755 +--- a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c ++++ b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c +@@ -114,6 +114,7 @@ + * THE POSSIBILITY OF SUCH DAMAGE. + */ + ++#include <linux/interrupt.h> + #include <linux/module.h> + #include <linux/kmod.h> + #include <linux/mdio.h> +diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c +index 23139cf..aac8843 100755 +--- a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c ++++ b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c +@@ -152,6 +152,9 @@ + #define XGBE_CDR_DELAY_INC 10000 + #define XGBE_CDR_DELAY_MAX 100000 + ++/* RRC frequency during link status check */ ++#define XGBE_RRC_FREQUENCY 10 ++ + enum xgbe_port_mode { + XGBE_PORT_MODE_RSVD = 0, + XGBE_PORT_MODE_BACKPLANE, +@@ -2407,7 +2410,7 @@ static int xgbe_phy_link_status(struct xgbe_prv_data *pdata, int *an_restart) + return 1; + + /* No link, attempt a receiver reset cycle */ +- if (phy_data->rrc_count++) { ++ if (phy_data->rrc_count++ > XGBE_RRC_FREQUENCY) { + phy_data->rrc_count = 0; + xgbe_phy_rrc(pdata); + } +@@ -2719,7 +2722,7 @@ static void xgbe_phy_cdr_track(struct xgbe_prv_data *pdata) + { + struct xgbe_phy_data *phy_data = pdata->phy_data; + +- if (!pdata->vdata->an_cdr_workaround) ++ if (!pdata->debugfs_an_cdr_workaround) + return; + + if (!phy_data->phy_cdr_notrack) +@@ -2739,7 +2742,7 @@ static void xgbe_phy_cdr_notrack(struct xgbe_prv_data *pdata) + { + struct xgbe_phy_data *phy_data = pdata->phy_data; + +- if (!pdata->vdata->an_cdr_workaround) ++ if (!pdata->debugfs_an_cdr_workaround) + return; + + if (phy_data->phy_cdr_notrack) +@@ -2756,13 +2759,13 @@ static void xgbe_phy_cdr_notrack(struct xgbe_prv_data *pdata) + + static void xgbe_phy_kr_training_post(struct xgbe_prv_data *pdata) + { +- if (!pdata->debugfs_cdr_track_early) ++ if (!pdata->debugfs_an_cdr_track_early) + xgbe_phy_cdr_track(pdata); + } + + static void xgbe_phy_kr_training_pre(struct xgbe_prv_data *pdata) + { +- if (pdata->debugfs_cdr_track_early) ++ if (pdata->debugfs_an_cdr_track_early) + xgbe_phy_cdr_track(pdata); + } + +@@ -2785,6 +2788,8 @@ static void xgbe_phy_an_post(struct xgbe_prv_data *pdata) + default: + if (phy_data->phy_cdr_delay < XGBE_CDR_DELAY_MAX) + phy_data->phy_cdr_delay += XGBE_CDR_DELAY_INC; ++ else ++ phy_data->phy_cdr_delay = XGBE_CDR_DELAY_INIT; + break; + } + break; +diff --git a/drivers/net/ethernet/amd/xgbe/xgbe.h b/drivers/net/ethernet/amd/xgbe/xgbe.h +index a9c197c..95d4b56 100755 +--- a/drivers/net/ethernet/amd/xgbe/xgbe.h ++++ b/drivers/net/ethernet/amd/xgbe/xgbe.h +@@ -1264,7 +1264,8 @@ struct xgbe_prv_data { + + unsigned int debugfs_xi2c_reg; + +- bool debugfs_cdr_track_early; ++ bool debugfs_an_cdr_workaround; ++ bool debugfs_an_cdr_track_early; + }; + + /* Function prototypes*/ +-- +2.7.4 + |