[Change and sync linux version from OpenWRT]

[Description]
Change and sync linux version from OpenWRT
1. sync kernel to Openwrt21.02 : v5.4.188
2. sync mtk kernel patch from mtk_feed

[Release-log]
N/A

diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/447-mtd-spinand-gigadevice-Add-support-for-GD5F4GQ4xC.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/447-mtd-spinand-gigadevice-Add-support-for-GD5F4GQ4xC.patch
deleted file mode 100644
index e1fcb15..0000000
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/447-mtd-spinand-gigadevice-Add-support-for-GD5F4GQ4xC.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From 30521ccfb4597f91b9e5c7967acef9c7c85e58a8 Mon Sep 17 00:00:00 2001
-From: Hauke Mehrtens <hauke@hauke-m.de>
-Date: Wed, 12 Aug 2020 22:50:26 +0200
-Subject: [PATCH v2 447/447] mtd: spinand: gigadevice: Add support for
- GD5F4GQ4xC
-
-This adds support for the following 4GiB chips:
-GD5F4GQ4RCYIG 1.8V
-GD5F4GQ4UCYIG 3.3V
-
-The datasheet can be found here:
-https://www.novitronic.ch/sixcms/media.php/2/DS-00173-GD5F4GQ4xCxIG-Rev1.574695.pdf
-
-The GD5F4GQ4UCYIGT (3.3V) version is used on the Imagination
-Technologies Creator Ci40 (Marduk), the 1.8V version was not tested.
-
-This device only works in single SPI mode and not in dual or quad mode
-for me on this board.
-
-Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
----
- drivers/mtd/nand/spi/gigadevice.c | 49 +++++++++++++++++++++++++++++++
- 1 file changed, 49 insertions(+)
-
---- a/drivers/mtd/nand/spi/gigadevice.c
-+++ b/drivers/mtd/nand/spi/gigadevice.c
-@@ -132,6 +132,35 @@ static const struct mtd_ooblayout_ops gd
- 	.free = gd5fxgq4_variant2_ooblayout_free,
- };
- 
-+static int gd5fxgq4xc_ooblayout_256_ecc(struct mtd_info *mtd, int section,
-+					struct mtd_oob_region *oobregion)
-+{
-+	if (section)
-+		return -ERANGE;
-+
-+	oobregion->offset = 128;
-+	oobregion->length = 128;
-+
-+	return 0;
-+}
-+
-+static int gd5fxgq4xc_ooblayout_256_free(struct mtd_info *mtd, int section,
-+					 struct mtd_oob_region *oobregion)
-+{
-+	if (section)
-+		return -ERANGE;
-+
-+	oobregion->offset = 1;
-+	oobregion->length = 127;
-+
-+	return 0;
-+}
-+
-+static const struct mtd_ooblayout_ops gd5fxgq4xc_oob_256_ops = {
-+	.ecc = gd5fxgq4xc_ooblayout_256_ecc,
-+	.free = gd5fxgq4xc_ooblayout_256_free,
-+};
-+
- static int gd5fxgq4uexxg_ecc_get_status(struct spinand_device *spinand,
- 					u8 status)
- {
-@@ -222,6 +251,24 @@ static const struct spinand_info gigadev
- 		     SPINAND_HAS_QE_BIT,
- 		     SPINAND_ECCINFO(&gd5fxgq4xa_ooblayout,
- 				     gd5fxgq4xa_ecc_get_status)),
-+	SPINAND_INFO("GD5F4GQ4RC", 0xa468,
-+		     NAND_MEMORG(1, 4096, 256, 64, 2048, 40, 1, 1, 1),
-+		     NAND_ECCREQ(8, 512),
-+		     SPINAND_INFO_OP_VARIANTS(&read_cache_variants_f,
-+					      &write_cache_variants,
-+					      &update_cache_variants),
-+		     SPINAND_HAS_QE_BIT,
-+		     SPINAND_ECCINFO(&gd5fxgq4xc_oob_256_ops,
-+				     gd5fxgq4ufxxg_ecc_get_status)),
-+	SPINAND_INFO("GD5F4GQ4UC", 0xb468,
-+		     NAND_MEMORG(1, 4096, 256, 64, 2048, 40, 1, 1, 1),
-+		     NAND_ECCREQ(8, 512),
-+		     SPINAND_INFO_OP_VARIANTS(&read_cache_variants_f,
-+					      &write_cache_variants,
-+					      &update_cache_variants),
-+		     SPINAND_HAS_QE_BIT,
-+		     SPINAND_ECCINFO(&gd5fxgq4xc_oob_256_ops,
-+				     gd5fxgq4ufxxg_ecc_get_status)),
- 	SPINAND_INFO("GD5F1GQ4UExxG", 0xd1,
- 		     NAND_MEMORG(1, 2048, 128, 64, 1024, 20, 1, 1, 1),
- 		     NAND_ECCREQ(8, 512),
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/530-jffs2_make_lzma_available.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/530-jffs2_make_lzma_available.patch
index 052db7e..4d47e03 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/530-jffs2_make_lzma_available.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/530-jffs2_make_lzma_available.patch
@@ -1087,7 +1087,7 @@
  #define JFFS2_NODE_ACCURATE 0x2000
 --- a/lib/Kconfig
 +++ b/lib/Kconfig
-@@ -303,6 +303,12 @@ config ZSTD_DECOMPRESS
+@@ -302,6 +302,12 @@ config ZSTD_DECOMPRESS
  
  source "lib/xz/Kconfig"
  
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/630-packet_socket_type.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/630-packet_socket_type.patch
index df1de5a..0e6feec 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/630-packet_socket_type.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/630-packet_socket_type.patch
@@ -87,7 +87,7 @@
  	if (!net_eq(dev_net(dev), sock_net(sk)))
  		goto drop;
  
-@@ -3293,6 +3295,7 @@ static int packet_create(struct net *net
+@@ -3296,6 +3298,7 @@ static int packet_create(struct net *net
  	mutex_init(&po->pg_vec_lock);
  	po->rollover = NULL;
  	po->prot_hook.func = packet_rcv;
@@ -95,7 +95,7 @@
  
  	if (sock->type == SOCK_PACKET)
  		po->prot_hook.func = packet_rcv_spkt;
-@@ -3930,6 +3933,16 @@ packet_setsockopt(struct socket *sock, i
+@@ -3939,6 +3942,16 @@ packet_setsockopt(struct socket *sock, i
  		po->xmit = val ? packet_direct_xmit : dev_queue_xmit;
  		return 0;
  	}
@@ -112,7 +112,7 @@
  	default:
  		return -ENOPROTOOPT;
  	}
-@@ -3986,6 +3999,13 @@ static int packet_getsockopt(struct sock
+@@ -3995,6 +4008,13 @@ static int packet_getsockopt(struct sock
  	case PACKET_VNET_HDR:
  		val = po->has_vnet_hdr;
  		break;
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/739-net-avoid-tx-fault-with-Nokia-GPON-module.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/739-net-avoid-tx-fault-with-Nokia-GPON-module.patch
index 6648d10..4c5f99a 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/739-net-avoid-tx-fault-with-Nokia-GPON-module.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/739-net-avoid-tx-fault-with-Nokia-GPON-module.patch
@@ -47,7 +47,7 @@
  
  #if IS_ENABLED(CONFIG_HWMON)
  	struct sfp_diag diag;
-@@ -1742,6 +1753,12 @@ static int sfp_sm_mod_probe(struct sfp *
+@@ -1750,6 +1761,12 @@ static int sfp_sm_mod_probe(struct sfp *
  	if (ret < 0)
  		return ret;
  
@@ -60,7 +60,7 @@
  	return 0;
  }
  
-@@ -1947,11 +1964,12 @@ static void sfp_sm_main(struct sfp *sfp,
+@@ -1955,11 +1972,12 @@ static void sfp_sm_main(struct sfp *sfp,
  			break;
  
  		if (sfp->state & SFP_F_TX_FAULT) {
@@ -77,7 +77,7 @@
  			if (timeout > T_WAIT)
  				timeout -= T_WAIT;
  			else
-@@ -1968,8 +1986,8 @@ static void sfp_sm_main(struct sfp *sfp,
+@@ -1976,8 +1994,8 @@ static void sfp_sm_main(struct sfp *sfp,
  
  	case SFP_S_INIT:
  		if (event == SFP_E_TIMEOUT && sfp->state & SFP_F_TX_FAULT) {
@@ -88,7 +88,7 @@
  			 */
  			sfp_sm_fault(sfp, SFP_S_INIT_TX_FAULT,
  				     sfp->sm_retries == 5);
-@@ -1988,7 +2006,7 @@ static void sfp_sm_main(struct sfp *sfp,
+@@ -1996,7 +2014,7 @@ static void sfp_sm_main(struct sfp *sfp,
  	case SFP_S_INIT_TX_FAULT:
  		if (event == SFP_E_TIMEOUT) {
  			sfp_module_tx_fault_reset(sfp);
@@ -97,7 +97,7 @@
  		}
  		break;
  
-@@ -2012,7 +2030,7 @@ static void sfp_sm_main(struct sfp *sfp,
+@@ -2020,7 +2038,7 @@ static void sfp_sm_main(struct sfp *sfp,
  	case SFP_S_TX_FAULT:
  		if (event == SFP_E_TIMEOUT) {
  			sfp_module_tx_fault_reset(sfp);
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/740-net-sfp-remove-incomplete-100BASE-FX-and-100BASE-LX-.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/740-net-sfp-remove-incomplete-100BASE-FX-and-100BASE-LX-.patch
index 1abc34e..e439d19 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/740-net-sfp-remove-incomplete-100BASE-FX-and-100BASE-LX-.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/740-net-sfp-remove-incomplete-100BASE-FX-and-100BASE-LX-.patch
@@ -30,7 +30,7 @@
  	if (phylink_test(link_modes, 1000baseX_Full))
 --- a/drivers/net/phy/sfp.c
 +++ b/drivers/net/phy/sfp.c
-@@ -1505,18 +1505,7 @@ static void sfp_sm_fault(struct sfp *sfp
+@@ -1513,18 +1513,7 @@ static void sfp_sm_fault(struct sfp *sfp
  
  static void sfp_sm_probe_for_phy(struct sfp *sfp)
  {
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/743-net-sfp-add-module-start-stop-upstream-notifications.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/743-net-sfp-add-module-start-stop-upstream-notifications.patch
index ba1b5b5..5020013 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/743-net-sfp-add-module-start-stop-upstream-notifications.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/743-net-sfp-add-module-start-stop-upstream-notifications.patch
@@ -78,7 +78,7 @@
  	[SFP_S_WAIT] = "wait",
  	[SFP_S_INIT] = "init",
  	[SFP_S_INIT_TX_FAULT] = "init_tx_fault",
-@@ -1918,6 +1920,8 @@ static void sfp_sm_main(struct sfp *sfp,
+@@ -1926,6 +1928,8 @@ static void sfp_sm_main(struct sfp *sfp,
  		if (sfp->sm_state == SFP_S_LINK_UP &&
  		    sfp->sm_dev_state == SFP_DEV_UP)
  			sfp_sm_link_down(sfp);
@@ -87,7 +87,7 @@
  		if (sfp->mod_phy)
  			sfp_sm_phy_detach(sfp);
  		sfp_module_tx_disable(sfp);
-@@ -1985,6 +1989,10 @@ static void sfp_sm_main(struct sfp *sfp,
+@@ -1993,6 +1997,10 @@ static void sfp_sm_main(struct sfp *sfp,
  			 * clear.  Probe for the PHY and check the LOS state.
  			 */
  			sfp_sm_probe_for_phy(sfp);
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/753-net-sfp-add-support-for-Clause-45-PHYs.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/753-net-sfp-add-support-for-Clause-45-PHYs.patch
index dcd1ba7..f7c4bc1 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/753-net-sfp-add-support-for-Clause-45-PHYs.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/753-net-sfp-add-support-for-Clause-45-PHYs.patch
@@ -43,7 +43,7 @@
  	err = sfp_add_phy(sfp->sfp_bus, phy);
  	if (err) {
  		phy_device_remove(phy);
-@@ -1503,10 +1510,32 @@ static void sfp_sm_fault(struct sfp *sfp
+@@ -1511,10 +1518,32 @@ static void sfp_sm_fault(struct sfp *sfp
  	}
  }
  
@@ -78,7 +78,7 @@
  }
  
  static int sfp_module_parse_power(struct sfp *sfp)
-@@ -1566,6 +1595,13 @@ static int sfp_sm_mod_hpower(struct sfp
+@@ -1574,6 +1603,13 @@ static int sfp_sm_mod_hpower(struct sfp
  		return -EAGAIN;
  	}
  
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/754-net-sfp-fix-unbind.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/754-net-sfp-fix-unbind.patch
index c31922e..6872973 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/754-net-sfp-fix-unbind.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/754-net-sfp-fix-unbind.patch
@@ -15,7 +15,7 @@
 
 --- a/drivers/net/phy/sfp.c
 +++ b/drivers/net/phy/sfp.c
-@@ -2431,6 +2431,10 @@ static int sfp_remove(struct platform_de
+@@ -2439,6 +2439,10 @@ static int sfp_remove(struct platform_de
  
  	sfp_unregister_socket(sfp->sfp_bus);
  
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/755-net-sfp-fix-hwmon.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/755-net-sfp-fix-hwmon.patch
index a18e480..be3b19b 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/755-net-sfp-fix-hwmon.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/755-net-sfp-fix-hwmon.patch
@@ -15,7 +15,7 @@
 
 --- a/drivers/net/phy/sfp.c
 +++ b/drivers/net/phy/sfp.c
-@@ -1883,6 +1883,10 @@ static void sfp_sm_module(struct sfp *sf
+@@ -1891,6 +1891,10 @@ static void sfp_sm_module(struct sfp *sf
  			break;
  		}
  
@@ -26,7 +26,7 @@
  		sfp_sm_mod_next(sfp, SFP_MOD_WAITDEV, 0);
  		/* fall through */
  	case SFP_MOD_WAITDEV:
-@@ -1932,15 +1936,6 @@ static void sfp_sm_module(struct sfp *sf
+@@ -1940,15 +1944,6 @@ static void sfp_sm_module(struct sfp *sf
  	case SFP_MOD_ERROR:
  		break;
  	}
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/756-net-sfp-use-a-definition-for-the-fault-recovery-atte.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/756-net-sfp-use-a-definition-for-the-fault-recovery-atte.patch
index ba4f8c4..c8e3cf5 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/756-net-sfp-use-a-definition-for-the-fault-recovery-atte.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/756-net-sfp-use-a-definition-for-the-fault-recovery-atte.patch
@@ -26,7 +26,7 @@
  /* SFP module presence detection is poor: the three MOD DEF signals are
   * the same length on the PCB, which means it's possible for MOD DEF 0 to
   * connect before the I2C bus on MOD DEF 1/2.
-@@ -1972,7 +1980,7 @@ static void sfp_sm_main(struct sfp *sfp,
+@@ -1980,7 +1988,7 @@ static void sfp_sm_main(struct sfp *sfp,
  		sfp_module_tx_enable(sfp);
  
  		/* Initialise the fault clearance retries */
@@ -35,7 +35,7 @@
  
  		/* We need to check the TX_FAULT state, which is not defined
  		 * while TX_DISABLE is asserted. The earliest we want to do
-@@ -2012,7 +2020,7 @@ static void sfp_sm_main(struct sfp *sfp,
+@@ -2020,7 +2028,7 @@ static void sfp_sm_main(struct sfp *sfp,
  			 * or t_start_up, so assume there is a fault.
  			 */
  			sfp_sm_fault(sfp, SFP_S_INIT_TX_FAULT,
@@ -44,7 +44,7 @@
  		} else if (event == SFP_E_TIMEOUT || event == SFP_E_TX_CLEAR) {
  	init_done:	/* TX_FAULT deasserted or we timed out with TX_FAULT
  			 * clear.  Probe for the PHY and check the LOS state.
-@@ -2025,7 +2033,7 @@ static void sfp_sm_main(struct sfp *sfp,
+@@ -2033,7 +2041,7 @@ static void sfp_sm_main(struct sfp *sfp,
  			sfp_sm_link_check_los(sfp);
  
  			/* Reset the fault retry count */
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/757-net-sfp-rename-sm_retries.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/757-net-sfp-rename-sm_retries.patch
index 13f3b6c..a8d3f32 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/757-net-sfp-rename-sm_retries.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/757-net-sfp-rename-sm_retries.patch
@@ -22,7 +22,7 @@
  
  	struct sfp_eeprom_id id;
  	unsigned int module_power_mW;
-@@ -1506,7 +1506,7 @@ static bool sfp_los_event_inactive(struc
+@@ -1514,7 +1514,7 @@ static bool sfp_los_event_inactive(struc
  
  static void sfp_sm_fault(struct sfp *sfp, unsigned int next_state, bool warn)
  {
@@ -31,7 +31,7 @@
  		dev_err(sfp->dev,
  			"module persistently indicates fault, disabling\n");
  		sfp_sm_next(sfp, SFP_S_TX_DISABLE, 0);
-@@ -1980,7 +1980,7 @@ static void sfp_sm_main(struct sfp *sfp,
+@@ -1988,7 +1988,7 @@ static void sfp_sm_main(struct sfp *sfp,
  		sfp_module_tx_enable(sfp);
  
  		/* Initialise the fault clearance retries */
@@ -40,7 +40,7 @@
  
  		/* We need to check the TX_FAULT state, which is not defined
  		 * while TX_DISABLE is asserted. The earliest we want to do
-@@ -2020,7 +2020,7 @@ static void sfp_sm_main(struct sfp *sfp,
+@@ -2028,7 +2028,7 @@ static void sfp_sm_main(struct sfp *sfp,
  			 * or t_start_up, so assume there is a fault.
  			 */
  			sfp_sm_fault(sfp, SFP_S_INIT_TX_FAULT,
@@ -49,7 +49,7 @@
  		} else if (event == SFP_E_TIMEOUT || event == SFP_E_TX_CLEAR) {
  	init_done:	/* TX_FAULT deasserted or we timed out with TX_FAULT
  			 * clear.  Probe for the PHY and check the LOS state.
-@@ -2033,7 +2033,7 @@ static void sfp_sm_main(struct sfp *sfp,
+@@ -2041,7 +2041,7 @@ static void sfp_sm_main(struct sfp *sfp,
  			sfp_sm_link_check_los(sfp);
  
  			/* Reset the fault retry count */
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/758-net-sfp-error-handling-for-phy-probe.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/758-net-sfp-error-handling-for-phy-probe.patch
index dfa772d..5964ed5 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/758-net-sfp-error-handling-for-phy-probe.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/758-net-sfp-error-handling-for-phy-probe.patch
@@ -55,7 +55,7 @@
  }
  
  static void sfp_sm_link_up(struct sfp *sfp)
-@@ -1529,21 +1531,24 @@ static void sfp_sm_fault(struct sfp *sfp
+@@ -1537,21 +1539,24 @@ static void sfp_sm_fault(struct sfp *sfp
   * Clause 45 copper SFP+ modules (10G) appear to switch their interface
   * mode according to the negotiated line speed.
   */
@@ -83,7 +83,7 @@
  }
  
  static int sfp_module_parse_power(struct sfp *sfp)
-@@ -2025,7 +2030,10 @@ static void sfp_sm_main(struct sfp *sfp,
+@@ -2033,7 +2038,10 @@ static void sfp_sm_main(struct sfp *sfp,
  	init_done:	/* TX_FAULT deasserted or we timed out with TX_FAULT
  			 * clear.  Probe for the PHY and check the LOS state.
  			 */
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/759-net-sfp-re-attempt-probing-for-phy.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/759-net-sfp-re-attempt-probing-for-phy.patch
index aebb6b0..27e2187 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/759-net-sfp-re-attempt-probing-for-phy.patch
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/759-net-sfp-re-attempt-probing-for-phy.patch
@@ -69,7 +69,7 @@
  	if (IS_ERR(phy)) {
  		dev_err(sfp->dev, "mdiobus scan returned %ld\n", PTR_ERR(phy));
  		return PTR_ERR(phy);
-@@ -1954,6 +1961,7 @@ static void sfp_sm_module(struct sfp *sf
+@@ -1962,6 +1969,7 @@ static void sfp_sm_module(struct sfp *sf
  static void sfp_sm_main(struct sfp *sfp, unsigned int event)
  {
  	unsigned long timeout;
@@ -77,7 +77,7 @@
  
  	/* Some events are global */
  	if (sfp->sm_state != SFP_S_DOWN &&
-@@ -2027,22 +2035,39 @@ static void sfp_sm_main(struct sfp *sfp,
+@@ -2035,22 +2043,39 @@ static void sfp_sm_main(struct sfp *sfp,
  			sfp_sm_fault(sfp, SFP_S_INIT_TX_FAULT,
  				     sfp->sm_fault_retries == N_FAULT_INIT);
  		} else if (event == SFP_E_TIMEOUT || event == SFP_E_TX_CLEAR) {
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/771-net-sfp-add-mode-quirk-Ubiquiti-UFiber-Instant.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/771-net-sfp-add-mode-quirk-Ubiquiti-UFiber-Instant.patch
new file mode 100644
index 0000000..e48b474
--- /dev/null
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/771-net-sfp-add-mode-quirk-Ubiquiti-UFiber-Instant.patch
@@ -0,0 +1,93 @@
+From f0b4f847673299577c29b71d3f3acd3c313d81b7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali@kernel.org>
+Date: Mon, 25 Jan 2021 16:02:28 +0100
+Subject: net: sfp: add mode quirk for GPON module Ubiquiti U-Fiber Instant
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The Ubiquiti U-Fiber Instant SFP GPON module has nonsensical information
+stored in its EEPROM. It claims to support all transceiver types including
+10G Ethernet. Clear all claimed modes and set only 1000baseX_Full, which is
+the only one supported.
+
+This module has also phys_id set to SFF, and the SFP subsystem currently
+does not allow to use SFP modules detected as SFFs. Add exception for this
+module so it can be detected as supported.
+
+This change finally allows to detect and use SFP GPON module Ubiquiti
+U-Fiber Instant on Linux system.
+
+EEPROM content of this SFP module is (where XX is serial number):
+
+00: 02 04 0b ff ff ff ff ff ff ff ff 03 0c 00 14 c8    ???........??.??
+10: 00 00 00 00 55 42 4e 54 20 20 20 20 20 20 20 20    ....UBNT
+20: 20 20 20 20 00 18 e8 29 55 46 2d 49 4e 53 54 41        .??)UF-INSTA
+30: 4e 54 20 20 20 20 20 20 34 20 20 20 05 1e 00 36    NT      4   ??.6
+40: 00 06 00 00 55 42 4e 54 XX XX XX XX XX XX XX XX    .?..UBNTXXXXXXXX
+50: 20 20 20 20 31 34 30 31 32 33 20 20 60 80 02 41        140123  `??A
+
+Signed-off-by: Pali Rohár <pali@kernel.org>
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+---
+ drivers/net/phy/sfp-bus.c | 15 +++++++++++++++
+ drivers/net/phy/sfp.c     | 17 +++++++++++++++--
+ 2 files changed, 30 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/phy/sfp-bus.c
++++ b/drivers/net/phy/sfp-bus.c
+@@ -44,6 +44,17 @@ static void sfp_quirk_2500basex(const st
+ 	phylink_set(modes, 2500baseX_Full);
+ }
+ 
++static void sfp_quirk_ubnt_uf_instant(const struct sfp_eeprom_id *id,
++				      unsigned long *modes)
++{
++	/* Ubiquiti U-Fiber Instant module claims that support all transceiver
++	 * types including 10G Ethernet which is not truth. So clear all claimed
++	 * modes and set only one mode which module supports: 1000baseX_Full.
++	 */
++	phylink_zero(modes);
++	phylink_set(modes, 1000baseX_Full);
++}
++
+ static const struct sfp_quirk sfp_quirks[] = {
+ 	{
+ 		// Alcatel Lucent G-010S-P can operate at 2500base-X, but
+@@ -63,6 +74,10 @@ static const struct sfp_quirk sfp_quirks
+ 		.vendor = "HUAWEI",
+ 		.part = "MA5671A",
+ 		.modes = sfp_quirk_2500basex,
++	}, {
++		.vendor = "UBNT",
++		.part = "UF-INSTANT",
++		.modes = sfp_quirk_ubnt_uf_instant,
+ 	},
+ };
+ 
+--- a/drivers/net/phy/sfp.c
++++ b/drivers/net/phy/sfp.c
+@@ -273,8 +273,21 @@ static const struct sff_data sff_data =
+ 
+ static bool sfp_module_supported(const struct sfp_eeprom_id *id)
+ {
+-	return id->base.phys_id == SFF8024_ID_SFP &&
+-	       id->base.phys_ext_id == SFP_PHYS_EXT_ID_SFP;
++	if (id->base.phys_id == SFF8024_ID_SFP &&
++	    id->base.phys_ext_id == SFP_PHYS_EXT_ID_SFP)
++		return true;
++
++	/* SFP GPON module Ubiquiti U-Fiber Instant has in its EEPROM stored
++	 * phys id SFF instead of SFP. Therefore mark this module explicitly
++	 * as supported based on vendor name and pn match.
++	 */
++	if (id->base.phys_id == SFF8024_ID_SFF_8472 &&
++	    id->base.phys_ext_id == SFP_PHYS_EXT_ID_SFP &&
++	    !memcmp(id->base.vendor_name, "UBNT            ", 16) &&
++	    !memcmp(id->base.vendor_pn, "UF-INSTANT      ", 16))
++		return true;
++
++	return false;
+ }
+ 
+ static const struct sff_data sfp_data = {
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/772-net-sfp-relax-bitrate-devided-check.patch b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/772-net-sfp-relax-bitrate-devided-check.patch
new file mode 100644
index 0000000..672d2d0
--- /dev/null
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/772-net-sfp-relax-bitrate-devided-check.patch
@@ -0,0 +1,44 @@
+From 7a77233ec6d114322e2c4f71b4e26dbecd9ea8a7 Mon Sep 17 00:00:00 2001
+From: Russell King <rmk+kernel@armlinux.org.uk>
+Date: Wed, 9 Dec 2020 11:22:54 +0000
+Subject: net: sfp: relax bitrate-derived mode check
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Do not check the encoding when deriving 1000BASE-X from the bitrate
+when no other modes are discovered. Some GPON modules (VSOL V2801F
+and CarlitoxxPro CPGOS03-0490 v2.0) indicate NRZ encoding with a
+1200Mbaud bitrate, but should be driven with 1000BASE-X on the host
+side.
+
+Tested-by: Pali Rohár <pali@kernel.org>
+Reviewed-by: Andrew Lunn <andrew@lunn.ch>
+Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+---
+ drivers/net/phy/sfp-bus.c | 11 +++++------
+ 1 file changed, 5 insertions(+), 6 deletions(-)
+
+--- a/drivers/net/phy/sfp-bus.c
++++ b/drivers/net/phy/sfp-bus.c
+@@ -349,14 +349,13 @@ void sfp_parse_support(struct sfp_bus *b
+ 	}
+ 
+ 	/* If we haven't discovered any modes that this module supports, try
+-	 * the encoding and bitrate to determine supported modes. Some BiDi
+-	 * modules (eg, 1310nm/1550nm) are not 1000BASE-BX compliant due to
+-	 * the differing wavelengths, so do not set any transceiver bits.
++	 * the bitrate to determine supported modes. Some BiDi modules (eg,
++	 * 1310nm/1550nm) are not 1000BASE-BX compliant due to the differing
++	 * wavelengths, so do not set any transceiver bits.
+ 	 */
+ 	if (bitmap_empty(modes, __ETHTOOL_LINK_MODE_MASK_NBITS)) {
+-		/* If the encoding and bit rate allows 1000baseX */
+-		if (id->base.encoding == SFF8024_ENCODING_8B10B && br_nom &&
+-		    br_min <= 1300 && br_max >= 1200)
++		/* If the bit rate allows 1000baseX */
++		if (br_nom && br_min <= 1300 && br_max >= 1200)
+ 			phylink_set(modes, 1000baseX_Full);
+ 	}
+ 
diff --git a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/pending-5.4.inc b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/pending-5.4.inc
index 620dca6..dd5eed0 100644
--- a/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/pending-5.4.inc
+++ b/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4/pending-5.4.inc
@@ -44,7 +44,6 @@
     file://431-mtd-bcm47xxpart-check-for-bad-blocks-when-calculatin.patch \
     file://432-mtd-bcm47xxpart-detect-T_Meter-partition.patch \
     file://435-mtd-add-routerbootpart-parser-config.patch \
-    file://447-mtd-spinand-gigadevice-Add-support-for-GD5F4GQ4xC.patch \
     file://450-mtd-spi-nor-allow-NOR-driver-to-write-fewer-bytes-th.patch \
     file://460-mtd-cfi_cmdset_0002-no-erase_suspend.patch \
     file://461-mtd-cfi_cmdset_0002-add-buffer-write-cmd-timeout.patch \
@@ -122,6 +121,8 @@
     file://766-net-dsa-Include-bridge-addresses-in-assisted-CPU-por.patch \
     file://767-net-dsa-Sync-static-FDB-entries-on-foreign-interface.patch \
     file://768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch \
+    file://771-net-sfp-add-mode-quirk-Ubiquiti-UFiber-Instant.patch \
+    file://772-net-sfp-relax-bitrate-devided-check.patch \
     file://800-bcma-get-SoC-device-struct-copy-its-DMA-params-to-th.patch \
     file://810-pci_disable_common_quirks.patch \
     file://811-pci_disable_usb_common_quirks.patch \