From 41a881a8d9e7dc33b28768a8377ec67a7f8a0aae Mon Sep 17 00:00:00 2001 From: Stijn Segers Date: Thu, 22 Mar 2018 18:34:08 +0100 Subject: [PATCH] Kernel: bump 4.14 to 4.14.29 Right patch version this time, sorry! * Patch 180-usb-xhci-add-support-for-performing-fake-doorbell.patch had to be adjusted slightly because of upstream adapted code. * Refreshed patches. Compile-tested: ramips/mt7621, x86/64 Run-tested: ramips/mt7621, x86/64 Signed-off-by: Stijn Segers Tested-by: Rosen Penev --- include/kernel-version.mk | 4 +- ...mware-loader-for-uPD720201-and-uPD72.patch | 6 +- .../802-usb-xhci-force-msi-renesas-xhci.patch | 4 +- ...support-for-performing-fake-doorbell.patch | 4 +- ...w_table-fix-offloading-connections-w.patch | 2 +- .../661-use_fq_codel_by_default.patch | 2 +- .../702-phy_add_aneg_done_function.patch | 2 +- .../hack-4.14/904-debloat_dma_buf.patch | 4 +- ...et-phy-at803x-add-support-for-AT8032.patch | 8 +- .../pending-4.14/701-phy_extension.patch | 2 +- ...-at803x-allow-to-configure-via-pdata.patch | 8 +- ...net-phy-at803x-fix-at8033-sgmii-mode.patch | 2 +- ...ndard-large-page-OOB-layout-when-usi.patch | 2 +- ...ual-return-values-for-the-erase-hook.patch | 4 +- ...-several-helpers-to-do-common-NAND-o.patch | 88 +++++++++---------- .../patches-4.14/0052-net-phy-add-FC.patch | 2 +- .../0034-NET-multi-phy-support.patch | 6 +- .../0039-mtd-add-mt7621-nand-support.patch | 2 +- .../0040-nand-hack-restore-write_page.patch | 4 +- .../ramips/patches-4.14/0040-nand-hack.patch | 8 +- 20 files changed, 82 insertions(+), 82 deletions(-) diff --git a/include/kernel-version.mk b/include/kernel-version.mk index b289e03c7c..9a02bcb9f6 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -5,12 +5,12 @@ LINUX_RELEASE?=1 LINUX_VERSION-3.18 = .71 LINUX_VERSION-4.4 = .121 LINUX_VERSION-4.9 = .87 -LINUX_VERSION-4.14 = .27 +LINUX_VERSION-4.14 = .29 LINUX_KERNEL_HASH-3.18.71 = 5abc9778ad44ce02ed6c8ab52ece8a21c6d20d21f6ed8a19287b4a38a50c1240 LINUX_KERNEL_HASH-4.4.121 = 44a88268b5088dc326b30c9b9133ac35a9a200b636b7268d08f32abeae6ca729 LINUX_KERNEL_HASH-4.9.87 = 7ac9f6af69dc5a7e38bf35cc3fa889e3a4b22504a85f57fdc87734a8abe4c917 -LINUX_KERNEL_HASH-4.14.27 = 0911a449c71a06c7232ece07dfcc041bd07efaf7e67799b9e2d0cf4bd9a028ea +LINUX_KERNEL_HASH-4.14.29 = 18f67b70ce9922c7ef95791bfd91f46e52ee9eb3e310978bb6ef6d2e93c14619 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))))))) diff --git a/target/linux/apm821xx/patches-4.14/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch b/target/linux/apm821xx/patches-4.14/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch index 144a06970f..49304ef870 100644 --- a/target/linux/apm821xx/patches-4.14/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch +++ b/target/linux/apm821xx/patches-4.14/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch @@ -44,7 +44,7 @@ Signed-off-by: Christian Lamparter #include "xhci.h" #include "xhci-trace.h" -@@ -238,6 +240,458 @@ static void xhci_pme_acpi_rtd3_enable(st +@@ -241,6 +243,458 @@ static void xhci_pme_acpi_rtd3_enable(st static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev) { } #endif /* CONFIG_ACPI */ @@ -503,7 +503,7 @@ Signed-off-by: Christian Lamparter /* called during probe() after chip reset completes */ static int xhci_pci_setup(struct usb_hcd *hcd) { -@@ -273,6 +727,22 @@ static int xhci_pci_probe(struct pci_dev +@@ -276,6 +730,22 @@ static int xhci_pci_probe(struct pci_dev struct hc_driver *driver; struct usb_hcd *hcd; @@ -526,7 +526,7 @@ Signed-off-by: Christian Lamparter driver = (struct hc_driver *)id->driver_data; /* For some HW implementation, a XHCI reset is just not enough... */ -@@ -337,6 +807,16 @@ static void xhci_pci_remove(struct pci_d +@@ -340,6 +810,16 @@ static void xhci_pci_remove(struct pci_d { struct xhci_hcd *xhci; diff --git a/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch b/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch index ec97f16e27..ae05d291f3 100644 --- a/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch +++ b/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch @@ -13,7 +13,7 @@ produce a noisy warning. --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -196,7 +196,7 @@ static void xhci_pci_quirks(struct devic +@@ -199,7 +199,7 @@ static void xhci_pci_quirks(struct devic xhci->quirks |= XHCI_TRUST_TX_LENGTH; if (pdev->vendor == PCI_VENDOR_ID_RENESAS && pdev->device == 0x0015) @@ -44,7 +44,7 @@ produce a noisy warning. hcd->msi_enabled = 1; --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1848,6 +1848,7 @@ struct xhci_hcd { +@@ -1850,6 +1850,7 @@ struct xhci_hcd { /* support xHCI 0.96 spec USB2 software LPM */ unsigned sw_lpm_support:1; /* support xHCI 1.0 spec USB2 hardware LPM */ diff --git a/target/linux/bcm53xx/patches-4.14/180-usb-xhci-add-support-for-performing-fake-doorbell.patch b/target/linux/bcm53xx/patches-4.14/180-usb-xhci-add-support-for-performing-fake-doorbell.patch index ec2df9125f..9f58370a18 100644 --- a/target/linux/bcm53xx/patches-4.14/180-usb-xhci-add-support-for-performing-fake-doorbell.patch +++ b/target/linux/bcm53xx/patches-4.14/180-usb-xhci-add-support-for-performing-fake-doorbell.patch @@ -127,11 +127,11 @@ it on BCM4708 family. /* --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1830,6 +1830,7 @@ struct xhci_hcd { +@@ -1831,6 +1831,7 @@ struct xhci_hcd { #define XHCI_LIMIT_ENDPOINT_INTERVAL_7 (1 << 26) /* Reserved. It was XHCI_U2_DISABLE_WAKE */ #define XHCI_ASMEDIA_MODIFY_FLOWCONTROL (1 << 28) +#define XHCI_FAKE_DOORBELL (1 << 29) + #define XHCI_SUSPEND_DELAY (1 << 30) unsigned int num_active_eps; - unsigned int limit_active_eps; diff --git a/target/linux/generic/backport-4.14/368-netfilter-nf_flow_table-fix-offloading-connections-w.patch b/target/linux/generic/backport-4.14/368-netfilter-nf_flow_table-fix-offloading-connections-w.patch index 28c3817c70..f3d83a1536 100644 --- a/target/linux/generic/backport-4.14/368-netfilter-nf_flow_table-fix-offloading-connections-w.patch +++ b/target/linux/generic/backport-4.14/368-netfilter-nf_flow_table-fix-offloading-connections-w.patch @@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau --- a/net/netfilter/nf_flow_table_core.c +++ b/net/netfilter/nf_flow_table_core.c -@@ -83,7 +83,7 @@ flow_offload_alloc(struct nf_conn *ct, s +@@ -84,7 +84,7 @@ flow_offload_alloc(struct nf_conn *ct, s if (ct->status & IPS_SRC_NAT) flow->flags |= FLOW_OFFLOAD_SNAT; diff --git a/target/linux/generic/hack-4.14/661-use_fq_codel_by_default.patch b/target/linux/generic/hack-4.14/661-use_fq_codel_by_default.patch index 5b61d74672..7c724c0af7 100644 --- a/target/linux/generic/hack-4.14/661-use_fq_codel_by_default.patch +++ b/target/linux/generic/hack-4.14/661-use_fq_codel_by_default.patch @@ -83,7 +83,7 @@ Signed-off-by: Felix Fietkau EXPORT_SYMBOL(default_qdisc_ops); /* Main transmission queue. */ -@@ -764,7 +764,7 @@ static void attach_one_default_qdisc(str +@@ -760,7 +760,7 @@ static void attach_one_default_qdisc(str void *_unused) { struct Qdisc *qdisc; diff --git a/target/linux/generic/hack-4.14/702-phy_add_aneg_done_function.patch b/target/linux/generic/hack-4.14/702-phy_add_aneg_done_function.patch index 9c249ca4ce..61e460fda7 100644 --- a/target/linux/generic/hack-4.14/702-phy_add_aneg_done_function.patch +++ b/target/linux/generic/hack-4.14/702-phy_add_aneg_done_function.patch @@ -15,7 +15,7 @@ --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -1437,6 +1437,9 @@ int genphy_update_link(struct phy_device +@@ -1451,6 +1451,9 @@ int genphy_update_link(struct phy_device { int status; diff --git a/target/linux/generic/hack-4.14/904-debloat_dma_buf.patch b/target/linux/generic/hack-4.14/904-debloat_dma_buf.patch index 44d10b0d52..e715909339 100644 --- a/target/linux/generic/hack-4.14/904-debloat_dma_buf.patch +++ b/target/linux/generic/hack-4.14/904-debloat_dma_buf.patch @@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau + tristate default n select ANON_INODES - help + select IRQ_WORK --- a/drivers/dma-buf/Makefile +++ b/drivers/dma-buf/Makefile @@ -1,3 +1,7 @@ @@ -54,7 +54,7 @@ Signed-off-by: Felix Fietkau +MODULE_LICENSE("GPL"); --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -2146,6 +2146,7 @@ int wake_up_state(struct task_struct *p, +@@ -2147,6 +2147,7 @@ int wake_up_state(struct task_struct *p, { return try_to_wake_up(p, state, 0); } diff --git a/target/linux/generic/pending-4.14/180-net-phy-at803x-add-support-for-AT8032.patch b/target/linux/generic/pending-4.14/180-net-phy-at803x-add-support-for-AT8032.patch index 3b1a41a23b..86a03f2256 100644 --- a/target/linux/generic/pending-4.14/180-net-phy-at803x-add-support-for-AT8032.patch +++ b/target/linux/generic/pending-4.14/180-net-phy-at803x-add-support-for-AT8032.patch @@ -16,7 +16,7 @@ Signed-off-by: Felix Fietkau #define ATH8035_PHY_ID 0x004dd072 #define AT803X_PHY_ID_MASK 0xffffffef -@@ -260,7 +261,8 @@ static int at803x_probe(struct phy_devic +@@ -256,7 +257,8 @@ static int at803x_probe(struct phy_devic if (!priv) return -ENOMEM; @@ -26,7 +26,7 @@ Signed-off-by: Felix Fietkau goto does_not_require_reset_workaround; gpiod_reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW); -@@ -336,7 +338,7 @@ static void at803x_link_change_notify(st +@@ -332,7 +334,7 @@ static void at803x_link_change_notify(st struct at803x_priv *priv = phydev->priv; /* @@ -35,7 +35,7 @@ Signed-off-by: Felix Fietkau * signalled. This is necessary to circumvent a hardware bug that * occurs when the cable is unplugged while TX packets are pending * in the FIFO. In such cases, the FIFO enters an error mode it -@@ -448,6 +450,24 @@ static struct phy_driver at803x_driver[] +@@ -444,6 +446,24 @@ static struct phy_driver at803x_driver[] .aneg_done = at803x_aneg_done, .ack_interrupt = &at803x_ack_interrupt, .config_intr = &at803x_config_intr, @@ -60,7 +60,7 @@ Signed-off-by: Felix Fietkau } }; module_phy_driver(at803x_driver); -@@ -455,6 +475,7 @@ module_phy_driver(at803x_driver); +@@ -451,6 +471,7 @@ module_phy_driver(at803x_driver); static struct mdio_device_id __maybe_unused atheros_tbl[] = { { ATH8030_PHY_ID, AT803X_PHY_ID_MASK }, { ATH8031_PHY_ID, AT803X_PHY_ID_MASK }, diff --git a/target/linux/generic/pending-4.14/701-phy_extension.patch b/target/linux/generic/pending-4.14/701-phy_extension.patch index 1b380e24a9..2529505801 100644 --- a/target/linux/generic/pending-4.14/701-phy_extension.patch +++ b/target/linux/generic/pending-4.14/701-phy_extension.patch @@ -85,7 +85,7 @@ Signed-off-by: John Crispin * @phydev: the phy_device struct --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -905,6 +905,7 @@ void phy_ethtool_ksettings_get(struct ph +@@ -906,6 +906,7 @@ void phy_ethtool_ksettings_get(struct ph struct ethtool_link_ksettings *cmd); int phy_ethtool_ksettings_set(struct phy_device *phydev, const struct ethtool_link_ksettings *cmd); diff --git a/target/linux/generic/pending-4.14/734-net-phy-at803x-allow-to-configure-via-pdata.patch b/target/linux/generic/pending-4.14/734-net-phy-at803x-allow-to-configure-via-pdata.patch index 19dea170c3..a217f750bc 100644 --- a/target/linux/generic/pending-4.14/734-net-phy-at803x-allow-to-configure-via-pdata.patch +++ b/target/linux/generic/pending-4.14/734-net-phy-at803x-allow-to-configure-via-pdata.patch @@ -48,7 +48,7 @@ Signed-off-by: Gabor Juhos }; struct at803x_context { -@@ -277,8 +285,16 @@ does_not_require_reset_workaround: +@@ -273,8 +281,16 @@ does_not_require_reset_workaround: return 0; } @@ -65,7 +65,7 @@ Signed-off-by: Gabor Juhos int ret; ret = genphy_config_init(phydev); -@@ -299,6 +315,26 @@ static int at803x_config_init(struct phy +@@ -295,6 +311,26 @@ static int at803x_config_init(struct phy return ret; } @@ -92,7 +92,7 @@ Signed-off-by: Gabor Juhos return 0; } -@@ -336,6 +372,8 @@ static int at803x_config_intr(struct phy +@@ -332,6 +368,8 @@ static int at803x_config_intr(struct phy static void at803x_link_change_notify(struct phy_device *phydev) { struct at803x_priv *priv = phydev->priv; @@ -101,7 +101,7 @@ Signed-off-by: Gabor Juhos /* * Conduct a hardware reset for AT8030/2 every time a link loss is -@@ -364,6 +402,24 @@ static void at803x_link_change_notify(st +@@ -360,6 +398,24 @@ static void at803x_link_change_notify(st } else { priv->phy_reset = false; } diff --git a/target/linux/generic/pending-4.14/735-net-phy-at803x-fix-at8033-sgmii-mode.patch b/target/linux/generic/pending-4.14/735-net-phy-at803x-fix-at8033-sgmii-mode.patch index 3c686623b9..9a2f93a6f2 100644 --- a/target/linux/generic/pending-4.14/735-net-phy-at803x-fix-at8033-sgmii-mode.patch +++ b/target/linux/generic/pending-4.14/735-net-phy-at803x-fix-at8033-sgmii-mode.patch @@ -24,7 +24,7 @@ Signed-off-by: Roman Yeryomin #define AT803X_MODE_CFG_MASK 0x0F #define AT803X_MODE_CFG_SGMII 0x01 -@@ -296,6 +300,27 @@ static int at803x_config_init(struct phy +@@ -292,6 +296,27 @@ static int at803x_config_init(struct phy { struct at803x_platform_data *pdata; int ret; diff --git a/target/linux/ipq40xx/patches-4.14/030-mtd-nand-Use-standard-large-page-OOB-layout-when-usi.patch b/target/linux/ipq40xx/patches-4.14/030-mtd-nand-Use-standard-large-page-OOB-layout-when-usi.patch index 479a890bb4..67dee70927 100644 --- a/target/linux/ipq40xx/patches-4.14/030-mtd-nand-Use-standard-large-page-OOB-layout-when-usi.patch +++ b/target/linux/ipq40xx/patches-4.14/030-mtd-nand-Use-standard-large-page-OOB-layout-when-usi.patch @@ -25,7 +25,7 @@ Signed-off-by: Boris Brezillon return -ERANGE; oobregion->length = ecc->total; -@@ -4707,6 +4707,19 @@ int nand_scan_tail(struct mtd_info *mtd) +@@ -4712,6 +4712,19 @@ int nand_scan_tail(struct mtd_info *mtd) mtd_set_ooblayout(mtd, &nand_ooblayout_lp_hamming_ops); break; default: diff --git a/target/linux/ipq40xx/patches-4.14/031-mtd-nand-use-usual-return-values-for-the-erase-hook.patch b/target/linux/ipq40xx/patches-4.14/031-mtd-nand-use-usual-return-values-for-the-erase-hook.patch index 67ffb19e4d..962baeb2b5 100644 --- a/target/linux/ipq40xx/patches-4.14/031-mtd-nand-use-usual-return-values-for-the-erase-hook.patch +++ b/target/linux/ipq40xx/patches-4.14/031-mtd-nand-use-usual-return-values-for-the-erase-hook.patch @@ -18,7 +18,7 @@ Signed-off-by: Boris Brezillon --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c -@@ -2989,11 +2989,17 @@ out: +@@ -2994,11 +2994,17 @@ out: static int single_erase(struct mtd_info *mtd, int page) { struct nand_chip *chip = mtd_to_nand(mtd); @@ -37,7 +37,7 @@ Signed-off-by: Boris Brezillon } /** -@@ -3077,7 +3083,7 @@ int nand_erase_nand(struct mtd_info *mtd +@@ -3082,7 +3088,7 @@ int nand_erase_nand(struct mtd_info *mtd status = chip->erase(mtd, page & chip->pagemask); /* See if block erase succeeded */ diff --git a/target/linux/ipq40xx/patches-4.14/050-0004-mtd-nand-provide-several-helpers-to-do-common-NAND-o.patch b/target/linux/ipq40xx/patches-4.14/050-0004-mtd-nand-provide-several-helpers-to-do-common-NAND-o.patch index 7cbbcf588c..03dcb07554 100644 --- a/target/linux/ipq40xx/patches-4.14/050-0004-mtd-nand-provide-several-helpers-to-do-common-NAND-o.patch +++ b/target/linux/ipq40xx/patches-4.14/050-0004-mtd-nand-provide-several-helpers-to-do-common-NAND-o.patch @@ -60,7 +60,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 break; touch_softlockup_watchdog(); } while (time_before(jiffies, timeo)); -@@ -1016,7 +1028,15 @@ static void panic_nand_wait(struct mtd_i +@@ -1021,7 +1033,15 @@ static void panic_nand_wait(struct mtd_i if (chip->dev_ready(mtd)) break; } else { @@ -77,7 +77,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 break; } mdelay(1); -@@ -1033,8 +1053,9 @@ static void panic_nand_wait(struct mtd_i +@@ -1038,8 +1058,9 @@ static void panic_nand_wait(struct mtd_i static int nand_wait(struct mtd_info *mtd, struct nand_chip *chip) { @@ -88,7 +88,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 /* * Apply this short delay always to ensure that we do wait tWB in any -@@ -1042,7 +1063,9 @@ static int nand_wait(struct mtd_info *mt +@@ -1047,7 +1068,9 @@ static int nand_wait(struct mtd_info *mt */ ndelay(100); @@ -99,7 +99,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 if (in_interrupt() || oops_in_progress) panic_nand_wait(mtd, chip, timeo); -@@ -1053,14 +1076,22 @@ static int nand_wait(struct mtd_info *mt +@@ -1058,14 +1081,22 @@ static int nand_wait(struct mtd_info *mt if (chip->dev_ready(mtd)) break; } else { @@ -124,7 +124,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 /* This can happen if in case of timeout or buggy dev_ready */ WARN_ON(!(status & NAND_STATUS_READY)); return status; -@@ -1215,6 +1246,516 @@ static void nand_release_data_interface( +@@ -1220,6 +1251,516 @@ static void nand_release_data_interface( } /** @@ -641,7 +641,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 * nand_reset - Reset and initialize a NAND device * @chip: The NAND chip * @chipnr: Internal die id -@@ -1235,8 +1776,10 @@ int nand_reset(struct nand_chip *chip, i +@@ -1240,8 +1781,10 @@ int nand_reset(struct nand_chip *chip, i * interface settings, hence this weird ->select_chip() dance. */ chip->select_chip(mtd, chipnr); @@ -653,7 +653,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 chip->select_chip(mtd, chipnr); ret = nand_setup_data_interface(chip, chipnr); -@@ -1392,9 +1935,19 @@ EXPORT_SYMBOL(nand_check_erased_ecc_chun +@@ -1397,9 +1940,19 @@ EXPORT_SYMBOL(nand_check_erased_ecc_chun int nand_read_page_raw(struct mtd_info *mtd, struct nand_chip *chip, uint8_t *buf, int oob_required, int page) { @@ -676,7 +676,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 return 0; } EXPORT_SYMBOL(nand_read_page_raw); -@@ -1416,29 +1969,46 @@ static int nand_read_page_raw_syndrome(s +@@ -1421,29 +1974,46 @@ static int nand_read_page_raw_syndrome(s int eccsize = chip->ecc.size; int eccbytes = chip->ecc.bytes; uint8_t *oob = chip->oob_poi; @@ -730,7 +730,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 return 0; } -@@ -1527,7 +2097,9 @@ static int nand_read_subpage(struct mtd_ +@@ -1532,7 +2102,9 @@ static int nand_read_subpage(struct mtd_ chip->cmdfunc(mtd, NAND_CMD_RNDOUT, data_col_addr, -1); p = bufpoi + data_col_addr; @@ -741,7 +741,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 /* Calculate ECC */ for (i = 0; i < eccfrag_len ; i += chip->ecc.bytes, p += chip->ecc.size) -@@ -1545,8 +2117,11 @@ static int nand_read_subpage(struct mtd_ +@@ -1550,8 +2122,11 @@ static int nand_read_subpage(struct mtd_ gaps = 1; if (gaps) { @@ -755,7 +755,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 } else { /* * Send the command to read the particular ECC bytes take care -@@ -1560,9 +2135,12 @@ static int nand_read_subpage(struct mtd_ +@@ -1565,9 +2140,12 @@ static int nand_read_subpage(struct mtd_ (busw - 1)) aligned_len++; @@ -771,7 +771,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 } ret = mtd_ooblayout_get_eccbytes(mtd, chip->buffers->ecccode, -@@ -1619,10 +2197,17 @@ static int nand_read_page_hwecc(struct m +@@ -1624,10 +2202,17 @@ static int nand_read_page_hwecc(struct m for (i = 0; eccsteps; eccsteps--, i += eccbytes, p += eccsize) { chip->ecc.hwctl(mtd, NAND_ECC_READ); @@ -791,7 +791,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 ret = mtd_ooblayout_get_eccbytes(mtd, ecc_code, chip->oob_poi, 0, chip->ecc.total); -@@ -1681,9 +2266,13 @@ static int nand_read_page_hwecc_oob_firs +@@ -1686,9 +2271,13 @@ static int nand_read_page_hwecc_oob_firs unsigned int max_bitflips = 0; /* Read the OOB area first */ @@ -808,7 +808,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 ret = mtd_ooblayout_get_eccbytes(mtd, ecc_code, chip->oob_poi, 0, chip->ecc.total); -@@ -1694,7 +2283,11 @@ static int nand_read_page_hwecc_oob_firs +@@ -1699,7 +2288,11 @@ static int nand_read_page_hwecc_oob_firs int stat; chip->ecc.hwctl(mtd, NAND_ECC_READ); @@ -821,7 +821,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 chip->ecc.calculate(mtd, p, &ecc_calc[i]); stat = chip->ecc.correct(mtd, p, &ecc_code[i], NULL); -@@ -1731,7 +2324,7 @@ static int nand_read_page_hwecc_oob_firs +@@ -1736,7 +2329,7 @@ static int nand_read_page_hwecc_oob_firs static int nand_read_page_syndrome(struct mtd_info *mtd, struct nand_chip *chip, uint8_t *buf, int oob_required, int page) { @@ -830,7 +830,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 int eccbytes = chip->ecc.bytes; int eccsteps = chip->ecc.steps; int eccpadbytes = eccbytes + chip->ecc.prepad + chip->ecc.postpad; -@@ -1743,21 +2336,36 @@ static int nand_read_page_syndrome(struc +@@ -1748,21 +2341,36 @@ static int nand_read_page_syndrome(struc int stat; chip->ecc.hwctl(mtd, NAND_ECC_READ); @@ -871,7 +871,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 oob += chip->ecc.postpad; } -@@ -1781,8 +2389,11 @@ static int nand_read_page_syndrome(struc +@@ -1786,8 +2394,11 @@ static int nand_read_page_syndrome(struc /* Calculate remaining oob bytes */ i = mtd->oobsize - (oob - chip->oob_poi); @@ -885,7 +885,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 return max_bitflips; } -@@ -1903,8 +2514,11 @@ static int nand_do_read_ops(struct mtd_i +@@ -1908,8 +2519,11 @@ static int nand_do_read_ops(struct mtd_i __func__, buf); read_retry: @@ -899,7 +899,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 /* * Now read the page into the buffer. Absent an error, -@@ -2063,9 +2677,7 @@ static int nand_read(struct mtd_info *mt +@@ -2068,9 +2682,7 @@ static int nand_read(struct mtd_info *mt */ int nand_read_oob_std(struct mtd_info *mtd, struct nand_chip *chip, int page) { @@ -910,7 +910,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 } EXPORT_SYMBOL(nand_read_oob_std); -@@ -2083,25 +2695,43 @@ int nand_read_oob_syndrome(struct mtd_in +@@ -2088,25 +2700,43 @@ int nand_read_oob_syndrome(struct mtd_in int chunk = chip->ecc.bytes + chip->ecc.prepad + chip->ecc.postpad; int eccsize = chip->ecc.size; uint8_t *bufpoi = chip->oob_poi; @@ -961,7 +961,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 return 0; } -@@ -2115,18 +2745,8 @@ EXPORT_SYMBOL(nand_read_oob_syndrome); +@@ -2120,18 +2750,8 @@ EXPORT_SYMBOL(nand_read_oob_syndrome); */ int nand_write_oob_std(struct mtd_info *mtd, struct nand_chip *chip, int page) { @@ -982,7 +982,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 } EXPORT_SYMBOL(nand_write_oob_std); -@@ -2142,7 +2762,7 @@ int nand_write_oob_syndrome(struct mtd_i +@@ -2147,7 +2767,7 @@ int nand_write_oob_syndrome(struct mtd_i { int chunk = chip->ecc.bytes + chip->ecc.prepad + chip->ecc.postpad; int eccsize = chip->ecc.size, length = mtd->oobsize; @@ -991,7 +991,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 const uint8_t *bufpoi = chip->oob_poi; /* -@@ -2156,7 +2776,10 @@ int nand_write_oob_syndrome(struct mtd_i +@@ -2161,7 +2781,10 @@ int nand_write_oob_syndrome(struct mtd_i } else pos = eccsize; @@ -1003,7 +1003,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 for (i = 0; i < steps; i++) { if (sndcmd) { if (mtd->writesize <= 512) { -@@ -2165,28 +2788,40 @@ int nand_write_oob_syndrome(struct mtd_i +@@ -2170,28 +2793,40 @@ int nand_write_oob_syndrome(struct mtd_i len = eccsize; while (len > 0) { int num = min_t(int, len, 4); @@ -1054,7 +1054,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 } EXPORT_SYMBOL(nand_write_oob_syndrome); -@@ -2341,9 +2976,18 @@ static int nand_read_oob(struct mtd_info +@@ -2346,9 +2981,18 @@ static int nand_read_oob(struct mtd_info int nand_write_page_raw(struct mtd_info *mtd, struct nand_chip *chip, const uint8_t *buf, int oob_required, int page) { @@ -1076,7 +1076,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 return 0; } -@@ -2367,29 +3011,46 @@ static int nand_write_page_raw_syndrome( +@@ -2372,29 +3016,46 @@ static int nand_write_page_raw_syndrome( int eccsize = chip->ecc.size; int eccbytes = chip->ecc.bytes; uint8_t *oob = chip->oob_poi; @@ -1130,7 +1130,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 return 0; } -@@ -2443,7 +3104,11 @@ static int nand_write_page_hwecc(struct +@@ -2448,7 +3109,11 @@ static int nand_write_page_hwecc(struct for (i = 0; eccsteps; eccsteps--, i += eccbytes, p += eccsize) { chip->ecc.hwctl(mtd, NAND_ECC_WRITE); @@ -1143,7 +1143,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 chip->ecc.calculate(mtd, p, &ecc_calc[i]); } -@@ -2452,7 +3117,9 @@ static int nand_write_page_hwecc(struct +@@ -2457,7 +3122,9 @@ static int nand_write_page_hwecc(struct if (ret) return ret; @@ -1154,7 +1154,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 return 0; } -@@ -2488,7 +3155,9 @@ static int nand_write_subpage_hwecc(stru +@@ -2493,7 +3160,9 @@ static int nand_write_subpage_hwecc(stru chip->ecc.hwctl(mtd, NAND_ECC_WRITE); /* write data (untouched subpages already masked by 0xFF) */ @@ -1165,7 +1165,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 /* mask ECC of un-touched subpages by padding 0xFF */ if ((step < start_step) || (step > end_step)) -@@ -2515,7 +3184,9 @@ static int nand_write_subpage_hwecc(stru +@@ -2520,7 +3189,9 @@ static int nand_write_subpage_hwecc(stru return ret; /* write OOB buffer to NAND device */ @@ -1176,7 +1176,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 return 0; } -@@ -2542,31 +3213,49 @@ static int nand_write_page_syndrome(stru +@@ -2547,31 +3218,49 @@ static int nand_write_page_syndrome(stru int eccsteps = chip->ecc.steps; const uint8_t *p = buf; uint8_t *oob = chip->oob_poi; @@ -1233,7 +1233,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 return 0; } -@@ -2594,8 +3283,11 @@ static int nand_write_page(struct mtd_in +@@ -2599,8 +3288,11 @@ static int nand_write_page(struct mtd_in else subpage = 0; @@ -1247,7 +1247,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 if (unlikely(raw)) status = chip->ecc.write_page_raw(mtd, chip, buf, -@@ -2610,13 +3302,8 @@ static int nand_write_page(struct mtd_in +@@ -2615,13 +3307,8 @@ static int nand_write_page(struct mtd_in if (status < 0) return status; @@ -1263,7 +1263,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 return 0; } -@@ -2989,17 +3676,12 @@ out: +@@ -2994,17 +3681,12 @@ out: static int single_erase(struct mtd_info *mtd, int page) { struct nand_chip *chip = mtd_to_nand(mtd); @@ -1284,7 +1284,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 } /** -@@ -3226,22 +3908,12 @@ static int nand_max_bad_blocks(struct mt +@@ -3231,22 +3913,12 @@ static int nand_max_bad_blocks(struct mt static int nand_onfi_set_features(struct mtd_info *mtd, struct nand_chip *chip, int addr, uint8_t *subfeature_param) { @@ -1308,7 +1308,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 } /** -@@ -3254,17 +3926,12 @@ static int nand_onfi_set_features(struct +@@ -3259,17 +3931,12 @@ static int nand_onfi_set_features(struct static int nand_onfi_get_features(struct mtd_info *mtd, struct nand_chip *chip, int addr, uint8_t *subfeature_param) { @@ -1327,7 +1327,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 } /** -@@ -3407,12 +4074,11 @@ static u16 onfi_crc16(u16 crc, u8 const +@@ -3412,12 +4079,11 @@ static u16 onfi_crc16(u16 crc, u8 const static int nand_flash_detect_ext_param_page(struct nand_chip *chip, struct nand_onfi_params *p) { @@ -1341,7 +1341,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 int len; int i; -@@ -3422,14 +4088,18 @@ static int nand_flash_detect_ext_param_p +@@ -3427,14 +4093,18 @@ static int nand_flash_detect_ext_param_p return -ENOMEM; /* Send our own NAND_CMD_PARAM. */ @@ -1365,7 +1365,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 if ((onfi_crc16(ONFI_CRC_BASE, ((uint8_t *)ep) + 2, len - 2) != le16_to_cpu(ep->crc))) { pr_debug("fail in the CRC.\n"); -@@ -3482,19 +4152,23 @@ static int nand_flash_detect_onfi(struct +@@ -3487,19 +4157,23 @@ static int nand_flash_detect_onfi(struct { struct mtd_info *mtd = nand_to_mtd(chip); struct nand_onfi_params *p = &chip->onfi_params; @@ -1397,7 +1397,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 if (onfi_crc16(ONFI_CRC_BASE, (uint8_t *)p, 254) == le16_to_cpu(p->crc)) { break; -@@ -3585,20 +4259,22 @@ static int nand_flash_detect_jedec(struc +@@ -3590,20 +4264,22 @@ static int nand_flash_detect_jedec(struc struct mtd_info *mtd = nand_to_mtd(chip); struct nand_jedec_params *p = &chip->jedec_params; struct jedec_ecc_info *ecc; @@ -1429,7 +1429,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 if (onfi_crc16(ONFI_CRC_BASE, (uint8_t *)p, 510) == le16_to_cpu(p->crc)) -@@ -3877,8 +4553,7 @@ static int nand_detect(struct nand_chip +@@ -3882,8 +4558,7 @@ static int nand_detect(struct nand_chip { const struct nand_manufacturer *manufacturer; struct mtd_info *mtd = nand_to_mtd(chip); @@ -1439,7 +1439,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 u8 *id_data = chip->id.data; u8 maf_id, dev_id; -@@ -3886,17 +4561,21 @@ static int nand_detect(struct nand_chip +@@ -3891,17 +4566,21 @@ static int nand_detect(struct nand_chip * Reset the chip, required by some chips (e.g. Micron MT29FxGxxxxx) * after power-up. */ @@ -1465,7 +1465,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 /* * Try again to make sure, as some systems the bus-hold or other -@@ -3905,11 +4584,10 @@ static int nand_detect(struct nand_chip +@@ -3910,11 +4589,10 @@ static int nand_detect(struct nand_chip * not match, ignore the device completely. */ @@ -1480,7 +1480,7 @@ Date: Thu Nov 30 18:01:29 2017 +0100 if (id_data[0] != maf_id || id_data[1] != dev_id) { pr_info("second ID read did not match %02x,%02x against %02x,%02x\n", -@@ -4233,15 +4911,16 @@ int nand_scan_ident(struct mtd_info *mtd +@@ -4238,15 +4916,16 @@ int nand_scan_ident(struct mtd_info *mtd /* Check for a chip array */ for (i = 1; i < maxchips; i++) { diff --git a/target/linux/mediatek/patches-4.14/0052-net-phy-add-FC.patch b/target/linux/mediatek/patches-4.14/0052-net-phy-add-FC.patch index 5d04113852..021f713157 100644 --- a/target/linux/mediatek/patches-4.14/0052-net-phy-add-FC.patch +++ b/target/linux/mediatek/patches-4.14/0052-net-phy-add-FC.patch @@ -10,7 +10,7 @@ Signed-off-by: John Crispin --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c -@@ -1912,7 +1912,7 @@ static struct phy_driver genphy_driver = +@@ -1922,7 +1922,7 @@ static struct phy_driver genphy_driver = .config_init = genphy_config_init, .features = PHY_GBIT_FEATURES | SUPPORTED_MII | SUPPORTED_AUI | SUPPORTED_FIBRE | diff --git a/target/linux/ramips/patches-4.14/0034-NET-multi-phy-support.patch b/target/linux/ramips/patches-4.14/0034-NET-multi-phy-support.patch index 0bcb617ba1..7c2777c467 100644 --- a/target/linux/ramips/patches-4.14/0034-NET-multi-phy-support.patch +++ b/target/linux/ramips/patches-4.14/0034-NET-multi-phy-support.patch @@ -11,7 +11,7 @@ Signed-off-by: John Crispin --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c -@@ -984,7 +984,10 @@ void phy_state_machine(struct work_struc +@@ -981,7 +981,10 @@ void phy_state_machine(struct work_struc /* If the link is down, give up on negotiation for now */ if (!phydev->link) { phydev->state = PHY_NOLINK; @@ -23,7 +23,7 @@ Signed-off-by: John Crispin break; } -@@ -1071,7 +1074,10 @@ void phy_state_machine(struct work_struc +@@ -1068,7 +1071,10 @@ void phy_state_machine(struct work_struc phy_link_up(phydev); } else { phydev->state = PHY_NOLINK; @@ -35,7 +35,7 @@ Signed-off-by: John Crispin } if (phy_interrupt_is_valid(phydev)) -@@ -1081,7 +1087,10 @@ void phy_state_machine(struct work_struc +@@ -1078,7 +1084,10 @@ void phy_state_machine(struct work_struc case PHY_HALTED: if (phydev->link) { phydev->link = 0; diff --git a/target/linux/ramips/patches-4.14/0039-mtd-add-mt7621-nand-support.patch b/target/linux/ramips/patches-4.14/0039-mtd-add-mt7621-nand-support.patch index dae115dd13..97e4344665 100644 --- a/target/linux/ramips/patches-4.14/0039-mtd-add-mt7621-nand-support.patch +++ b/target/linux/ramips/patches-4.14/0039-mtd-add-mt7621-nand-support.patch @@ -4138,7 +4138,7 @@ Signed-off-by: John Crispin { struct nand_chip *chip = mtd_to_nand(mtd); -@@ -963,7 +963,7 @@ static void panic_nand_get_device(struct +@@ -968,7 +968,7 @@ static void panic_nand_get_device(struct * * Get the device and lock it for exclusive access */ diff --git a/target/linux/ramips/patches-4.14/0040-nand-hack-restore-write_page.patch b/target/linux/ramips/patches-4.14/0040-nand-hack-restore-write_page.patch index 048e60441c..ec2afeaf0e 100644 --- a/target/linux/ramips/patches-4.14/0040-nand-hack-restore-write_page.patch +++ b/target/linux/ramips/patches-4.14/0040-nand-hack-restore-write_page.patch @@ -12,7 +12,7 @@ int (*onfi_get_features)(struct mtd_info *mtd, struct nand_chip *chip, --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c -@@ -2756,9 +2756,14 @@ static int nand_do_write_ops(struct mtd_ +@@ -2761,9 +2761,14 @@ static int nand_do_write_ops(struct mtd_ memset(chip->oob_poi, 0xff, mtd->oobsize); } @@ -30,7 +30,7 @@ if (ret) break; -@@ -4714,6 +4719,9 @@ int nand_scan_tail(struct mtd_info *mtd) +@@ -4719,6 +4724,9 @@ int nand_scan_tail(struct mtd_info *mtd) } } diff --git a/target/linux/ramips/patches-4.14/0040-nand-hack.patch b/target/linux/ramips/patches-4.14/0040-nand-hack.patch index 7b616eca46..ae6eed933f 100644 --- a/target/linux/ramips/patches-4.14/0040-nand-hack.patch +++ b/target/linux/ramips/patches-4.14/0040-nand-hack.patch @@ -1,6 +1,6 @@ --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c -@@ -1903,6 +1903,9 @@ static int nand_do_read_ops(struct mtd_i +@@ -1908,6 +1908,9 @@ static int nand_do_read_ops(struct mtd_i __func__, buf); read_retry: @@ -10,7 +10,7 @@ if (nand_standard_page_accessors(&chip->ecc)) chip->cmdfunc(mtd, NAND_CMD_READ0, 0x00, page); -@@ -1922,6 +1925,7 @@ read_retry: +@@ -1927,6 +1930,7 @@ read_retry: else ret = chip->ecc.read_page(mtd, chip, bufpoi, oob_required, page); @@ -18,7 +18,7 @@ if (ret < 0) { if (use_bufpoi) /* Invalidate page cache */ -@@ -3079,8 +3083,11 @@ int nand_erase_nand(struct mtd_info *mtd +@@ -3084,8 +3088,11 @@ int nand_erase_nand(struct mtd_info *mtd (page + pages_per_block)) chip->pagebuf = -1; @@ -31,7 +31,7 @@ /* See if block erase succeeded */ if (status & NAND_STATUS_FAIL) { pr_debug("%s: failed erase, page 0x%08x\n", -@@ -4210,6 +4217,7 @@ int nand_scan_ident(struct mtd_info *mtd +@@ -4215,6 +4222,7 @@ int nand_scan_ident(struct mtd_info *mtd * cmdfunc() both expect cmd_ctrl() to be populated, * so we need to check that that's the case */