From: Etienne Haarsma Date: Thu, 21 Dec 2017 09:28:16 +0000 (+0100) Subject: kernel: bump 4.4 to 4.4.107 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=f8a441e02030dda0ef66a440105e28a3c43188bc;p=openwrt%2Fstaging%2Fhauke.git kernel: bump 4.4 to 4.4.107 Bump 4.4 to 4.4.107 and refreshed all patches. Made the following patch for Mediatek and Oxnas compatible with kernel 4.4.107: 0072-mtd-backport-v4.7-0day-patches-from-Boris.patch Compile-tested: ar71xx Run-tested: ar71xx Signed-off-by: Etienne Haarsma Reviewed-by: Kevin Darbyshire-Bryant Tested-by: Rosen Penev --- diff --git a/include/kernel-version.mk b/include/kernel-version.mk index e90a3c70ab..1e699a4e4b 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -3,10 +3,10 @@ LINUX_RELEASE?=1 LINUX_VERSION-3.18 = .43 -LINUX_VERSION-4.4 = .103 +LINUX_VERSION-4.4 = .107 LINUX_KERNEL_HASH-3.18.43 = 1236e8123a6ce537d5029232560966feed054ae31776fe8481dd7d18cdd5492c -LINUX_KERNEL_HASH-4.4.103 = 1d01d0785fdf52b3f3b9f7ad05b6cff6be034869935962478e19f265b022f904 +LINUX_KERNEL_HASH-4.4.107 = d25dc23c8b05d34518ede68f03668cd344f805049a16bc4f189da90533881a17 ifdef KERNEL_PATCHVER LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER))) diff --git a/target/linux/ar71xx/patches-4.4/432-spi-rb4xx-spi-driver.patch b/target/linux/ar71xx/patches-4.4/432-spi-rb4xx-spi-driver.patch index d6b71be46a..7d99c43b95 100644 --- a/target/linux/ar71xx/patches-4.4/432-spi-rb4xx-spi-driver.patch +++ b/target/linux/ar71xx/patches-4.4/432-spi-rb4xx-spi-driver.patch @@ -1,6 +1,6 @@ --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig -@@ -478,6 +478,12 @@ config SPI_QUP +@@ -477,6 +477,12 @@ config SPI_QUP This driver can also be built as a module. If so, the module will be called spi_qup. diff --git a/target/linux/ar71xx/patches-4.4/433-spi-rb4xx-cpld-driver.patch b/target/linux/ar71xx/patches-4.4/433-spi-rb4xx-cpld-driver.patch index 61c186ce9e..0932c729f9 100644 --- a/target/linux/ar71xx/patches-4.4/433-spi-rb4xx-cpld-driver.patch +++ b/target/linux/ar71xx/patches-4.4/433-spi-rb4xx-cpld-driver.patch @@ -1,6 +1,6 @@ --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig -@@ -714,6 +714,13 @@ config SPI_TLE62X0 +@@ -713,6 +713,13 @@ config SPI_TLE62X0 sysfs interface, with each line presented as a kind of GPIO exposing both switch control and diagnostic feedback. diff --git a/target/linux/ar71xx/patches-4.4/435-spi-vsc7385_driver.patch b/target/linux/ar71xx/patches-4.4/435-spi-vsc7385_driver.patch index 94dd1d4508..880c088c56 100644 --- a/target/linux/ar71xx/patches-4.4/435-spi-vsc7385_driver.patch +++ b/target/linux/ar71xx/patches-4.4/435-spi-vsc7385_driver.patch @@ -1,6 +1,6 @@ --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig -@@ -721,6 +721,11 @@ config SPI_RB4XX_CPLD +@@ -720,6 +720,11 @@ config SPI_RB4XX_CPLD SPI driver for the Xilinx CPLD chip present on the MikroTik RB4xx boards. diff --git a/target/linux/brcm2708/patches-4.4/0029-Add-dwc_otg-driver.patch b/target/linux/brcm2708/patches-4.4/0029-Add-dwc_otg-driver.patch index 8e9657abcf..1f652dc998 100644 --- a/target/linux/brcm2708/patches-4.4/0029-Add-dwc_otg-driver.patch +++ b/target/linux/brcm2708/patches-4.4/0029-Add-dwc_otg-driver.patch @@ -659,7 +659,7 @@ dwc_otg: Remove duplicate gadget probe/unregister function } --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c -@@ -4978,7 +4978,7 @@ static void port_event(struct usb_hub *h +@@ -4987,7 +4987,7 @@ static void port_event(struct usb_hub *h if (portchange & USB_PORT_STAT_C_OVERCURRENT) { u16 status = 0, unused; diff --git a/target/linux/brcm2708/patches-4.4/0112-drm-Put-an-optional-field-in-the-driver-struct-for-G.patch b/target/linux/brcm2708/patches-4.4/0112-drm-Put-an-optional-field-in-the-driver-struct-for-G.patch index 7fbaa27ca2..10c5e43fdf 100644 --- a/target/linux/brcm2708/patches-4.4/0112-drm-Put-an-optional-field-in-the-driver-struct-for-G.patch +++ b/target/linux/brcm2708/patches-4.4/0112-drm-Put-an-optional-field-in-the-driver-struct-for-G.patch @@ -30,7 +30,7 @@ Signed-off-by: Eric Anholt --- a/include/drm/drmP.h +++ b/include/drm/drmP.h -@@ -639,6 +639,7 @@ struct drm_driver { +@@ -653,6 +653,7 @@ struct drm_driver { u32 driver_features; int dev_priv_size; diff --git a/target/linux/brcm2708/patches-4.4/0114-drm-vc4-Update-a-bunch-of-code-to-match-upstream-sub.patch b/target/linux/brcm2708/patches-4.4/0114-drm-vc4-Update-a-bunch-of-code-to-match-upstream-sub.patch index 29321c338e..8d8711d082 100644 --- a/target/linux/brcm2708/patches-4.4/0114-drm-vc4-Update-a-bunch-of-code-to-match-upstream-sub.patch +++ b/target/linux/brcm2708/patches-4.4/0114-drm-vc4-Update-a-bunch-of-code-to-match-upstream-sub.patch @@ -1869,7 +1869,7 @@ Signed-off-by: Eric Anholt } --- a/include/drm/drmP.h +++ b/include/drm/drmP.h -@@ -585,6 +585,13 @@ struct drm_driver { +@@ -599,6 +599,13 @@ struct drm_driver { int (*gem_open_object) (struct drm_gem_object *, struct drm_file *); void (*gem_close_object) (struct drm_gem_object *, struct drm_file *); @@ -1883,7 +1883,7 @@ Signed-off-by: Eric Anholt /* prime: */ /* export handle -> fd (see drm_gem_prime_handle_to_fd() helper) */ int (*prime_handle_to_fd)(struct drm_device *dev, struct drm_file *file_priv, -@@ -639,7 +646,6 @@ struct drm_driver { +@@ -653,7 +660,6 @@ struct drm_driver { u32 driver_features; int dev_priv_size; diff --git a/target/linux/brcm2708/patches-4.4/0337-drm-panel-simple-Add-the-7-DPI-panel-from-Adafruit.patch b/target/linux/brcm2708/patches-4.4/0337-drm-panel-simple-Add-the-7-DPI-panel-from-Adafruit.patch index d5218b661c..2c9d3b16ff 100644 --- a/target/linux/brcm2708/patches-4.4/0337-drm-panel-simple-Add-the-7-DPI-panel-from-Adafruit.patch +++ b/target/linux/brcm2708/patches-4.4/0337-drm-panel-simple-Add-the-7-DPI-panel-from-Adafruit.patch @@ -33,7 +33,7 @@ Signed-off-by: Thierry Reding +in simple-panel.txt in this directory. --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c -@@ -1003,6 +1003,40 @@ static const struct panel_desc okaya_rs8 +@@ -1005,6 +1005,40 @@ static const struct panel_desc okaya_rs8 .bus_format = MEDIA_BUS_FMT_RGB666_1X18, }; @@ -74,7 +74,7 @@ Signed-off-by: Thierry Reding static const struct drm_display_mode ortustech_com43h4m85ulc_mode = { .clock = 25000, .hdisplay = 480, -@@ -1179,6 +1213,9 @@ static const struct of_device_id platfor +@@ -1181,6 +1215,9 @@ static const struct of_device_id platfor .compatible = "okaya,rs800480t-7x0gp", .data = &okaya_rs800480t_7x0gp, }, { diff --git a/target/linux/generic/patches-4.4/630-packet_socket_type.patch b/target/linux/generic/patches-4.4/630-packet_socket_type.patch index a427165f41..0314938ac4 100644 --- a/target/linux/generic/patches-4.4/630-packet_socket_type.patch +++ b/target/linux/generic/patches-4.4/630-packet_socket_type.patch @@ -26,7 +26,7 @@ Signed-off-by: Felix Fietkau #define PACKET_FANOUT_LB 1 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c -@@ -1784,6 +1784,7 @@ static int packet_rcv_spkt(struct sk_buf +@@ -1777,6 +1777,7 @@ static int packet_rcv_spkt(struct sk_buf { struct sock *sk; struct sockaddr_pkt *spkt; @@ -34,7 +34,7 @@ Signed-off-by: Felix Fietkau /* * When we registered the protocol we saved the socket in the data -@@ -1791,6 +1792,7 @@ static int packet_rcv_spkt(struct sk_buf +@@ -1784,6 +1785,7 @@ static int packet_rcv_spkt(struct sk_buf */ sk = pt->af_packet_priv; @@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau /* * Yank back the headers [hope the device set this -@@ -1803,7 +1805,7 @@ static int packet_rcv_spkt(struct sk_buf +@@ -1796,7 +1798,7 @@ static int packet_rcv_spkt(struct sk_buf * so that this procedure is noop. */ @@ -51,7 +51,7 @@ Signed-off-by: Felix Fietkau goto out; if (!net_eq(dev_net(dev), sock_net(sk))) -@@ -2006,12 +2008,12 @@ static int packet_rcv(struct sk_buff *sk +@@ -1999,12 +2001,12 @@ static int packet_rcv(struct sk_buff *sk int skb_len = skb->len; unsigned int snaplen, res; @@ -67,7 +67,7 @@ Signed-off-by: Felix Fietkau if (!net_eq(dev_net(dev), sock_net(sk))) goto drop; -@@ -2131,12 +2133,12 @@ static int tpacket_rcv(struct sk_buff *s +@@ -2124,12 +2126,12 @@ static int tpacket_rcv(struct sk_buff *s BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h2)) != 32); BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h3)) != 48); @@ -83,7 +83,7 @@ Signed-off-by: Felix Fietkau if (!net_eq(dev_net(dev), sock_net(sk))) goto drop; -@@ -3127,6 +3129,7 @@ static int packet_create(struct net *net +@@ -3126,6 +3128,7 @@ static int packet_create(struct net *net mutex_init(&po->pg_vec_lock); po->rollover = NULL; po->prot_hook.func = packet_rcv; @@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau if (sock->type == SOCK_PACKET) po->prot_hook.func = packet_rcv_spkt; -@@ -3756,6 +3759,16 @@ packet_setsockopt(struct socket *sock, i +@@ -3755,6 +3758,16 @@ packet_setsockopt(struct socket *sock, i po->xmit = val ? packet_direct_xmit : dev_queue_xmit; return 0; } @@ -108,7 +108,7 @@ Signed-off-by: Felix Fietkau default: return -ENOPROTOOPT; } -@@ -3809,6 +3822,13 @@ static int packet_getsockopt(struct sock +@@ -3807,6 +3820,13 @@ static int packet_getsockopt(struct sock case PACKET_VNET_HDR: val = po->has_vnet_hdr; break; @@ -124,7 +124,7 @@ Signed-off-by: Felix Fietkau break; --- a/net/packet/internal.h +++ b/net/packet/internal.h -@@ -129,6 +129,7 @@ struct packet_sock { +@@ -128,6 +128,7 @@ struct packet_sock { struct net_device __rcu *cached_dev; int (*xmit)(struct sk_buff *skb); struct packet_type prot_hook ____cacheline_aligned_in_smp; diff --git a/target/linux/generic/patches-4.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/patches-4.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch index b7ba384f4c..d91db1fe73 100644 --- a/target/linux/generic/patches-4.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch +++ b/target/linux/generic/patches-4.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch @@ -17,7 +17,7 @@ Signed-off-by: Felix Fietkau --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -4259,6 +4259,9 @@ static enum gro_result dev_gro_receive(s +@@ -4260,6 +4260,9 @@ static enum gro_result dev_gro_receive(s enum gro_result ret; int grow; @@ -27,7 +27,7 @@ Signed-off-by: Felix Fietkau if (!(skb->dev->features & NETIF_F_GRO)) goto normal; -@@ -5425,6 +5428,48 @@ static void __netdev_adjacent_dev_unlink +@@ -5426,6 +5429,48 @@ static void __netdev_adjacent_dev_unlink &upper_dev->adj_list.lower); } @@ -76,7 +76,7 @@ Signed-off-by: Felix Fietkau static int __netdev_upper_dev_link(struct net_device *dev, struct net_device *upper_dev, bool master, void *private) -@@ -5496,6 +5541,7 @@ static int __netdev_upper_dev_link(struc +@@ -5497,6 +5542,7 @@ static int __netdev_upper_dev_link(struc goto rollback_lower_mesh; } @@ -84,7 +84,7 @@ Signed-off-by: Felix Fietkau call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev, &changeupper_info.info); return 0; -@@ -5622,6 +5668,7 @@ void netdev_upper_dev_unlink(struct net_ +@@ -5623,6 +5669,7 @@ void netdev_upper_dev_unlink(struct net_ list_for_each_entry(i, &upper_dev->all_adj_list.upper, list) __netdev_adjacent_dev_unlink(dev, i->dev, i->ref_nr); @@ -92,7 +92,7 @@ Signed-off-by: Felix Fietkau call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev, &changeupper_info.info); } -@@ -6162,6 +6209,7 @@ int dev_set_mac_address(struct net_devic +@@ -6163,6 +6210,7 @@ int dev_set_mac_address(struct net_devic if (err) return err; dev->addr_assign_type = NET_ADDR_SET; diff --git a/target/linux/generic/patches-4.4/721-phy_packets.patch b/target/linux/generic/patches-4.4/721-phy_packets.patch index a7a23278d0..716c1a0273 100644 --- a/target/linux/generic/patches-4.4/721-phy_packets.patch +++ b/target/linux/generic/patches-4.4/721-phy_packets.patch @@ -86,7 +86,7 @@ help --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -2746,10 +2746,20 @@ static int xmit_one(struct sk_buff *skb, +@@ -2747,10 +2747,20 @@ static int xmit_one(struct sk_buff *skb, if (!list_empty(&ptype_all) || !list_empty(&dev->ptype_all)) dev_queue_xmit_nit(skb, dev); diff --git a/target/linux/generic/patches-4.4/902-debloat_proc.patch b/target/linux/generic/patches-4.4/902-debloat_proc.patch index b59ecf2a0a..5aada68e31 100644 --- a/target/linux/generic/patches-4.4/902-debloat_proc.patch +++ b/target/linux/generic/patches-4.4/902-debloat_proc.patch @@ -34,7 +34,7 @@ } --- a/fs/proc/proc_tty.c +++ b/fs/proc/proc_tty.c -@@ -143,7 +143,10 @@ static const struct file_operations proc +@@ -144,7 +144,10 @@ static const struct file_operations proc void proc_tty_register_driver(struct tty_driver *driver) { struct proc_dir_entry *ent; @@ -46,7 +46,7 @@ if (!driver->driver_name || driver->proc_entry || !driver->ops->proc_fops) return; -@@ -160,6 +163,9 @@ void proc_tty_unregister_driver(struct t +@@ -161,6 +164,9 @@ void proc_tty_unregister_driver(struct t { struct proc_dir_entry *ent; @@ -56,7 +56,7 @@ ent = driver->proc_entry; if (!ent) return; -@@ -174,6 +180,9 @@ void proc_tty_unregister_driver(struct t +@@ -175,6 +181,9 @@ void proc_tty_unregister_driver(struct t */ void __init proc_tty_init(void) { diff --git a/target/linux/ixp4xx/patches-4.4/160-delayed_uart_io.patch b/target/linux/ixp4xx/patches-4.4/160-delayed_uart_io.patch index 2bcc801b14..937a65e43a 100644 --- a/target/linux/ixp4xx/patches-4.4/160-delayed_uart_io.patch +++ b/target/linux/ixp4xx/patches-4.4/160-delayed_uart_io.patch @@ -115,7 +115,7 @@ case UPIO_AU: p->serial_out(p, offset, value); p->serial_in(p, UART_LCR); /* safe, no side-effects */ -@@ -2457,6 +2477,7 @@ static int serial8250_request_std_resour +@@ -2460,6 +2480,7 @@ static int serial8250_request_std_resour case UPIO_MEM32: case UPIO_MEM32BE: case UPIO_MEM: @@ -123,7 +123,7 @@ if (!port->mapbase) break; -@@ -2494,6 +2515,7 @@ static void serial8250_release_std_resou +@@ -2497,6 +2518,7 @@ static void serial8250_release_std_resou case UPIO_MEM32: case UPIO_MEM32BE: case UPIO_MEM: diff --git a/target/linux/lantiq/patches-4.4/0100-spi-add-support-for-Lantiq-SPI-controller.patch b/target/linux/lantiq/patches-4.4/0100-spi-add-support-for-Lantiq-SPI-controller.patch index daec87c433..3dc60a7032 100644 --- a/target/linux/lantiq/patches-4.4/0100-spi-add-support-for-Lantiq-SPI-controller.patch +++ b/target/linux/lantiq/patches-4.4/0100-spi-add-support-for-Lantiq-SPI-controller.patch @@ -13,7 +13,7 @@ Signed-off-by: Daniel Schwierzeck --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig -@@ -356,6 +356,13 @@ config SPI_MT65XX +@@ -355,6 +355,13 @@ config SPI_MT65XX say Y or M here.If you are not sure, say N. SPI drivers for Mediatek MT65XX and MT81XX series ARM SoCs. diff --git a/target/linux/mediatek/patches-4.4/0072-mtd-backport-v4.7-0day-patches-from-Boris.patch b/target/linux/mediatek/patches-4.4/0072-mtd-backport-v4.7-0day-patches-from-Boris.patch index 48fda9b020..9f4b044473 100644 --- a/target/linux/mediatek/patches-4.4/0072-mtd-backport-v4.7-0day-patches-from-Boris.patch +++ b/target/linux/mediatek/patches-4.4/0072-mtd-backport-v4.7-0day-patches-from-Boris.patch @@ -2512,10 +2512,10 @@ Signed-off-by: John Crispin { - struct nand_chip *chip = mtd->priv; + struct nand_chip *chip = mtd_to_nand(mtd); + int chipnr = (int)(to >> chip->chip_shift); struct mtd_oob_ops ops; int ret; - -@@ -2722,15 +2757,12 @@ static int nand_do_write_oob(struct mtd_ +@@ -2725,15 +2760,12 @@ static int nand_do_write_oob(struct mtd_ struct mtd_oob_ops *ops) { int chipnr, page, status, len; @@ -2533,7 +2533,7 @@ Signed-off-by: John Crispin /* Do not allow write past end of page */ if ((ops->ooboffs + ops->ooblen) > len) { -@@ -2847,7 +2879,7 @@ out: +@@ -2850,7 +2882,7 @@ out: */ static int single_erase(struct mtd_info *mtd, int page) { @@ -2542,7 +2542,7 @@ Signed-off-by: John Crispin /* Send commands to erase a block */ chip->cmdfunc(mtd, NAND_CMD_ERASE1, -1, page); chip->cmdfunc(mtd, NAND_CMD_ERASE2, -1, -1); -@@ -2879,7 +2911,7 @@ int nand_erase_nand(struct mtd_info *mtd +@@ -2882,7 +2914,7 @@ int nand_erase_nand(struct mtd_info *mtd int allowbbt) { int page, status, pages_per_block, ret, chipnr; @@ -2551,7 +2551,7 @@ Signed-off-by: John Crispin loff_t len; pr_debug("%s: start = 0x%012llx, len = %llu\n", -@@ -2918,7 +2950,7 @@ int nand_erase_nand(struct mtd_info *mtd +@@ -2921,7 +2953,7 @@ int nand_erase_nand(struct mtd_info *mtd while (len) { /* Check if we have a bad block, we do not erase bad blocks! */ if (nand_block_checkbad(mtd, ((loff_t) page) << @@ -2560,7 +2560,7 @@ Signed-off-by: John Crispin pr_warn("%s: attempt to erase a bad block at page 0x%08x\n", __func__, page); instr->state = MTD_ERASE_FAILED; -@@ -3005,7 +3037,20 @@ static void nand_sync(struct mtd_info *m +@@ -3008,7 +3040,20 @@ static void nand_sync(struct mtd_info *m */ static int nand_block_isbad(struct mtd_info *mtd, loff_t offs) { @@ -2582,7 +2582,7 @@ Signed-off-by: John Crispin } /** -@@ -3094,7 +3139,7 @@ static int nand_suspend(struct mtd_info +@@ -3097,7 +3142,7 @@ static int nand_suspend(struct mtd_info */ static void nand_resume(struct mtd_info *mtd) { @@ -2591,7 +2591,7 @@ Signed-off-by: John Crispin if (chip->state == FL_PM_SUSPENDED) nand_release_device(mtd); -@@ -3266,7 +3311,7 @@ ext_out: +@@ -3269,7 +3314,7 @@ ext_out: static int nand_setup_read_retry_micron(struct mtd_info *mtd, int retry_mode) { @@ -2600,7 +2600,7 @@ Signed-off-by: John Crispin uint8_t feature[ONFI_SUBFEATURE_PARAM_LEN] = {retry_mode}; return chip->onfi_set_features(mtd, chip, ONFI_FEATURE_ADDR_READ_RETRY, -@@ -3937,10 +3982,13 @@ ident_done: +@@ -3940,10 +3985,13 @@ ident_done: return type; } @@ -2617,7 +2617,7 @@ Signed-off-by: John Crispin if (of_get_nand_bus_width(dn) == 16) chip->options |= NAND_BUSWIDTH_16; -@@ -3949,6 +3997,7 @@ static int nand_dt_init(struct mtd_info +@@ -3952,6 +4000,7 @@ static int nand_dt_init(struct mtd_info chip->bbt_options |= NAND_BBT_USE_FLASH; ecc_mode = of_get_nand_ecc_mode(dn); @@ -2625,7 +2625,7 @@ Signed-off-by: John Crispin ecc_strength = of_get_nand_ecc_strength(dn); ecc_step = of_get_nand_ecc_step_size(dn); -@@ -3961,6 +4010,9 @@ static int nand_dt_init(struct mtd_info +@@ -3964,6 +4013,9 @@ static int nand_dt_init(struct mtd_info if (ecc_mode >= 0) chip->ecc.mode = ecc_mode; @@ -2635,7 +2635,7 @@ Signed-off-by: John Crispin if (ecc_strength >= 0) chip->ecc.strength = ecc_strength; -@@ -3984,15 +4036,16 @@ int nand_scan_ident(struct mtd_info *mtd +@@ -3987,15 +4039,16 @@ int nand_scan_ident(struct mtd_info *mtd struct nand_flash_dev *table) { int i, nand_maf_id, nand_dev_id; @@ -2658,7 +2658,7 @@ Signed-off-by: John Crispin if (!mtd->name && mtd->dev.parent) mtd->name = dev_name(mtd->dev.parent); -@@ -4055,7 +4108,7 @@ EXPORT_SYMBOL(nand_scan_ident); +@@ -4058,7 +4111,7 @@ EXPORT_SYMBOL(nand_scan_ident); */ static bool nand_ecc_strength_good(struct mtd_info *mtd) { @@ -2667,7 +2667,7 @@ Signed-off-by: John Crispin struct nand_ecc_ctrl *ecc = &chip->ecc; int corr, ds_corr; -@@ -4083,10 +4136,10 @@ static bool nand_ecc_strength_good(struc +@@ -4086,10 +4139,10 @@ static bool nand_ecc_strength_good(struc */ int nand_scan_tail(struct mtd_info *mtd) { @@ -2680,7 +2680,7 @@ Signed-off-by: John Crispin /* New bad blocks should be marked in OOB, flash-based BBT, or both */ BUG_ON((chip->bbt_options & NAND_BBT_NO_OOB_BBM) && -@@ -4113,19 +4166,15 @@ int nand_scan_tail(struct mtd_info *mtd) +@@ -4116,19 +4169,15 @@ int nand_scan_tail(struct mtd_info *mtd) /* * If no default placement scheme is given, select an appropriate one. */ @@ -2703,7 +2703,7 @@ Signed-off-by: John Crispin break; default: pr_warn("No oob scheme defined for oobsize %d\n", -@@ -4168,7 +4217,7 @@ int nand_scan_tail(struct mtd_info *mtd) +@@ -4171,7 +4220,7 @@ int nand_scan_tail(struct mtd_info *mtd) ecc->write_oob = nand_write_oob_std; if (!ecc->read_subpage) ecc->read_subpage = nand_read_subpage; @@ -2712,7 +2712,7 @@ Signed-off-by: John Crispin ecc->write_subpage = nand_write_subpage_hwecc; case NAND_ECC_HW_SYNDROME: -@@ -4246,10 +4295,8 @@ int nand_scan_tail(struct mtd_info *mtd) +@@ -4249,10 +4298,8 @@ int nand_scan_tail(struct mtd_info *mtd) } /* See nand_bch_init() for details. */ @@ -2725,7 +2725,7 @@ Signed-off-by: John Crispin if (!ecc->priv) { pr_warn("BCH ECC initialization failed!\n"); BUG(); -@@ -4280,20 +4327,9 @@ int nand_scan_tail(struct mtd_info *mtd) +@@ -4283,20 +4330,9 @@ int nand_scan_tail(struct mtd_info *mtd) if (!ecc->write_oob_raw) ecc->write_oob_raw = ecc->write_oob; @@ -2749,7 +2749,7 @@ Signed-off-by: John Crispin /* * Set the number of read / write steps for one page depending on ECC -@@ -4306,6 +4342,21 @@ int nand_scan_tail(struct mtd_info *mtd) +@@ -4309,6 +4345,21 @@ int nand_scan_tail(struct mtd_info *mtd) } ecc->total = ecc->steps * ecc->bytes; @@ -2771,7 +2771,7 @@ Signed-off-by: John Crispin /* Allow subpage writes up to ecc.steps. Not possible for MLC flash */ if (!(chip->options & NAND_NO_SUBPAGE_WRITE) && nand_is_slc(chip)) { switch (ecc->steps) { -@@ -4362,10 +4413,6 @@ int nand_scan_tail(struct mtd_info *mtd) +@@ -4365,10 +4416,6 @@ int nand_scan_tail(struct mtd_info *mtd) mtd->_block_markbad = nand_block_markbad; mtd->writebufsize = mtd->writesize; @@ -2782,7 +2782,7 @@ Signed-off-by: John Crispin /* * Initialize bitflip_threshold to its default prior scan_bbt() call. * scan_bbt() might invoke mtd_read(), thus bitflip_threshold must be -@@ -4421,7 +4468,7 @@ EXPORT_SYMBOL(nand_scan); +@@ -4424,7 +4471,7 @@ EXPORT_SYMBOL(nand_scan); */ void nand_release(struct mtd_info *mtd) { diff --git a/target/linux/oxnas/patches-4.4/0072-mtd-backport-v4.7-0day-patches-from-Boris.patch b/target/linux/oxnas/patches-4.4/0072-mtd-backport-v4.7-0day-patches-from-Boris.patch index 48fda9b020..9f4b044473 100644 --- a/target/linux/oxnas/patches-4.4/0072-mtd-backport-v4.7-0day-patches-from-Boris.patch +++ b/target/linux/oxnas/patches-4.4/0072-mtd-backport-v4.7-0day-patches-from-Boris.patch @@ -2512,10 +2512,10 @@ Signed-off-by: John Crispin { - struct nand_chip *chip = mtd->priv; + struct nand_chip *chip = mtd_to_nand(mtd); + int chipnr = (int)(to >> chip->chip_shift); struct mtd_oob_ops ops; int ret; - -@@ -2722,15 +2757,12 @@ static int nand_do_write_oob(struct mtd_ +@@ -2725,15 +2760,12 @@ static int nand_do_write_oob(struct mtd_ struct mtd_oob_ops *ops) { int chipnr, page, status, len; @@ -2533,7 +2533,7 @@ Signed-off-by: John Crispin /* Do not allow write past end of page */ if ((ops->ooboffs + ops->ooblen) > len) { -@@ -2847,7 +2879,7 @@ out: +@@ -2850,7 +2882,7 @@ out: */ static int single_erase(struct mtd_info *mtd, int page) { @@ -2542,7 +2542,7 @@ Signed-off-by: John Crispin /* Send commands to erase a block */ chip->cmdfunc(mtd, NAND_CMD_ERASE1, -1, page); chip->cmdfunc(mtd, NAND_CMD_ERASE2, -1, -1); -@@ -2879,7 +2911,7 @@ int nand_erase_nand(struct mtd_info *mtd +@@ -2882,7 +2914,7 @@ int nand_erase_nand(struct mtd_info *mtd int allowbbt) { int page, status, pages_per_block, ret, chipnr; @@ -2551,7 +2551,7 @@ Signed-off-by: John Crispin loff_t len; pr_debug("%s: start = 0x%012llx, len = %llu\n", -@@ -2918,7 +2950,7 @@ int nand_erase_nand(struct mtd_info *mtd +@@ -2921,7 +2953,7 @@ int nand_erase_nand(struct mtd_info *mtd while (len) { /* Check if we have a bad block, we do not erase bad blocks! */ if (nand_block_checkbad(mtd, ((loff_t) page) << @@ -2560,7 +2560,7 @@ Signed-off-by: John Crispin pr_warn("%s: attempt to erase a bad block at page 0x%08x\n", __func__, page); instr->state = MTD_ERASE_FAILED; -@@ -3005,7 +3037,20 @@ static void nand_sync(struct mtd_info *m +@@ -3008,7 +3040,20 @@ static void nand_sync(struct mtd_info *m */ static int nand_block_isbad(struct mtd_info *mtd, loff_t offs) { @@ -2582,7 +2582,7 @@ Signed-off-by: John Crispin } /** -@@ -3094,7 +3139,7 @@ static int nand_suspend(struct mtd_info +@@ -3097,7 +3142,7 @@ static int nand_suspend(struct mtd_info */ static void nand_resume(struct mtd_info *mtd) { @@ -2591,7 +2591,7 @@ Signed-off-by: John Crispin if (chip->state == FL_PM_SUSPENDED) nand_release_device(mtd); -@@ -3266,7 +3311,7 @@ ext_out: +@@ -3269,7 +3314,7 @@ ext_out: static int nand_setup_read_retry_micron(struct mtd_info *mtd, int retry_mode) { @@ -2600,7 +2600,7 @@ Signed-off-by: John Crispin uint8_t feature[ONFI_SUBFEATURE_PARAM_LEN] = {retry_mode}; return chip->onfi_set_features(mtd, chip, ONFI_FEATURE_ADDR_READ_RETRY, -@@ -3937,10 +3982,13 @@ ident_done: +@@ -3940,10 +3985,13 @@ ident_done: return type; } @@ -2617,7 +2617,7 @@ Signed-off-by: John Crispin if (of_get_nand_bus_width(dn) == 16) chip->options |= NAND_BUSWIDTH_16; -@@ -3949,6 +3997,7 @@ static int nand_dt_init(struct mtd_info +@@ -3952,6 +4000,7 @@ static int nand_dt_init(struct mtd_info chip->bbt_options |= NAND_BBT_USE_FLASH; ecc_mode = of_get_nand_ecc_mode(dn); @@ -2625,7 +2625,7 @@ Signed-off-by: John Crispin ecc_strength = of_get_nand_ecc_strength(dn); ecc_step = of_get_nand_ecc_step_size(dn); -@@ -3961,6 +4010,9 @@ static int nand_dt_init(struct mtd_info +@@ -3964,6 +4013,9 @@ static int nand_dt_init(struct mtd_info if (ecc_mode >= 0) chip->ecc.mode = ecc_mode; @@ -2635,7 +2635,7 @@ Signed-off-by: John Crispin if (ecc_strength >= 0) chip->ecc.strength = ecc_strength; -@@ -3984,15 +4036,16 @@ int nand_scan_ident(struct mtd_info *mtd +@@ -3987,15 +4039,16 @@ int nand_scan_ident(struct mtd_info *mtd struct nand_flash_dev *table) { int i, nand_maf_id, nand_dev_id; @@ -2658,7 +2658,7 @@ Signed-off-by: John Crispin if (!mtd->name && mtd->dev.parent) mtd->name = dev_name(mtd->dev.parent); -@@ -4055,7 +4108,7 @@ EXPORT_SYMBOL(nand_scan_ident); +@@ -4058,7 +4111,7 @@ EXPORT_SYMBOL(nand_scan_ident); */ static bool nand_ecc_strength_good(struct mtd_info *mtd) { @@ -2667,7 +2667,7 @@ Signed-off-by: John Crispin struct nand_ecc_ctrl *ecc = &chip->ecc; int corr, ds_corr; -@@ -4083,10 +4136,10 @@ static bool nand_ecc_strength_good(struc +@@ -4086,10 +4139,10 @@ static bool nand_ecc_strength_good(struc */ int nand_scan_tail(struct mtd_info *mtd) { @@ -2680,7 +2680,7 @@ Signed-off-by: John Crispin /* New bad blocks should be marked in OOB, flash-based BBT, or both */ BUG_ON((chip->bbt_options & NAND_BBT_NO_OOB_BBM) && -@@ -4113,19 +4166,15 @@ int nand_scan_tail(struct mtd_info *mtd) +@@ -4116,19 +4169,15 @@ int nand_scan_tail(struct mtd_info *mtd) /* * If no default placement scheme is given, select an appropriate one. */ @@ -2703,7 +2703,7 @@ Signed-off-by: John Crispin break; default: pr_warn("No oob scheme defined for oobsize %d\n", -@@ -4168,7 +4217,7 @@ int nand_scan_tail(struct mtd_info *mtd) +@@ -4171,7 +4220,7 @@ int nand_scan_tail(struct mtd_info *mtd) ecc->write_oob = nand_write_oob_std; if (!ecc->read_subpage) ecc->read_subpage = nand_read_subpage; @@ -2712,7 +2712,7 @@ Signed-off-by: John Crispin ecc->write_subpage = nand_write_subpage_hwecc; case NAND_ECC_HW_SYNDROME: -@@ -4246,10 +4295,8 @@ int nand_scan_tail(struct mtd_info *mtd) +@@ -4249,10 +4298,8 @@ int nand_scan_tail(struct mtd_info *mtd) } /* See nand_bch_init() for details. */ @@ -2725,7 +2725,7 @@ Signed-off-by: John Crispin if (!ecc->priv) { pr_warn("BCH ECC initialization failed!\n"); BUG(); -@@ -4280,20 +4327,9 @@ int nand_scan_tail(struct mtd_info *mtd) +@@ -4283,20 +4330,9 @@ int nand_scan_tail(struct mtd_info *mtd) if (!ecc->write_oob_raw) ecc->write_oob_raw = ecc->write_oob; @@ -2749,7 +2749,7 @@ Signed-off-by: John Crispin /* * Set the number of read / write steps for one page depending on ECC -@@ -4306,6 +4342,21 @@ int nand_scan_tail(struct mtd_info *mtd) +@@ -4309,6 +4345,21 @@ int nand_scan_tail(struct mtd_info *mtd) } ecc->total = ecc->steps * ecc->bytes; @@ -2771,7 +2771,7 @@ Signed-off-by: John Crispin /* Allow subpage writes up to ecc.steps. Not possible for MLC flash */ if (!(chip->options & NAND_NO_SUBPAGE_WRITE) && nand_is_slc(chip)) { switch (ecc->steps) { -@@ -4362,10 +4413,6 @@ int nand_scan_tail(struct mtd_info *mtd) +@@ -4365,10 +4416,6 @@ int nand_scan_tail(struct mtd_info *mtd) mtd->_block_markbad = nand_block_markbad; mtd->writebufsize = mtd->writesize; @@ -2782,7 +2782,7 @@ Signed-off-by: John Crispin /* * Initialize bitflip_threshold to its default prior scan_bbt() call. * scan_bbt() might invoke mtd_read(), thus bitflip_threshold must be -@@ -4421,7 +4468,7 @@ EXPORT_SYMBOL(nand_scan); +@@ -4424,7 +4471,7 @@ EXPORT_SYMBOL(nand_scan); */ void nand_release(struct mtd_info *mtd) { diff --git a/target/linux/oxnas/patches-4.4/0074-mtd-nand-import-nand_hw_control_init.patch b/target/linux/oxnas/patches-4.4/0074-mtd-nand-import-nand_hw_control_init.patch index 4b3260c41b..aefcfd98a7 100644 --- a/target/linux/oxnas/patches-4.4/0074-mtd-nand-import-nand_hw_control_init.patch +++ b/target/linux/oxnas/patches-4.4/0074-mtd-nand-import-nand_hw_control_init.patch @@ -87,7 +87,7 @@ Signed-off-by: Boris Brezillon } --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c -@@ -3202,8 +3202,7 @@ static void nand_set_defaults(struct nan +@@ -3205,8 +3205,7 @@ static void nand_set_defaults(struct nan if (!chip->controller) { chip->controller = &chip->hwcontrol; diff --git a/target/linux/oxnas/patches-4.4/330-oxnas-pinctrl.patch b/target/linux/oxnas/patches-4.4/330-oxnas-pinctrl.patch index 479bfddc50..76a19267a2 100644 --- a/target/linux/oxnas/patches-4.4/330-oxnas-pinctrl.patch +++ b/target/linux/oxnas/patches-4.4/330-oxnas-pinctrl.patch @@ -1,6 +1,6 @@ --- a/drivers/pinctrl/Kconfig +++ b/drivers/pinctrl/Kconfig -@@ -227,6 +227,15 @@ config PINCTRL_COH901 +@@ -228,6 +228,15 @@ config PINCTRL_COH901 COH 901 335 and COH 901 571/3. They contain 3, 5 or 7 ports of 8 GPIO pins each. diff --git a/target/linux/ramips/patches-4.4/0025-pinctrl-ralink-add-pinctrl-driver.patch b/target/linux/ramips/patches-4.4/0025-pinctrl-ralink-add-pinctrl-driver.patch index f7fc93248e..2959ac6946 100644 --- a/target/linux/ramips/patches-4.4/0025-pinctrl-ralink-add-pinctrl-driver.patch +++ b/target/linux/ramips/patches-4.4/0025-pinctrl-ralink-add-pinctrl-driver.patch @@ -25,7 +25,7 @@ Signed-off-by: John Crispin bool "SGI IP22 (Indy/Indigo2)" --- a/drivers/pinctrl/Kconfig +++ b/drivers/pinctrl/Kconfig -@@ -114,6 +114,11 @@ config PINCTRL_LPC18XX +@@ -115,6 +115,11 @@ config PINCTRL_LPC18XX help Pinctrl driver for NXP LPC18xx/43xx System Control Unit (SCU). diff --git a/target/linux/ramips/patches-4.4/0040-nand-add-mtk-nand-hack-hook.patch b/target/linux/ramips/patches-4.4/0040-nand-add-mtk-nand-hack-hook.patch index 254bf5286a..e7f4d893f6 100644 --- a/target/linux/ramips/patches-4.4/0040-nand-add-mtk-nand-hack-hook.patch +++ b/target/linux/ramips/patches-4.4/0040-nand-add-mtk-nand-hack-hook.patch @@ -118,7 +118,7 @@ Signed-off-by: John Crispin if (ret < 0) { if (use_bufpoi) /* Invalidate page cache */ -@@ -2932,8 +2936,11 @@ int nand_erase_nand(struct mtd_info *mtd +@@ -2935,8 +2939,11 @@ int nand_erase_nand(struct mtd_info *mtd if (page <= chip->pagebuf && chip->pagebuf < (page + pages_per_block)) chip->pagebuf = -1; diff --git a/target/linux/ramips/patches-4.4/0042-SPI-ralink-add-Ralink-SoC-spi-driver.patch b/target/linux/ramips/patches-4.4/0042-SPI-ralink-add-Ralink-SoC-spi-driver.patch index f79f2cfc5f..642632628b 100644 --- a/target/linux/ramips/patches-4.4/0042-SPI-ralink-add-Ralink-SoC-spi-driver.patch +++ b/target/linux/ramips/patches-4.4/0042-SPI-ralink-add-Ralink-SoC-spi-driver.patch @@ -16,7 +16,7 @@ Acked-by: John Crispin --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig -@@ -478,6 +478,12 @@ config SPI_QUP +@@ -477,6 +477,12 @@ config SPI_QUP This driver can also be built as a module. If so, the module will be called spi_qup. diff --git a/target/linux/ramips/patches-4.4/0043-spi-add-mt7621-support.patch b/target/linux/ramips/patches-4.4/0043-spi-add-mt7621-support.patch index 13936b2e1f..8a78bda840 100644 --- a/target/linux/ramips/patches-4.4/0043-spi-add-mt7621-support.patch +++ b/target/linux/ramips/patches-4.4/0043-spi-add-mt7621-support.patch @@ -13,7 +13,7 @@ Signed-off-by: John Crispin --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig -@@ -484,6 +484,12 @@ config SPI_RT2880 +@@ -483,6 +483,12 @@ config SPI_RT2880 help This selects a driver for the Ralink RT288x/RT305x SPI Controller. diff --git a/target/linux/ramips/patches-4.4/0511-net-mediatek-add-support-for-the-multiphy-carrier-pa.patch b/target/linux/ramips/patches-4.4/0511-net-mediatek-add-support-for-the-multiphy-carrier-pa.patch index 4d5c2d8744..643c68731c 100644 --- a/target/linux/ramips/patches-4.4/0511-net-mediatek-add-support-for-the-multiphy-carrier-pa.patch +++ b/target/linux/ramips/patches-4.4/0511-net-mediatek-add-support-for-the-multiphy-carrier-pa.patch @@ -25,7 +25,7 @@ Signed-off-by: John Crispin return IRQ_HANDLED; --- a/drivers/net/ethernet/mediatek/gsw_mt7620.h +++ b/drivers/net/ethernet/mediatek/gsw_mt7620.h -@@ -113,5 +113,6 @@ u32 mt7530_mdio_r32(struct mt7620_gsw *g +@@ -119,5 +119,6 @@ u32 mt7530_mdio_r32(struct mt7620_gsw *g u32 _mt7620_mii_write(struct mt7620_gsw *gsw, u32 phy_addr, u32 phy_register, u32 write_data); u32 _mt7620_mii_read(struct mt7620_gsw *gsw, int phy_addr, int phy_reg); diff --git a/target/linux/ramips/patches-4.4/0513-net-mediatek-add-swconfig-driver-for-gsw_mt762x.patch b/target/linux/ramips/patches-4.4/0513-net-mediatek-add-swconfig-driver-for-gsw_mt762x.patch index 10db0765c2..35d1bd0c74 100644 --- a/target/linux/ramips/patches-4.4/0513-net-mediatek-add-swconfig-driver-for-gsw_mt762x.patch +++ b/target/linux/ramips/patches-4.4/0513-net-mediatek-add-swconfig-driver-for-gsw_mt762x.patch @@ -51,7 +51,7 @@ Signed-off-by: John Crispin #define GSW_REG_PORT_PMCR(x) (0x3000 + (x * 0x100)) #define GSW_REG_PORT_STATUS(x) (0x3008 + (x * 0x100)) #define GSW_REG_SMACCR0 0x3fE4 -@@ -76,6 +78,7 @@ +@@ -82,6 +84,7 @@ #define PHY_PRE_EN BIT(30) #define PMY_MDC_CONF(_x) ((_x & 0x3f) << 24) diff --git a/target/linux/ramips/patches-4.4/0901-spansion_nand_id_fix.patch b/target/linux/ramips/patches-4.4/0901-spansion_nand_id_fix.patch index e4853a8c51..7091085958 100644 --- a/target/linux/ramips/patches-4.4/0901-spansion_nand_id_fix.patch +++ b/target/linux/ramips/patches-4.4/0901-spansion_nand_id_fix.patch @@ -13,7 +13,7 @@ Signed-off-by: Nikolay Martynov --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c -@@ -3568,6 +3568,7 @@ static void nand_decode_ext_id(struct mt +@@ -3571,6 +3571,7 @@ static void nand_decode_ext_id(struct mt /* * Field definitions are in the following datasheets: * Old style (4,5 byte ID): Samsung K9GAG08U0M (p.32) @@ -21,7 +21,7 @@ Signed-off-by: Nikolay Martynov * New Samsung (6 byte ID): Samsung K9GAG08U0F (p.44) * Hynix MLC (6 byte ID): Hynix H27UBG8T2B (p.22) * -@@ -3665,6 +3666,19 @@ static void nand_decode_ext_id(struct mt +@@ -3668,6 +3669,19 @@ static void nand_decode_ext_id(struct mt *busw = (extid & 0x01) ? NAND_BUSWIDTH_16 : 0; /*