ar71xx: refresh 3.10 patches
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Fri, 24 Oct 2014 20:39:42 +0000 (20:39 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Fri, 24 Oct 2014 20:39:42 +0000 (20:39 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43051 3c298f89-4303-0410-b956-a3cf2f4a3e73

14 files changed:
target/linux/ar71xx/patches-3.10/206-spi-ath79-make-chipselect-logic-more-flexible.patch
target/linux/ar71xx/patches-3.10/406-mtd-m25p80-allow-to-specify-max-read-size.patch
target/linux/ar71xx/patches-3.10/407-mtd-m25p80-allow-to-pass-probe-types-via-platform-data.patch
target/linux/ar71xx/patches-3.10/412-mtd-m25p80-zero-partition-parser-data.patch
target/linux/ar71xx/patches-3.10/424-net-phy-add-phy_mmd_read_write-functions.patch
target/linux/ar71xx/patches-3.10/521-MIPS-ath79-enable-UART-for-early_serial.patch
target/linux/ar71xx/patches-3.10/525-MIPS-ath79-enable-qca-usb-quirks.patch
target/linux/ar71xx/patches-3.10/606-MIPS-ath79-pb44-fixes.patch
target/linux/ar71xx/patches-3.10/610-MIPS-ath79-openwrt-machines.patch
target/linux/ar71xx/patches-3.10/720-MIPS-ath79-add-Tube2H-support.patch
target/linux/ar71xx/patches-3.10/722-MIPS-ath79-add-airGateway-support.patch
target/linux/ar71xx/patches-3.10/725-MIPS-ath79-add_mikrotik_rb2011uias-2hnd.patch
target/linux/ar71xx/patches-3.10/726-MIPS-ath79-add-qihoo-360-c301-support.patch
target/linux/ar71xx/patches-3.10/902-unaligned_access_hacks.patch

index b57dd5d..4f825f8 100644 (file)
@@ -170,7 +170,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  struct ath79_spi {
        struct spi_bitbang      bitbang;
        u32                     ioc_base;
-@@ -69,6 +71,7 @@ static void ath79_spi_chipselect(struct
+@@ -69,6 +71,7 @@ static void ath79_spi_chipselect(struct 
  {
        struct ath79_spi *sp = ath79_spidev_to_sp(spi);
        int cs_high = (spi->mode & SPI_CS_HIGH) ? is_active : !is_active;
@@ -178,7 +178,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  
        if (is_active) {
                /* set initial clock polarity */
-@@ -80,20 +83,24 @@ static void ath79_spi_chipselect(struct
+@@ -80,20 +83,24 @@ static void ath79_spi_chipselect(struct 
                ath79_spi_wr(sp, AR71XX_SPI_REG_IOC, sp->ioc_base);
        }
  
index ecf8110..8e1cd33 100644 (file)
@@ -84,7 +84,7 @@
        mutex_unlock(&flash->lock);
  
        return 0;
-@@ -1022,6 +1045,12 @@ static int m25p_probe(struct spi_device
+@@ -1022,6 +1045,12 @@ static int m25p_probe(struct spi_device 
                flash->mtd._unlock = m25p80_unlock;
        }
  
index babb3eb..26b6f70 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/mtd/devices/m25p80.c
 +++ b/drivers/mtd/devices/m25p80.c
-@@ -1122,7 +1122,9 @@ static int m25p_probe(struct spi_device
+@@ -1122,7 +1122,9 @@ static int m25p_probe(struct spi_device 
        /* partitions should match sector boundaries; and it may be good to
         * use readonly partitions for writeprotected sectors (BP2..BP0).
         */
index 0cfb19c..00a1ea3 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/mtd/devices/m25p80.c
 +++ b/drivers/mtd/devices/m25p80.c
-@@ -1072,6 +1072,7 @@ static int m25p_probe(struct spi_device
+@@ -1072,6 +1072,7 @@ static int m25p_probe(struct spi_device 
        if (info->flags & M25P_NO_ERASE)
                flash->mtd.flags |= MTD_NO_ERASE;
  
index 961a65b..6b69679 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/phy/phy.c
 +++ b/drivers/net/phy/phy.c
-@@ -1009,6 +1009,12 @@ static int phy_read_mmd_indirect(struct
+@@ -1009,6 +1009,12 @@ static int phy_read_mmd_indirect(struct 
        return ret;
  }
  
index 3d6ddfe..a6e84c5 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/mips/ath79/early_printk.c
 +++ b/arch/mips/ath79/early_printk.c
-@@ -56,6 +56,46 @@ static void prom_putchar_dummy(unsigned
+@@ -56,6 +56,46 @@ static void prom_putchar_dummy(unsigned 
        /* nothing to do */
  }
  
index 0e33674..696ad33 100644 (file)
 -      u32 bootstrap;
 +      void __iomem *phy_reg;
 +      u32 t;
-+
+-      bootstrap = ath79_reset_rr(AR934X_RESET_REG_BOOTSTRAP);
+-      if (bootstrap & AR934X_BOOTSTRAP_USB_MODE_DEVICE)
 +      phy_reg = ioremap(base, 4);
 +      if (!phy_reg)
-+              return;
-+
+               return;
 +      t = ioread32(phy_reg);
 +      t &= ~0xff;
 +      t |= 0x58;
 +
 +      iounmap(phy_reg);
 +}
--      bootstrap = ath79_reset_rr(AR934X_RESET_REG_BOOTSTRAP);
--      if (bootstrap & AR934X_BOOTSTRAP_USB_MODE_DEVICE)
++
 +static void ar934x_usb_reset_notifier(struct platform_device *pdev)
 +{
 +      if (pdev->id != -1)
-               return;
++              return;
++
 +      enable_tx_tx_idp_violation_fix(0x18116c94);
 +      dev_info(&pdev->dev, "TX-TX IDP fix enabled\n");
 +}
index f9ec775..b38b461 100644 (file)
@@ -50,7 +50,7 @@
  #define PB44_GPIO_SW_RESET    (PB44_GPIO_EXP_BASE + 6)
  #define PB44_GPIO_SW_JUMP     (PB44_GPIO_EXP_BASE + 8)
  #define PB44_GPIO_LED_JUMP1   (PB44_GPIO_EXP_BASE + 9)
-@@ -92,21 +117,66 @@ static struct ath79_spi_controller_data
+@@ -92,21 +117,66 @@ static struct ath79_spi_controller_data 
        .cs_line = 0,
  };
  
index cba18a8..60df54c 100644 (file)
  config ATH79_MACH_AP121
        bool "Atheros AP121 reference board"
        select SOC_AR933X
-@@ -9,64 +64,736 @@ config ATH79_MACH_AP121
-       select ATH79_DEV_GPIO_BUTTONS
-       select ATH79_DEV_LEDS_GPIO
+@@ -11,62 +66,734 @@ config ATH79_MACH_AP121
        select ATH79_DEV_M25P80
--      select ATH79_DEV_USB
-+      select ATH79_DEV_USB
-+      select ATH79_DEV_WMAC
+       select ATH79_DEV_USB
+       select ATH79_DEV_WMAC
+-      help
+-        Say 'Y' here if you want your kernel to support the
+-        Atheros AP121 reference board.
 +      help
 +        Say 'Y' here if you want your kernel to support the
 +        Atheros AP121 reference board.
 +      select ATH79_DEV_GPIO_BUTTONS
 +      select ATH79_DEV_LEDS_GPIO
 +      select ATH79_DEV_M25P80
-       select ATH79_DEV_WMAC
--      help
--        Say 'Y' here if you want your kernel to support the
--        Atheros AP121 reference board.
--config ATH79_MACH_AP136
--      bool "Atheros AP136/AP135 reference board"
++      select ATH79_DEV_WMAC
++
 +config ATH79_MACH_EAP7660D
 +      bool "Senao EAP7660D support"
 +      select SOC_AR71XX
 +
 +config ATH79_MACH_ARCHER_C7
 +      bool "TP-LINK Archer C7 board support"
-       select SOC_QCA955X
++      select SOC_QCA955X
 +      select ATH79_DEV_ETH
-       select ATH79_DEV_GPIO_BUTTONS
-       select ATH79_DEV_LEDS_GPIO
--      select ATH79_DEV_NFC
--      select ATH79_DEV_SPI
++      select ATH79_DEV_GPIO_BUTTONS
++      select ATH79_DEV_LEDS_GPIO
 +      select ATH79_DEV_M25P80
-       select ATH79_DEV_USB
-       select ATH79_DEV_WMAC
--      help
--        Say 'Y' here if you want your kernel to support the
--        Atheros AP136 or AP135 reference boards.
--config ATH79_MACH_AP81
--      bool "Atheros AP81 reference board"
++      select ATH79_DEV_USB
++      select ATH79_DEV_WMAC
++
 +config ATH79_MACH_TL_MR11U
 +      bool "TP-LINK TL-MR11U/TL-MR3040 support"
 +      select SOC_AR933X
 +      select ATH79_DEV_M25P80
 +      select ATH79_DEV_USB
 +      select ATH79_DEV_WMAC
-+
+-config ATH79_MACH_AP136
+-      bool "Atheros AP136/AP135 reference board"
+-      select SOC_QCA955X
 +config ATH79_MACH_TL_MR13U
 +      bool "TP-LINK TL-MR13U support"
 +      select SOC_AR933X
 +      select ATH79_DEV_ETH
-+      select ATH79_DEV_GPIO_BUTTONS
-+      select ATH79_DEV_LEDS_GPIO
+       select ATH79_DEV_GPIO_BUTTONS
+       select ATH79_DEV_LEDS_GPIO
+-      select ATH79_DEV_NFC
+-      select ATH79_DEV_SPI
 +      select ATH79_DEV_M25P80
-+      select ATH79_DEV_USB
-+      select ATH79_DEV_WMAC
-+
+       select ATH79_DEV_USB
+       select ATH79_DEV_WMAC
+-      help
+-        Say 'Y' here if you want your kernel to support the
+-        Atheros AP136 or AP135 reference boards.
+-config ATH79_MACH_AP81
+-      bool "Atheros AP81 reference board"
 +config ATH79_MACH_TL_MR3020
 +      bool "TP-LINK TL-MR3020 support"
 +      select SOC_AR933X
 +      bool "TP-LINK TL-WR841N v1 support"
        select SOC_AR71XX
 +      select ATH79_DEV_DSA
-+      select ATH79_DEV_ETH
-+      select ATH79_DEV_GPIO_BUTTONS
-+      select ATH79_DEV_LEDS_GPIO
+       select ATH79_DEV_ETH
+       select ATH79_DEV_GPIO_BUTTONS
+       select ATH79_DEV_LEDS_GPIO
+-      select ATH79_DEV_SPI
 +      select ATH79_DEV_M25P80
 +
 +config ATH79_MACH_TL_WR841N_V8
 +config ATH79_MACH_TL_WR1043ND_V2
 +      bool "TP-LINK TL-WR1043ND v2 support"
 +      select SOC_QCA955X
-       select ATH79_DEV_ETH
-       select ATH79_DEV_GPIO_BUTTONS
-       select ATH79_DEV_LEDS_GPIO
--      select ATH79_DEV_SPI
++      select ATH79_DEV_ETH
++      select ATH79_DEV_GPIO_BUTTONS
++      select ATH79_DEV_LEDS_GPIO
 +      select ATH79_DEV_M25P80
-       select ATH79_DEV_USB
--      help
--        Say 'Y' here if you want your kernel to support the
--        Atheros PB44 reference board.
++      select ATH79_DEV_USB
 +      select ATH79_DEV_WMAC
 +
 +config ATH79_MACH_TL_WR2543N
 +      select ATH79_DEV_GPIO_BUTTONS
 +      select ATH79_DEV_LEDS_GPIO
 +      select ATH79_DEV_M25P80
-+      select ATH79_DEV_USB
+       select ATH79_DEV_USB
+-      help
+-        Say 'Y' here if you want your kernel to support the
+-        Atheros PB44 reference board.
  
  config ATH79_MACH_UBNT_XM
        bool "Ubiquiti Networks XM/UniFi boards"
index c4aa70c..856c0e1 100644 (file)
@@ -7,7 +7,7 @@
 +      ATH79_MACH_TUBE2H,              /* Alfa Network Tube2H */
        ATH79_MACH_UBNT_AIRROUTER,      /* Ubiquiti AirRouter */
        ATH79_MACH_UBNT_BULLET_M,       /* Ubiquiti Bullet M */
-       ATH79_MACH_UBNT_LSSR71,         /* Ubiquiti LS-SR71 */
+       ATH79_MACH_UBNT_LOCO_M_XW,      /* Ubiquiti Loco M XW */
 --- a/arch/mips/ath79/Kconfig
 +++ b/arch/mips/ath79/Kconfig
 @@ -29,6 +29,15 @@ config ATH79_MACH_ALFA_NX
@@ -28,7 +28,7 @@
        select SOC_AR724X
 --- a/arch/mips/ath79/Makefile
 +++ b/arch/mips/ath79/Makefile
-@@ -116,6 +116,7 @@ obj-$(CONFIG_ATH79_MACH_TL_WR1043ND_V2)
+@@ -116,6 +116,7 @@ obj-$(CONFIG_ATH79_MACH_TL_WR1043ND_V2)    
  obj-$(CONFIG_ATH79_MACH_TL_WR2543N)   += mach-tl-wr2543n.o
  obj-$(CONFIG_ATH79_MACH_TL_WR703N)    += mach-tl-wr703n.o
  obj-$(CONFIG_ATH79_MACH_TL_WR720N_V3) += mach-tl-wr720n-v3.o
index c9d1e1e..7ff07b6 100644 (file)
@@ -12,7 +12,7 @@
  #include "dev-ap9x-pci.h"
  #include "dev-eth.h"
  #include "dev-gpio-buttons.h"
-@@ -406,3 +408,65 @@ MIPS_MACHINE(ATH79_MACH_UBNT_NANO_M_XW,
+@@ -407,3 +409,65 @@ MIPS_MACHINE(ATH79_MACH_UBNT_NANO_M_XW, 
  
  MIPS_MACHINE(ATH79_MACH_UBNT_LOCO_M_XW, "UBNT-LOCO-XW", "Ubiquiti Loco M XW",
             ubnt_loco_m_xw_setup);
index dd76353..f49d713 100644 (file)
@@ -1,7 +1,5 @@
-Index: linux-3.10.49/arch/mips/ath79/mach-rb2011.c
-===================================================================
---- linux-3.10.49.orig/arch/mips/ath79/mach-rb2011.c
-+++ linux-3.10.49/arch/mips/ath79/mach-rb2011.c
+--- a/arch/mips/ath79/mach-rb2011.c
++++ b/arch/mips/ath79/mach-rb2011.c
 @@ -323,7 +323,7 @@ MIPS_MACHINE_NONAME(ATH79_MACH_RB_2011US
  
  static void __init rb2011r5_setup(void)
@@ -11,10 +9,8 @@ Index: linux-3.10.49/arch/mips/ath79/mach-rb2011.c
  }
  
  MIPS_MACHINE_NONAME(ATH79_MACH_RB_2011R5, "2011r5", rb2011r5_setup);
-Index: linux-3.10.49/arch/mips/ath79/machtypes.h
-===================================================================
---- linux-3.10.49.orig/arch/mips/ath79/machtypes.h
-+++ linux-3.10.49/arch/mips/ath79/machtypes.h
+--- a/arch/mips/ath79/machtypes.h
++++ b/arch/mips/ath79/machtypes.h
 @@ -99,7 +99,7 @@ enum ath79_mach_type {
        ATH79_MACH_RB_2011G,            /* Mikrotik RouterBOARD 2011UAS-2HnD */
        ATH79_MACH_RB_2011L,            /* Mikrotik RouterBOARD 2011L */
index 6be83b0..c815b14 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/mips/ath79/Kconfig
 +++ b/arch/mips/ath79/Kconfig
-@@ -1034,6 +1034,17 @@
+@@ -1034,6 +1034,17 @@ config ATH79_MACH_BHU_BXU2000N2_A
        select ATH79_DEV_USB
        select ATH79_DEV_WMAC
  
@@ -20,7 +20,7 @@
  config SOC_AR71XX
 --- a/arch/mips/ath79/machtypes.h
 +++ b/arch/mips/ath79/machtypes.h
-@@ -80,6 +80,7 @@
+@@ -80,6 +80,7 @@ enum ath79_mach_type {
        ATH79_MACH_OM5P,                /* OpenMesh OM5P */
        ATH79_MACH_PB42,                /* Atheros PB42 */
        ATH79_MACH_PB92,                /* Atheros PB92 */
@@ -30,7 +30,7 @@
        ATH79_MACH_RB_433,              /* MikroTik RouterBOARD 433/433AH */
 --- a/arch/mips/ath79/Makefile
 +++ b/arch/mips/ath79/Makefile
-@@ -85,6 +85,7 @@
+@@ -85,6 +85,7 @@ obj-$(CONFIG_ATH79_MACH_OM5P)                += mach-o
  obj-$(CONFIG_ATH79_MACH_PB42)         += mach-pb42.o
  obj-$(CONFIG_ATH79_MACH_PB44)         += mach-pb44.o
  obj-$(CONFIG_ATH79_MACH_PB92)         += mach-pb92.o
index 121276a..4217545 100644 (file)
  #include <asm/uaccess.h>
  
  #include <linux/proc_fs.h>
-@@ -763,10 +764,10 @@ static void tcp_v6_send_response(struct
+@@ -763,10 +764,10 @@ static void tcp_v6_send_response(struct 
        topt = (__be32 *)(t1 + 1);
  
        if (tsecr) {
        for (p = *head; p; p = p->next) {
 --- a/net/ipv4/route.c
 +++ b/net/ipv4/route.c
-@@ -461,7 +461,7 @@ static struct neighbour *ipv4_neigh_look
+@@ -462,7 +462,7 @@ static struct neighbour *ipv4_neigh_look
        else if (skb)
                pkey = &ip_hdr(skb)->daddr;
  
  #include <linux/netdevice.h>
 --- a/include/net/inet_ecn.h
 +++ b/include/net/inet_ecn.h
-@@ -115,13 +115,13 @@ static inline int IP6_ECN_set_ce(struct
+@@ -115,13 +115,13 @@ static inline int IP6_ECN_set_ce(struct 
  {
        if (INET_ECN_is_not_ect(ipv6_get_dsfield(iph)))
                return 0;
                return false;
  
        return true;
-@@ -587,13 +591,13 @@ static inline void ipv6_addr_set_v4mappe
+@@ -592,13 +596,13 @@ static inline void ipv6_addr_set_v4mappe
   */
  static inline int __ipv6_addr_diff32(const void *token1, const void *token2, int addrlen)
  {
                if (xb)
                        return i * 32 + 31 - __fls(ntohl(xb));
        }
-@@ -657,12 +661,13 @@ extern void ipv6_select_ident(struct fra
+@@ -660,12 +664,13 @@ static inline int ipv6_addr_diff(const s
  static inline void ip6_flow_hdr(struct ipv6hdr *hdr, unsigned int tclass,
                                __be32 flowlabel)
  {
  #include <linux/types.h>
 +#include <linux/in6.h>
  
- extern __u32 secure_ip_id(__be32 daddr);
- extern __u32 secure_ipv6_id(const __be32 daddr[4]);
+ extern u32 secure_ipv4_port_ephemeral(__be32 saddr, __be32 daddr, __be16 dport);
+ extern u32 secure_ipv6_port_ephemeral(const __be32 *saddr, const __be32 *daddr,
 --- a/include/uapi/linux/in.h
 +++ b/include/uapi/linux/in.h
 @@ -55,7 +55,7 @@ enum {
        secret[4] = net_secret[4] + (__force u32)dport;
        for (i = 5; i < MD5_MESSAGE_BYTES / 4; i++)
                secret[i] = net_secret[i];
-@@ -185,11 +187,12 @@ u64 secure_dccpv6_sequence_number(__be32
+@@ -160,11 +162,12 @@ u64 secure_dccpv6_sequence_number(__be32
        u32 hash[MD5_DIGEST_WORDS];
        u64 seq;
        u32 i;
        ptr = ip6hoff + sizeof(struct ipv6hdr);
 --- a/net/xfrm/xfrm_input.c
 +++ b/net/xfrm/xfrm_input.c
-@@ -77,8 +77,8 @@ int xfrm_parse_spi(struct sk_buff *skb,
+@@ -77,8 +77,8 @@ int xfrm_parse_spi(struct sk_buff *skb, 
        if (!pskb_may_pull(skb, hlen))
                return -EINVAL;