diff options
Diffstat (limited to 'recipes-kernel/linux/linux-at91-5.4.243/linux-5.4-bring-back-PAE-bit-and-fix-NCFGR-values-applicable-f.patch')
-rw-r--r-- | recipes-kernel/linux/linux-at91-5.4.243/linux-5.4-bring-back-PAE-bit-and-fix-NCFGR-values-applicable-f.patch | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-at91-5.4.243/linux-5.4-bring-back-PAE-bit-and-fix-NCFGR-values-applicable-f.patch b/recipes-kernel/linux/linux-at91-5.4.243/linux-5.4-bring-back-PAE-bit-and-fix-NCFGR-values-applicable-f.patch new file mode 100644 index 0000000..9412a69 --- /dev/null +++ b/recipes-kernel/linux/linux-at91-5.4.243/linux-5.4-bring-back-PAE-bit-and-fix-NCFGR-values-applicable-f.patch @@ -0,0 +1,49 @@ +From 0e6345082a283075a68d6a9e6fca917f48aaccc2 Mon Sep 17 00:00:00 2001 +From: Mykyta Dorokhin <mykyta.dorokhin@globallogic.com> +Date: Thu, 4 Feb 2021 17:29:38 +0200 +Subject: [PATCH] Bring back PAE bit and fix NCFGR values applicable for GEM only + +--- + drivers/net/ethernet/cadence/macb_main.c | 18 +++++++++++++----- + 1 file changed, 13 insertions(+), 5 deletions(-) + +diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c +index a5068d3..6bac7e1 100644 +--- a/drivers/net/ethernet/cadence/macb_main.c ++++ b/drivers/net/ethernet/cadence/macb_main.c +@@ -572,12 +572,17 @@ static void macb_mac_config(struct phylink_config *config, unsigned int mode, + old_ctrl = ctrl = macb_or_gem_readl(bp, NCFGR); + + /* Clear all the bits we might set later */ +- ctrl &= ~(GEM_BIT(GBE) | MACB_BIT(SPD) | MACB_BIT(FD) | MACB_BIT(PAE) | +- GEM_BIT(SGMIIEN) | GEM_BIT(PCSSEL)); ++ ctrl &= ~(MACB_BIT(SPD) | MACB_BIT(FD) | MACB_BIT(PAE)); + +- if (state->speed == SPEED_1000) +- ctrl |= GEM_BIT(GBE); +- else if (state->speed == SPEED_100) ++ if (macb_is_gem(bp)) { ++ ctrl &= ~(GEM_BIT(GBE) | GEM_BIT(SGMIIEN) | GEM_BIT(PCSSEL)); ++ } ++ ++ if (macb_is_gem(bp)) ++ if (state->speed == SPEED_1000) ++ ctrl |= GEM_BIT(GBE); ++ ++ if (state->speed == SPEED_100) + ctrl |= MACB_BIT(SPD); + + if (state->duplex) +@@ -2362,6 +2367,9 @@ static void macb_init_hw(struct macb *bp) + config = macb_mdc_clk_div(bp); + config |= MACB_BF(RBOF, NET_IP_ALIGN); /* Make eth data aligned */ + config |= MACB_BIT(DRFCS); /* Discard Rx FCS */ ++ if (!macb_is_gem(bp)) { ++ config |= MACB_BIT(PAE); /* PAuse Enable */ ++ } + if (bp->caps & MACB_CAPS_JUMBO) + config |= MACB_BIT(JFRAME); /* Enable jumbo frames */ + else +-- +1.9.1 + |