Changeset 49035


Ignore:
Timestamp:
2016-03-19T00:41:21+01:00 (23 months ago)
Author:
hauke
Message:

kernel: update kernel 4.1 to version 4.1.20

Signed-off-by: Hauke Mehrtens <hauke@…>

Location:
trunk
Files:
32 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/kernel-version.mk

    r49032 r49035  
    44 
    55LINUX_VERSION-3.18 = .27 
    6 LINUX_VERSION-4.1 = .16 
     6LINUX_VERSION-4.1 = .20 
    77LINUX_VERSION-4.3 = .4 
    88LINUX_VERSION-4.4 = .6 
    99 
    1010LINUX_KERNEL_MD5SUM-3.18.27 = 015a01bf84e7c6bc9952551b4da45044 
    11 LINUX_KERNEL_MD5SUM-4.1.16 = e4bf22fed49b476b47acffc00c03267a 
     11LINUX_KERNEL_MD5SUM-4.1.20 = 075c38a3a23ca5bc80437b13606df00a 
    1212LINUX_KERNEL_MD5SUM-4.3.4 = 5275d02132107c28b85f986bad576d91 
    1313LINUX_KERNEL_MD5SUM-4.4.6 = efc822dad2149e40cc908718a4fea1d3 
  • trunk/target/linux/ar71xx/patches-4.1/910-unaligned_access_hacks.patch

    r48497 r49035  
    215215 #include <linux/ipv6.h> 
    216216 #include <linux/icmpv6.h> 
    217 @@ -774,10 +775,10 @@ static void tcp_v6_send_response(struct 
     217@@ -776,10 +777,10 @@ static void tcp_v6_send_response(struct 
    218218        topt = (__be32 *)(t1 + 1); 
    219219  
     
    242242--- a/net/ipv6/datagram.c 
    243243+++ b/net/ipv6/datagram.c 
    244 @@ -426,7 +426,7 @@ int ipv6_recv_error(struct sock *sk, str 
     244@@ -429,7 +429,7 @@ int ipv6_recv_error(struct sock *sk, str 
    245245                                ipv6_iface_scope_id(&sin->sin6_addr, 
    246246                                                    IP6CB(skb)->iif); 
     
    251251                        sin->sin6_scope_id = 0; 
    252252                } 
    253 @@ -763,12 +763,12 @@ int ip6_datagram_send_ctl(struct net *ne 
     253@@ -766,12 +766,12 @@ int ip6_datagram_send_ctl(struct net *ne 
    254254                        } 
    255255  
     
    360360--- a/net/ipv4/route.c 
    361361+++ b/net/ipv4/route.c 
    362 @@ -453,7 +453,7 @@ static struct neighbour *ipv4_neigh_look 
     362@@ -454,7 +454,7 @@ static struct neighbour *ipv4_neigh_look 
    363363        else if (skb) 
    364364                pkey = &ip_hdr(skb)->daddr; 
     
    633633--- a/include/net/inet_ecn.h 
    634634+++ b/include/net/inet_ecn.h 
    635 @@ -115,13 +115,13 @@ static inline int IP6_ECN_set_ce(struct 
    636  { 
     635@@ -124,9 +124,9 @@ static inline int IP6_ECN_set_ce(struct 
    637636        if (INET_ECN_is_not_ect(ipv6_get_dsfield(iph))) 
    638637                return 0; 
    639 -       *(__be32*)iph |= htonl(INET_ECN_CE << 20); 
    640 +       net_hdr_word(iph) |= htonl(INET_ECN_CE << 20); 
     638  
     639-       from = *(__be32 *)iph; 
     640+       from = net_hdr_word(iph); 
     641        to = from | htonl(INET_ECN_CE << 20); 
     642-       *(__be32 *)iph = to; 
     643+       net_hdr_word(iph) = to; 
     644        if (skb->ip_summed == CHECKSUM_COMPLETE) 
     645                skb->csum = csum_add(csum_sub(skb->csum, from), to); 
    641646        return 1; 
    642  } 
     647@@ -134,7 +134,7 @@ static inline int IP6_ECN_set_ce(struct 
    643648  
    644649 static inline void IP6_ECN_clear(struct ipv6hdr *iph) 
  • trunk/target/linux/bcm53xx/patches-4.1/191-usb-xhci-add-Broadcom-specific-fake-doorbell.patch

    r48223 r49035  
    116116--- a/drivers/usb/host/xhci.h 
    117117+++ b/drivers/usb/host/xhci.h 
    118 @@ -1568,6 +1568,7 @@ struct xhci_hcd { 
    119  /* For controllers with a broken beyond repair streams implementation */ 
     118@@ -1571,6 +1571,7 @@ struct xhci_hcd { 
    120119 #define XHCI_BROKEN_STREAMS    (1 << 19) 
    121120 #define XHCI_PME_STUCK_QUIRK   (1 << 20) 
    122 +#define XHCI_FAKE_DOORBELL     (1 << 21) 
     121 #define XHCI_SSIC_PORT_UNUSED  (1 << 22) 
     122+#define XHCI_FAKE_DOORBELL     (1 << 23) 
    123123        unsigned int            num_active_eps; 
    124124        unsigned int            limit_active_eps; 
  • trunk/target/linux/bcm53xx/patches-4.1/710-b53-add-hacky-CPU-port-fixes-for-devices-not-using-p.patch

    r47281 r49035  
    2222 #include "b53_regs.h" 
    2323 #include "b53_priv.h" 
    24 @@ -1313,6 +1314,18 @@ static int b53_switch_init(struct b53_de 
     24@@ -1370,6 +1371,18 @@ static int b53_switch_init(struct b53_de 
    2525                        sw_dev->cpu_port = 5; 
    2626        } 
  • trunk/target/linux/brcm63xx/patches-4.1/803-jffs2-work-around-unaligned-accesses-failing-on-bcm6.patch

    r46113 r49035  
    1616--- a/fs/jffs2/nodelist.h 
    1717+++ b/fs/jffs2/nodelist.h 
    18 @@ -255,7 +255,7 @@ struct jffs2_full_dirent 
     18@@ -259,7 +259,7 @@ struct jffs2_full_dirent 
    1919        uint32_t ino; /* == zero for unlink */ 
    2020        unsigned int nhash; 
  • trunk/target/linux/generic/patches-4.1/040-fs-overlay-fix-stacking.patch

    r47714 r49035  
    2222--- a/fs/overlayfs/inode.c 
    2323+++ b/fs/overlayfs/inode.c 
    24 @@ -362,6 +362,9 @@ struct inode *ovl_d_select_inode(struct 
     24@@ -375,6 +375,9 @@ struct inode *ovl_d_select_inode(struct 
    2525                ovl_path_upper(dentry, &realpath); 
    2626        } 
  • trunk/target/linux/generic/patches-4.1/080-ipv6-ip6_fragment-fix-headroom-tests-and-skb-leak.patch

    r46992 r49035  
    4545--- a/net/ipv6/ip6_output.c 
    4646+++ b/net/ipv6/ip6_output.c 
    47 @@ -584,20 +584,22 @@ int ip6_fragment(struct sock *sk, struct 
     47@@ -587,20 +587,22 @@ int ip6_fragment(struct sock *sk, struct 
    4848        } 
    4949        mtu -= hlen + sizeof(struct frag_hdr); 
     
    7070  
    7171                        /* Partially cloned skb? */ 
    72 @@ -614,8 +616,6 @@ int ip6_fragment(struct sock *sk, struct 
     72@@ -617,8 +619,6 @@ int ip6_fragment(struct sock *sk, struct 
    7373  
    7474                err = 0; 
     
    7979  
    8080                *prevhdr = NEXTHDR_FRAGMENT; 
    81 @@ -623,8 +623,11 @@ int ip6_fragment(struct sock *sk, struct 
     81@@ -626,8 +626,11 @@ int ip6_fragment(struct sock *sk, struct 
    8282                if (!tmp_hdr) { 
    8383                        IP6_INC_STATS(net, ip6_dst_idev(skb_dst(skb)), 
     
    9292                __skb_pull(skb, hlen); 
    9393                fh = (struct frag_hdr *)__skb_push(skb, sizeof(struct frag_hdr)); 
    94 @@ -722,7 +725,6 @@ slow_path: 
     94@@ -725,7 +728,6 @@ slow_path: 
    9595         */ 
    9696  
  • trunk/target/linux/generic/patches-4.1/190-cdc_ncm_add_support_for_moving_ndp_to_end_of_ncm_frame.patch

    r46493 r49035  
    4848--- a/drivers/net/usb/cdc_ncm.c 
    4949+++ b/drivers/net/usb/cdc_ncm.c 
    50 @@ -684,10 +684,12 @@ static void cdc_ncm_free(struct cdc_ncm_ 
     50@@ -685,6 +685,8 @@ static void cdc_ncm_free(struct cdc_ncm_ 
    5151                ctx->tx_curr_skb = NULL; 
    5252        } 
     
    5656        kfree(ctx); 
    5757 } 
     58  
     59@@ -715,7 +717,7 @@ static const struct net_device_ops cdc_n 
     60        .ndo_validate_addr   = eth_validate_addr, 
     61 }; 
    5862  
    5963-int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_altsetting) 
     
    6266        const struct usb_cdc_union_desc *union_desc = NULL; 
    6367        struct cdc_ncm_ctx *ctx; 
    64 @@ -855,6 +857,17 @@ advance: 
     68@@ -883,6 +885,17 @@ advance: 
    6569        /* finish setting up the device specific data */ 
    6670        cdc_ncm_setup(dev); 
     
    8084        dev->net->ethtool_ops = &cdc_ncm_ethtool_ops; 
    8185  
    82 @@ -954,8 +967,11 @@ static int cdc_ncm_bind(struct usbnet *d 
     86@@ -985,8 +998,11 @@ static int cdc_ncm_bind(struct usbnet *d 
    8387        if (cdc_ncm_select_altsetting(intf) != CDC_NCM_COMM_ALTSETTING_NCM) 
    8488                return -ENODEV; 
     
    9498        /* 
    9599         * We should get an event when network connection is "connected" or 
    96 @@ -986,6 +1002,14 @@ static struct usb_cdc_ncm_ndp16 *cdc_ncm 
     100@@ -1017,6 +1033,14 @@ static struct usb_cdc_ncm_ndp16 *cdc_ncm 
    97101        struct usb_cdc_ncm_nth16 *nth16 = (void *)skb->data; 
    98102        size_t ndpoffset = le16_to_cpu(nth16->wNdpIndex); 
     
    109113        while (ndpoffset) { 
    110114                ndp16 = (struct usb_cdc_ncm_ndp16 *)(skb->data + ndpoffset); 
    111 @@ -995,7 +1019,8 @@ static struct usb_cdc_ncm_ndp16 *cdc_ncm 
     115@@ -1026,7 +1050,8 @@ static struct usb_cdc_ncm_ndp16 *cdc_ncm 
    112116        } 
    113117  
     
    119123        /* verify that there is room for the NDP and the datagram (reserve) */ 
    120124        if ((ctx->tx_max - skb->len - reserve) < ctx->max_ndp_size) 
    121 @@ -1008,7 +1033,11 @@ static struct usb_cdc_ncm_ndp16 *cdc_ncm 
     125@@ -1039,7 +1064,11 @@ static struct usb_cdc_ncm_ndp16 *cdc_ncm 
    122126                nth16->wNdpIndex = cpu_to_le16(skb->len); 
    123127  
     
    132136        ndp16->wLength = cpu_to_le16(sizeof(struct usb_cdc_ncm_ndp16) + sizeof(struct usb_cdc_ncm_dpe16)); 
    133137        return ndp16; 
    134 @@ -1023,6 +1052,15 @@ cdc_ncm_fill_tx_frame(struct usbnet *dev 
     138@@ -1054,6 +1083,15 @@ cdc_ncm_fill_tx_frame(struct usbnet *dev 
    135139        struct sk_buff *skb_out; 
    136140        u16 n = 0, index, ndplen; 
     
    148152        /* if there is a remaining skb, it gets priority */ 
    149153        if (skb != NULL) { 
    150 @@ -1077,7 +1115,7 @@ cdc_ncm_fill_tx_frame(struct usbnet *dev 
     154@@ -1108,7 +1146,7 @@ cdc_ncm_fill_tx_frame(struct usbnet *dev 
    151155                cdc_ncm_align_tail(skb_out,  ctx->tx_modulus, ctx->tx_remainder, ctx->tx_max); 
    152156  
     
    157161                                /* won't fit, MTU problem? */ 
    158162                                dev_kfree_skb_any(skb); 
    159 @@ -1150,6 +1188,17 @@ cdc_ncm_fill_tx_frame(struct usbnet *dev 
     163@@ -1181,6 +1219,17 @@ cdc_ncm_fill_tx_frame(struct usbnet *dev 
    160164                /* variables will be reset at next call */ 
    161165        } 
     
    218222        u32 tx_timer_pending; 
    219223        u32 tx_curr_frame_num; 
    220 @@ -133,7 +138,7 @@ struct cdc_ncm_ctx { 
    221  }; 
     224@@ -134,7 +139,7 @@ struct cdc_ncm_ctx { 
    222225  
    223226 u8 cdc_ncm_select_altsetting(struct usb_interface *intf); 
     227 int cdc_ncm_change_mtu(struct net_device *net, int new_mtu); 
    224228-int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_altsetting); 
    225229+int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_altsetting, int drvflags); 
  • trunk/target/linux/generic/patches-4.1/193-USB-qmi_wwan-Add-quirk-for-Quectel-EC20-Mini-PCIe-mo.patch

    r48223 r49035  
    4949--- a/drivers/net/usb/qmi_wwan.c 
    5050+++ b/drivers/net/usb/qmi_wwan.c 
    51 @@ -820,6 +820,7 @@ static const struct usb_device_id produc 
     51@@ -821,6 +821,7 @@ static const struct usb_device_id produc 
    5252        {QMI_GOBI_DEVICE(0x05c6, 0x9245)},      /* Samsung Gobi 2000 Modem device (VL176) */ 
    5353        {QMI_GOBI_DEVICE(0x03f0, 0x251d)},      /* HP Gobi 2000 Modem device (VP412) */ 
     
    5757        {QMI_GOBI_DEVICE(0x05c6, 0x9235)},      /* Top Global Gobi 2000 Modem device (VR306) */ 
    5858        {QMI_GOBI_DEVICE(0x05c6, 0x9275)},      /* iRex Technologies Gobi 2000 Modem device (VR307) */ 
    59 @@ -851,10 +852,24 @@ static const struct usb_device_id produc 
     59@@ -852,10 +853,24 @@ static const struct usb_device_id produc 
    6060 }; 
    6161 MODULE_DEVICE_TABLE(usb, products); 
     
    8282        /* Workaround to enable dynamic IDs.  This disables usbnet 
    8383         * blacklisting functionality.  Which, if required, can be 
    84 @@ -866,6 +881,12 @@ static int qmi_wwan_probe(struct usb_int 
     84@@ -867,6 +882,12 @@ static int qmi_wwan_probe(struct usb_int 
    8585                id->driver_info = (unsigned long)&qmi_wwan_info; 
    8686        } 
  • trunk/target/linux/generic/patches-4.1/532-jffs2_eofdetect.patch

    r46112 r49035  
    11--- a/fs/jffs2/build.c 
    22+++ b/fs/jffs2/build.c 
    3 @@ -114,6 +114,16 @@ static int jffs2_build_filesystem(struct 
     3@@ -116,6 +116,16 @@ static int jffs2_build_filesystem(struct 
    44        dbg_fsbuild("scanned flash completely\n"); 
    55        jffs2_dbg_dump_block_lists_nolock(c); 
  • trunk/target/linux/generic/patches-4.1/650-pppoe_header_pad.patch

    r48497 r49035  
    11--- a/drivers/net/ppp/pppoe.c 
    22+++ b/drivers/net/ppp/pppoe.c 
    3 @@ -877,7 +877,7 @@ static int pppoe_sendmsg(struct socket * 
     3@@ -879,7 +879,7 @@ static int pppoe_sendmsg(struct socket * 
    44                goto end; 
    55  
     
    1010        if (!skb) { 
    1111                error = -ENOMEM; 
    12 @@ -885,7 +885,7 @@ static int pppoe_sendmsg(struct socket * 
     12@@ -887,7 +887,7 @@ static int pppoe_sendmsg(struct socket * 
    1313        } 
    1414  
  • trunk/target/linux/generic/patches-4.1/655-increase_skb_pad.patch

    r47104 r49035  
    11--- a/include/linux/skbuff.h 
    22+++ b/include/linux/skbuff.h 
    3 @@ -2027,7 +2027,7 @@ static inline int pskb_network_may_pull( 
     3@@ -2028,7 +2028,7 @@ static inline int pskb_network_may_pull( 
    44  * NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8) 
    55  */ 
  • trunk/target/linux/generic/patches-4.1/656-skb_reduce_truesize-helper.patch

    r47104 r49035  
    1515--- a/include/linux/skbuff.h 
    1616+++ b/include/linux/skbuff.h 
    17 @@ -2072,6 +2072,24 @@ static inline void pskb_trim_unique(stru 
     17@@ -2073,6 +2073,24 @@ static inline void pskb_trim_unique(stru 
    1818        BUG_ON(err); 
    1919 } 
  • trunk/target/linux/generic/patches-4.1/662-use_fq_codel_by_default.patch

    r48223 r49035  
    4343--- a/net/sched/sch_generic.c 
    4444+++ b/net/sched/sch_generic.c 
    45 @@ -737,7 +737,7 @@ static void attach_one_default_qdisc(str 
     45@@ -739,7 +739,7 @@ static void attach_one_default_qdisc(str 
    4646  
    4747        if (dev->tx_queue_len) { 
  • trunk/target/linux/generic/patches-4.1/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch

    r47104 r49035  
    144144        .dst = { 
    145145                .__refcnt       = ATOMIC_INIT(1), 
    146 @@ -1634,6 +1651,11 @@ int ip6_route_info_create(struct fib6_co 
     146@@ -1632,6 +1649,11 @@ int ip6_route_info_create(struct fib6_co 
    147147                        rt->dst.output = ip6_pkt_prohibit_out; 
    148148                        rt->dst.input = ip6_pkt_prohibit; 
     
    156156                default: 
    157157                        rt->dst.error = (cfg->fc_type == RTN_THROW) ? -EAGAIN 
    158 @@ -2225,6 +2247,17 @@ static int ip6_pkt_prohibit_out(struct s 
     158@@ -2223,6 +2245,17 @@ static int ip6_pkt_prohibit_out(struct s 
    159159        return ip6_pkt_drop(skb, ICMPV6_ADM_PROHIBITED, IPSTATS_MIB_OUTNOROUTES); 
    160160 } 
     
    174174  *     Allocate a dst for local (unicast / anycast) address. 
    175175  */ 
    176 @@ -2451,7 +2484,8 @@ static int rtm_to_fib6_config(struct sk_ 
     176@@ -2449,7 +2482,8 @@ static int rtm_to_fib6_config(struct sk_ 
    177177        if (rtm->rtm_type == RTN_UNREACHABLE || 
    178178            rtm->rtm_type == RTN_BLACKHOLE || 
     
    184184  
    185185        if (rtm->rtm_type == RTN_LOCAL) 
    186 @@ -2793,6 +2827,9 @@ static int rt6_fill_node(struct net *net 
     186@@ -2791,6 +2825,9 @@ static int rt6_fill_node(struct net *net 
    187187                case -EACCES: 
    188188                        rtm->rtm_type = RTN_PROHIBIT; 
     
    194194                        rtm->rtm_type = RTN_THROW; 
    195195                        break; 
    196 @@ -3050,6 +3087,8 @@ static int ip6_route_dev_notify(struct n 
     196@@ -3048,6 +3085,8 @@ static int ip6_route_dev_notify(struct n 
    197197 #ifdef CONFIG_IPV6_MULTIPLE_TABLES 
    198198                net->ipv6.ip6_prohibit_entry->dst.dev = dev; 
     
    203203                net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev); 
    204204 #endif 
    205 @@ -3266,6 +3305,17 @@ static int __net_init ip6_route_net_init 
     205@@ -3264,6 +3303,17 @@ static int __net_init ip6_route_net_init 
    206206        net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops; 
    207207        dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst, 
     
    221221  
    222222        net->ipv6.sysctl.flush_delay = 0; 
    223 @@ -3284,6 +3334,8 @@ out: 
     223@@ -3282,6 +3332,8 @@ out: 
    224224        return ret; 
    225225  
     
    230230        kfree(net->ipv6.ip6_prohibit_entry); 
    231231 out_ip6_null_entry: 
    232 @@ -3301,6 +3353,7 @@ static void __net_exit ip6_route_net_exi 
     232@@ -3299,6 +3351,7 @@ static void __net_exit ip6_route_net_exi 
    233233 #ifdef CONFIG_IPV6_MULTIPLE_TABLES 
    234234        kfree(net->ipv6.ip6_prohibit_entry); 
     
    238238        dst_entries_destroy(&net->ipv6.ip6_dst_ops); 
    239239 } 
    240 @@ -3397,6 +3450,9 @@ int __init ip6_route_init(void) 
     240@@ -3395,6 +3448,9 @@ int __init ip6_route_init(void) 
    241241        init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev); 
    242242        init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev; 
  • trunk/target/linux/generic/patches-4.1/680-NET-skip-GRO-for-foreign-MAC-addresses.patch

    r47104 r49035  
    1818--- a/net/core/dev.c 
    1919+++ b/net/core/dev.c 
    20 @@ -4036,6 +4036,9 @@ static enum gro_result dev_gro_receive(s 
     20@@ -4041,6 +4041,9 @@ static enum gro_result dev_gro_receive(s 
    2121        enum gro_result ret; 
    2222        int grow; 
     
    2828                goto normal; 
    2929  
    30 @@ -5185,6 +5188,48 @@ static void __netdev_adjacent_dev_unlink 
     30@@ -5190,6 +5193,48 @@ static void __netdev_adjacent_dev_unlink 
    3131                                           &upper_dev->adj_list.lower); 
    3232 } 
     
    7777                                   struct net_device *upper_dev, bool master, 
    7878                                   void *private) 
    79 @@ -5245,6 +5290,7 @@ static int __netdev_upper_dev_link(struc 
     79@@ -5250,6 +5295,7 @@ static int __netdev_upper_dev_link(struc 
    8080                        goto rollback_lower_mesh; 
    8181        } 
     
    8585        return 0; 
    8686  
    87 @@ -5362,6 +5408,7 @@ void netdev_upper_dev_unlink(struct net_ 
     87@@ -5367,6 +5413,7 @@ void netdev_upper_dev_unlink(struct net_ 
    8888        list_for_each_entry(i, &upper_dev->all_adj_list.upper, list) 
    8989                __netdev_adjacent_dev_unlink(dev, i->dev); 
     
    9393 } 
    9494 EXPORT_SYMBOL(netdev_upper_dev_unlink); 
    95 @@ -5901,6 +5948,7 @@ int dev_set_mac_address(struct net_devic 
     95@@ -5906,6 +5953,7 @@ int dev_set_mac_address(struct net_devic 
    9696        if (err) 
    9797                return err; 
     
    114114--- a/include/linux/skbuff.h 
    115115+++ b/include/linux/skbuff.h 
    116 @@ -615,7 +615,8 @@ struct sk_buff { 
     116@@ -616,7 +616,8 @@ struct sk_buff { 
    117117        __u8                    ipvs_property:1; 
    118118        __u8                    inner_protocol_type:1; 
  • trunk/target/linux/generic/patches-4.1/721-phy_packets.patch

    r47104 r49035  
    4242--- a/include/linux/skbuff.h 
    4343+++ b/include/linux/skbuff.h 
    44 @@ -2058,6 +2058,10 @@ static inline int pskb_trim(struct sk_bu 
     44@@ -2059,6 +2059,10 @@ static inline int pskb_trim(struct sk_bu 
    4545        return (len < skb->len) ? __pskb_trim(skb, len) : 0; 
    4646 } 
     
    5353  *     pskb_trim_unique - remove end from a paged unique (not cloned) buffer 
    5454  *     @skb: buffer to alter 
    55 @@ -2184,16 +2188,6 @@ static inline struct sk_buff *dev_alloc_ 
     55@@ -2185,16 +2189,6 @@ static inline struct sk_buff *dev_alloc_ 
    5656 } 
    5757  
     
    8787--- a/net/core/dev.c 
    8888+++ b/net/core/dev.c 
    89 @@ -2645,10 +2645,20 @@ static int xmit_one(struct sk_buff *skb, 
     89@@ -2650,10 +2650,20 @@ static int xmit_one(struct sk_buff *skb, 
    9090        if (!list_empty(&ptype_all) || !list_empty(&dev->ptype_all)) 
    9191                dev_queue_xmit_nit(skb, dev); 
     
    122122 #include <net/protocol.h> 
    123123 #include <net/dst.h> 
    124 @@ -568,6 +569,22 @@ struct sk_buff *__napi_alloc_skb(struct 
     124@@ -570,6 +571,22 @@ struct sk_buff *__napi_alloc_skb(struct 
    125125 } 
    126126 EXPORT_SYMBOL(__napi_alloc_skb); 
  • trunk/target/linux/generic/patches-4.1/902-debloat_proc.patch

    r48497 r49035  
    11--- a/fs/locks.c 
    22+++ b/fs/locks.c 
    3 @@ -2674,6 +2674,8 @@ static const struct file_operations proc 
     3@@ -2683,6 +2683,8 @@ static const struct file_operations proc 
    44  
    55 static int __init proc_locks_init(void) 
     
    240240--- a/net/ipv4/route.c 
    241241+++ b/net/ipv4/route.c 
    242 @@ -415,6 +415,9 @@ static struct pernet_operations ip_rt_pr 
     242@@ -416,6 +416,9 @@ static struct pernet_operations ip_rt_pr 
    243243  
    244244 static int __init ip_rt_proc_init(void) 
  • trunk/target/linux/ixp4xx/patches-4.1/600-skb_avoid_dmabounce.patch

    r46189 r49035  
    11--- a/net/core/skbuff.c 
    22+++ b/net/core/skbuff.c 
    3 @@ -212,6 +212,9 @@ struct sk_buff *__alloc_skb(unsigned int 
     3@@ -214,6 +214,9 @@ struct sk_buff *__alloc_skb(unsigned int 
    44  
    55        if (sk_memalloc_socks() && (flags & SKB_ALLOC_RX)) 
     
    1111        /* Get the HEAD */ 
    1212        skb = kmem_cache_alloc_node(cache, gfp_mask & ~__GFP_DMA, node); 
    13 @@ -1192,6 +1195,10 @@ int pskb_expand_head(struct sk_buff *skb 
     13@@ -1194,6 +1197,10 @@ int pskb_expand_head(struct sk_buff *skb 
    1414        if (skb_shared(skb)) 
    1515                BUG(); 
  • trunk/target/linux/mediatek/patches/0010-thermal-consistently-use-int-for-temperatures.patch

    r47694 r49035  
    747747--- a/drivers/thermal/step_wise.c 
    748748+++ b/drivers/thermal/step_wise.c 
    749 @@ -113,7 +113,7 @@ static void update_passive_instance(stru 
     749@@ -126,7 +126,7 @@ static void update_passive_instance(stru 
    750750  
    751751 static void thermal_zone_trip_update(struct thermal_zone_device *tz, int trip) 
     
    756756        enum thermal_trend trend; 
    757757        struct thermal_instance *instance; 
    758 @@ -135,7 +135,7 @@ static void thermal_zone_trip_update(str 
     758@@ -148,7 +148,7 @@ static void thermal_zone_trip_update(str 
    759759                trace_thermal_zone_trip(tz, trip, trip_type); 
    760760        } 
     
    787787--- a/drivers/thermal/thermal_core.c 
    788788+++ b/drivers/thermal/thermal_core.c 
    789 @@ -363,7 +363,7 @@ static void handle_non_critical_trips(st 
     789@@ -366,7 +366,7 @@ static void handle_non_critical_trips(st 
    790790 static void handle_critical_trips(struct thermal_zone_device *tz, 
    791791                                int trip, enum thermal_trip_type trip_type) 
     
    796796        tz->ops->get_trip_temp(tz, trip, &trip_temp); 
    797797  
    798 @@ -411,12 +411,12 @@ static void handle_thermal_trip(struct t 
     798@@ -414,12 +414,12 @@ static void handle_thermal_trip(struct t 
    799799  * 
    800800  * Return: On success returns 0, an error code otherwise 
     
    811811 #endif 
    812812  
    813 @@ -453,8 +453,7 @@ EXPORT_SYMBOL_GPL(thermal_zone_get_temp) 
     813@@ -456,8 +456,7 @@ EXPORT_SYMBOL_GPL(thermal_zone_get_temp) 
    814814  
    815815 static void update_temperature(struct thermal_zone_device *tz) 
     
    821821        ret = thermal_zone_get_temp(tz, &temp); 
    822822        if (ret) { 
    823 @@ -514,15 +513,14 @@ static ssize_t 
     823@@ -534,15 +533,14 @@ static ssize_t 
    824824 temp_show(struct device *dev, struct device_attribute *attr, char *buf) 
    825825 { 
     
    839839  
    840840 static ssize_t 
    841 @@ -626,7 +624,7 @@ trip_point_temp_show(struct device *dev, 
     841@@ -646,7 +644,7 @@ trip_point_temp_show(struct device *dev, 
    842842 { 
    843843        struct thermal_zone_device *tz = to_thermal_zone(dev); 
     
    848848        if (!tz->ops->get_trip_temp) 
    849849                return -EPERM; 
    850 @@ -639,7 +637,7 @@ trip_point_temp_show(struct device *dev, 
     850@@ -659,7 +657,7 @@ trip_point_temp_show(struct device *dev, 
    851851        if (ret) 
    852852                return ret; 
     
    857857  
    858858 static ssize_t 
    859 @@ -648,7 +646,7 @@ trip_point_hyst_store(struct device *dev 
     859@@ -668,7 +666,7 @@ trip_point_hyst_store(struct device *dev 
    860860 { 
    861861        struct thermal_zone_device *tz = to_thermal_zone(dev); 
     
    866866        if (!tz->ops->set_trip_hyst) 
    867867                return -EPERM; 
    868 @@ -656,7 +654,7 @@ trip_point_hyst_store(struct device *dev 
     868@@ -676,7 +674,7 @@ trip_point_hyst_store(struct device *dev 
    869869        if (!sscanf(attr->attr.name, "trip_point_%d_hyst", &trip)) 
    870870                return -EINVAL; 
     
    875875  
    876876        /* 
    877 @@ -675,7 +673,7 @@ trip_point_hyst_show(struct device *dev, 
     877@@ -695,7 +693,7 @@ trip_point_hyst_show(struct device *dev, 
    878878 { 
    879879        struct thermal_zone_device *tz = to_thermal_zone(dev); 
     
    884884        if (!tz->ops->get_trip_hyst) 
    885885                return -EPERM; 
    886 @@ -685,7 +683,7 @@ trip_point_hyst_show(struct device *dev, 
     886@@ -705,7 +703,7 @@ trip_point_hyst_show(struct device *dev, 
    887887  
    888888        ret = tz->ops->get_trip_hyst(tz, trip, &temperature); 
     
    10321032--- a/include/linux/thermal.h 
    10331033+++ b/include/linux/thermal.h 
    1034 @@ -86,23 +86,19 @@ struct thermal_zone_device_ops { 
     1034@@ -89,23 +89,19 @@ struct thermal_zone_device_ops { 
    10351035                     struct thermal_cooling_device *); 
    10361036        int (*unbind) (struct thermal_zone_device *, 
     
    10631063                          enum thermal_trend *); 
    10641064        int (*notify) (struct thermal_zone_device *, int, 
    1065 @@ -272,9 +268,9 @@ struct thermal_genl_event { 
     1065@@ -277,9 +273,9 @@ struct thermal_genl_event { 
    10661066  *                temperature. 
    10671067  */ 
     
    10751075  
    10761076 /** 
    1077 @@ -335,7 +331,7 @@ thermal_of_cooling_device_register(struc 
     1077@@ -340,7 +336,7 @@ thermal_of_cooling_device_register(struc 
    10781078                                   const struct thermal_cooling_device_ops *); 
    10791079 void thermal_cooling_device_unregister(struct thermal_cooling_device *); 
     
    10841084 int get_tz_trend(struct thermal_zone_device *, int); 
    10851085 struct thermal_instance *get_thermal_instance(struct thermal_zone_device *, 
    1086 @@ -378,7 +374,7 @@ static inline struct thermal_zone_device 
     1086@@ -383,7 +379,7 @@ static inline struct thermal_zone_device 
    10871087                const char *name) 
    10881088 { return ERR_PTR(-ENODEV); } 
  • trunk/target/linux/mediatek/patches/0011-thermal-trivial-fix-typo-in-comment.patch

    r47694 r49035  
    1212--- a/drivers/thermal/thermal_core.c 
    1313+++ b/drivers/thermal/thermal_core.c 
    14 @@ -402,7 +402,7 @@ static void handle_thermal_trip(struct t 
     14@@ -405,7 +405,7 @@ static void handle_thermal_trip(struct t 
    1515 } 
    1616  
  • trunk/target/linux/mediatek/patches/0012-thermal-remove-useless-call-to-thermal_zone_device_s.patch

    r47694 r49035  
    1818--- a/drivers/thermal/thermal_core.c 
    1919+++ b/drivers/thermal/thermal_core.c 
    20 @@ -1571,9 +1571,6 @@ struct thermal_zone_device *thermal_zone 
     20@@ -1601,9 +1601,6 @@ struct thermal_zone_device *thermal_zone 
    2121  
    2222        INIT_DELAYED_WORK(&(tz->poll_queue), thermal_zone_device_check); 
     
    2525-               thermal_zone_device_set_polling(tz, 0); 
    2626- 
    27         thermal_zone_device_update(tz); 
    28   
    29         return tz; 
     27        thermal_zone_device_reset(tz); 
     28        /* Update the new thermal zone and mark it as already updated. */ 
     29        if (atomic_cmpxchg(&tz->need_update, 1, 0)) 
  • trunk/target/linux/mediatek/patches/0013-thermal-Use-IS_ENABLED-instead-of-ifdef.patch

    r47694 r49035  
    1515--- a/drivers/thermal/thermal_core.c 
    1616+++ b/drivers/thermal/thermal_core.c 
    17 @@ -414,11 +414,9 @@ static void handle_thermal_trip(struct t 
     17@@ -417,11 +417,9 @@ static void handle_thermal_trip(struct t 
    1818 int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp) 
    1919 { 
     
    2727        if (!tz || IS_ERR(tz) || !tz->ops->get_temp) 
    2828                goto exit; 
    29 @@ -426,25 +424,21 @@ int thermal_zone_get_temp(struct thermal 
     29@@ -429,25 +427,21 @@ int thermal_zone_get_temp(struct thermal 
    3030        mutex_lock(&tz->lock); 
    3131  
     
    6666 exit: 
    6767        return ret; 
    68 @@ -780,7 +774,6 @@ policy_show(struct device *dev, struct d 
     68@@ -800,7 +794,6 @@ policy_show(struct device *dev, struct d 
    6969        return sprintf(buf, "%s\n", tz->governor->name); 
    7070 } 
     
    7474 emul_temp_store(struct device *dev, struct device_attribute *attr, 
    7575                     const char *buf, size_t count) 
    76 @@ -806,7 +799,6 @@ emul_temp_store(struct device *dev, stru 
     76@@ -826,7 +819,6 @@ emul_temp_store(struct device *dev, stru 
    7777        return ret ? ret : count; 
    7878 } 
     
    8282 static DEVICE_ATTR(type, 0444, type_show, NULL); 
    8383 static DEVICE_ATTR(temp, 0444, temp_show, NULL); 
    84 @@ -1536,11 +1528,12 @@ struct thermal_zone_device *thermal_zone 
     84@@ -1566,11 +1558,12 @@ struct thermal_zone_device *thermal_zone 
    8585                        goto unregister; 
    8686        } 
  • trunk/target/linux/mediatek/patches/0014-thermal-Add-comment-explaining-test-for-critical-tem.patch

    r47694 r49035  
    1616--- a/drivers/thermal/thermal_core.c 
    1717+++ b/drivers/thermal/thermal_core.c 
    18 @@ -435,6 +435,11 @@ int thermal_zone_get_temp(struct thermal 
     18@@ -438,6 +438,11 @@ int thermal_zone_get_temp(struct thermal 
    1919                        } 
    2020                } 
  • trunk/target/linux/mediatek/patches/0015-thermal-inline-only-once-used-function.patch

    r47694 r49035  
    1515--- a/drivers/thermal/thermal_core.c 
    1616+++ b/drivers/thermal/thermal_core.c 
    17 @@ -450,9 +450,12 @@ exit: 
     17@@ -453,9 +453,15 @@ exit: 
    1818 } 
    1919 EXPORT_SYMBOL_GPL(thermal_zone_get_temp); 
     
    2525+       int temp, ret, count; 
    2626+ 
     27+       if (atomic_read(&in_suspend)) 
     28+               return; 
     29+ 
    2730+       if (!tz->ops->get_temp) 
    2831+               return; 
     
    3033        ret = thermal_zone_get_temp(tz, &temp); 
    3134        if (ret) { 
    32 @@ -471,16 +474,6 @@ static void update_temperature(struct th 
    33         trace_thermal_temperature(tz); 
    34         dev_dbg(&tz->device, "last_temperature=%d, current_temperature=%d\n", 
    35                                 tz->last_temperature, tz->temperature); 
    36 -} 
    37 - 
     35@@ -478,7 +484,11 @@ static void update_temperature(struct th 
     36        else 
     37                dev_dbg(&tz->device, "last_temperature=%d, current_temperature=%d\n", 
     38                        tz->last_temperature, tz->temperature); 
     39+ 
     40+       for (count = 0; count < tz->trips; count++) 
     41+               handle_thermal_trip(tz, count); 
     42 } 
     43+EXPORT_SYMBOL_GPL(thermal_zone_device_update); 
     44  
     45 static void thermal_zone_device_reset(struct thermal_zone_device *tz) 
     46 { 
     47@@ -490,23 +500,6 @@ static void thermal_zone_device_reset(st 
     48                pos->initialized = false; 
     49 } 
     50  
    3851-void thermal_zone_device_update(struct thermal_zone_device *tz) 
    3952-{ 
    4053-       int count; 
     54- 
     55-       if (atomic_read(&in_suspend)) 
     56-               return; 
    4157- 
    4258-       if (!tz->ops->get_temp) 
     
    4460- 
    4561-       update_temperature(tz); 
    46   
    47         for (count = 0; count < tz->trips; count++) 
    48                 handle_thermal_trip(tz, count); 
     62- 
     63-       for (count = 0; count < tz->trips; count++) 
     64-               handle_thermal_trip(tz, count); 
     65-} 
     66-EXPORT_SYMBOL_GPL(thermal_zone_device_update); 
     67- 
     68 static void thermal_zone_device_check(struct work_struct *work) 
     69 { 
     70        struct thermal_zone_device *tz = container_of(work, struct 
  • trunk/target/linux/mediatek/patches/0016-thermal-streamline-get_trend-callbacks.patch

    r47694 r49035  
    104104--- a/include/linux/thermal.h 
    105105+++ b/include/linux/thermal.h 
    106 @@ -269,7 +269,7 @@ struct thermal_genl_event { 
     106@@ -274,7 +274,7 @@ struct thermal_genl_event { 
    107107  */ 
    108108 struct thermal_zone_of_device_ops { 
  • trunk/target/linux/mediatek/patches/0017-thermal-Allow-sensor-ops-to-fail-with-ENOSYS.patch

    r47694 r49035  
    2323--- a/drivers/thermal/thermal_core.c 
    2424+++ b/drivers/thermal/thermal_core.c 
    25 @@ -413,13 +413,16 @@ static void handle_thermal_trip(struct t 
     25@@ -416,13 +416,16 @@ static void handle_thermal_trip(struct t 
    2626  */ 
    2727 int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp) 
     
    4343        mutex_lock(&tz->lock); 
    4444  
    45 @@ -445,7 +448,7 @@ int thermal_zone_get_temp(struct thermal 
     45@@ -448,7 +451,7 @@ int thermal_zone_get_temp(struct thermal 
    4646        } 
    4747   
     
    5252 } 
    5353 EXPORT_SYMBOL_GPL(thermal_zone_get_temp); 
    54 @@ -454,10 +457,11 @@ void thermal_zone_device_update(struct t 
    55  { 
    56         int temp, ret, count; 
     54@@ -460,10 +463,11 @@ void thermal_zone_device_update(struct t 
     55        if (atomic_read(&in_suspend)) 
     56                return; 
    5757  
    5858-       if (!tz->ops->get_temp) 
     
    6666                if (ret != -EAGAIN) 
    6767                        dev_warn(&tz->device, 
    68 @@ -783,10 +787,16 @@ emul_temp_store(struct device *dev, stru 
     68@@ -803,10 +807,16 @@ emul_temp_store(struct device *dev, stru 
    6969        if (kstrtoul(buf, 10, &temperature)) 
    7070                return -EINVAL; 
  • trunk/target/linux/mediatek/patches/0019-thermal-Make-struct-thermal_zone_device_ops-const.patch

    r47694 r49035  
    221221--- a/drivers/thermal/thermal_core.c 
    222222+++ b/drivers/thermal/thermal_core.c 
    223 @@ -1451,7 +1451,7 @@ static void remove_trip_attrs(struct the 
     223@@ -1479,7 +1479,7 @@ static void remove_trip_attrs(struct the 
    224224  */ 
    225225 struct thermal_zone_device *thermal_zone_device_register(const char *type, 
     
    254254--- a/include/linux/thermal.h 
    255255+++ b/include/linux/thermal.h 
    256 @@ -181,7 +181,7 @@ struct thermal_zone_device { 
    257         int emul_temperature; 
     256@@ -186,7 +186,7 @@ struct thermal_zone_device { 
    258257        int passive; 
    259258        unsigned int forced_passive; 
     259        atomic_t need_update; 
    260260-       struct thermal_zone_device_ops *ops; 
    261261+       const struct thermal_zone_device_ops *ops; 
     
    263263        struct thermal_governor *governor; 
    264264        struct list_head thermal_instances; 
    265 @@ -313,7 +313,7 @@ void thermal_zone_of_sensor_unregister(s 
     265@@ -318,7 +318,7 @@ void thermal_zone_of_sensor_unregister(s 
    266266  
    267267 #if IS_ENABLED(CONFIG_THERMAL) 
     
    272272 void thermal_zone_device_unregister(struct thermal_zone_device *); 
    273273  
    274 @@ -341,7 +341,7 @@ void thermal_notify_framework(struct the 
     274@@ -346,7 +346,7 @@ void thermal_notify_framework(struct the 
    275275 #else 
    276276 static inline struct thermal_zone_device *thermal_zone_device_register( 
  • trunk/target/linux/mediatek/patches/0020-thermal-thermal-Add-support-for-hardware-tracked-tri.patch

    r47694 r49035  
    3333--- a/drivers/thermal/thermal_core.c 
    3434+++ b/drivers/thermal/thermal_core.c 
    35 @@ -453,6 +453,45 @@ int thermal_zone_get_temp(struct thermal 
     35@@ -456,6 +456,45 @@ int thermal_zone_get_temp(struct thermal 
    3636 } 
    3737 EXPORT_SYMBOL_GPL(thermal_zone_get_temp); 
     
    7979 { 
    8080        int temp, ret, count; 
    81 @@ -479,6 +518,8 @@ void thermal_zone_device_update(struct t 
    82         dev_dbg(&tz->device, "last_temperature=%d, current_temperature=%d\n", 
    83                                 tz->last_temperature, tz->temperature); 
     81@@ -489,6 +528,8 @@ void thermal_zone_device_update(struct t 
     82                dev_dbg(&tz->device, "last_temperature=%d, current_temperature=%d\n", 
     83                        tz->last_temperature, tz->temperature); 
    8484  
    8585+       thermal_zone_set_trips(tz); 
     
    8888                handle_thermal_trip(tz, count); 
    8989 } 
    90 @@ -1494,6 +1535,8 @@ struct thermal_zone_device *thermal_zone 
     90@@ -1522,6 +1563,8 @@ struct thermal_zone_device *thermal_zone 
    9191        tz->trips = trips; 
    9292        tz->passive_delay = passive_delay; 
     
    9494+       tz->prev_low_trip = INT_MAX; 
    9595+       tz->prev_high_trip = -INT_MAX; 
     96        /* A new thermal zone needs to be updated anyway. */ 
     97        atomic_set(&tz->need_update, 1); 
    9698  
    97         dev_set_name(&tz->device, "thermal_zone%d", tz->id); 
    98         result = device_register(&tz->device); 
    9999--- a/include/linux/thermal.h 
    100100+++ b/include/linux/thermal.h 
    101 @@ -87,6 +87,7 @@ struct thermal_zone_device_ops { 
     101@@ -90,6 +90,7 @@ struct thermal_zone_device_ops { 
    102102        int (*unbind) (struct thermal_zone_device *, 
    103103                       struct thermal_cooling_device *); 
     
    107107                         enum thermal_device_mode *); 
    108108        int (*set_mode) (struct thermal_zone_device *, 
    109 @@ -180,6 +181,8 @@ struct thermal_zone_device { 
     109@@ -184,6 +185,8 @@ struct thermal_zone_device { 
    110110        int last_temperature; 
    111111        int emul_temperature; 
     
    114114+       int prev_high_trip; 
    115115        unsigned int forced_passive; 
     116        atomic_t need_update; 
    116117        const struct thermal_zone_device_ops *ops; 
    117         const struct thermal_zone_params *tzp; 
  • trunk/target/linux/mediatek/patches/0021-thermal-of-implement-.set_trips-for-device-tree-ther.patch

    r47694 r49035  
    4141--- a/include/linux/thermal.h 
    4242+++ b/include/linux/thermal.h 
    43 @@ -267,12 +267,15 @@ struct thermal_genl_event { 
     43@@ -272,12 +272,15 @@ struct thermal_genl_event { 
    4444  * 
    4545  * Optional: 
  • trunk/target/linux/mediatek/patches/0047-xhci-mediatek-support-MTK-xHCI-host-controller.patch

    r48223 r49035  
    710710 /* 
    711711  * Returns zero if the TRB isn't in this segment, otherwise it returns the DMA 
    712 @@ -3173,9 +3174,14 @@ static int queue_bulk_sg_tx(struct xhci_ 
    713   
    714                 /* Set the TRB length, TD size, and interrupter fields. */ 
    715                 if (xhci->hci_version < 0x100) { 
    716 -                       remainder = xhci_td_remainder( 
    717 +                       if (xhci->quirks & XHCI_MTK_HOST) { 
    718 +                               remainder = xhci_mtk_td_remainder_quirk( 
    719 +                                       running_total, trb_buff_len, urb); 
    720 +                       } else { 
    721 +                               remainder = xhci_td_remainder( 
    722                                         urb->transfer_buffer_length - 
    723                                         running_total); 
    724 +                       } 
    725                 } else { 
    726                         remainder = xhci_v1_0_td_remainder(running_total, 
    727                                         trb_buff_len, total_packet_count, urb, 
    728 @@ -3346,9 +3352,14 @@ int xhci_queue_bulk_tx(struct xhci_hcd * 
    729   
    730                 /* Set the TRB length, TD size, and interrupter fields. */ 
    731                 if (xhci->hci_version < 0x100) { 
    732 -                       remainder = xhci_td_remainder( 
    733 +                       if (xhci->quirks & XHCI_MTK_HOST) { 
    734 +                               remainder = xhci_mtk_td_remainder_quirk( 
    735 +                                       running_total, trb_buff_len, urb); 
    736 +                       } else { 
    737 +                               remainder = xhci_td_remainder( 
    738                                         urb->transfer_buffer_length - 
    739                                         running_total); 
    740 +                       } 
    741                 } else { 
    742                         remainder = xhci_v1_0_td_remainder(running_total, 
    743                                         trb_buff_len, total_packet_count, urb, 
    744 @@ -3467,8 +3478,14 @@ int xhci_queue_ctrl_tx(struct xhci_hcd * 
    745                 field = TRB_TYPE(TRB_DATA); 
    746   
    747         length_field = TRB_LEN(urb->transfer_buffer_length) | 
    748 -               xhci_td_remainder(urb->transfer_buffer_length) | 
    749                 TRB_INTR_TARGET(0); 
    750 + 
     712@@ -3026,17 +3027,22 @@ static u32 xhci_td_remainder(struct xhci 
     713 { 
     714        u32 maxp, total_packet_count; 
     715  
     716-       if (xhci->hci_version < 0x100) 
     717+       /* MTK xHCI is mostly 0.97 but contains some features from 1.0 */ 
     718+       if (xhci->hci_version < 0x100 && !(xhci->quirks & XHCI_MTK_HOST)) 
     719                return ((td_total_len - transferred) >> 10); 
     720  
     721-       maxp = GET_MAX_PACKET(usb_endpoint_maxp(&urb->ep->desc)); 
     722-       total_packet_count = DIV_ROUND_UP(td_total_len, maxp); 
     723- 
     724        /* One TRB with a zero-length data packet. */ 
     725        if (num_trbs_left == 0 || (transferred == 0 && trb_buff_len == 0) || 
     726            trb_buff_len == td_total_len) 
     727                return 0; 
     728  
     729+       /* for MTK xHCI, TD size doesn't include this TRB */ 
    751730+       if (xhci->quirks & XHCI_MTK_HOST) 
    752 +               length_field |= xhci_mtk_td_remainder_quirk(0, 
    753 +                               urb->transfer_buffer_length, urb); 
    754 +       else 
    755 +               length_field |= xhci_td_remainder(urb->transfer_buffer_length); 
    756 + 
    757         if (urb->transfer_buffer_length > 0) { 
    758                 if (setup->bRequestType & USB_DIR_IN) 
    759                         field |= TRB_DIR_IN; 
    760 @@ -3692,8 +3709,14 @@ static int xhci_queue_isoc_tx(struct xhc 
    761   
    762                         /* Set the TRB length, TD size, & interrupter fields. */ 
    763                         if (xhci->hci_version < 0x100) { 
    764 -                               remainder = xhci_td_remainder( 
    765 -                                               td_len - running_total); 
    766 +                               if (xhci->quirks & XHCI_MTK_HOST) { 
    767 +                                       remainder = xhci_mtk_td_remainder_quirk( 
    768 +                                               running_total, trb_buff_len, 
    769 +                                               urb); 
    770 +                               } else { 
    771 +                                       remainder = xhci_td_remainder( 
    772 +                                                       td_len - running_total); 
    773 +                               } 
    774                         } else { 
    775                                 remainder = xhci_v1_0_td_remainder( 
    776                                                 running_total, trb_buff_len, 
     731+               trb_buff_len = 0; 
     732+ 
     733+       maxp = GET_MAX_PACKET(usb_endpoint_maxp(&urb->ep->desc)); 
     734+       total_packet_count = DIV_ROUND_UP(td_total_len, maxp); 
     735+ 
     736        /* Queueing functions don't count the current TRB into transferred */ 
     737        return (total_packet_count - ((transferred + trb_buff_len) / maxp)); 
     738 } 
     739@@ -3424,7 +3430,7 @@ int xhci_queue_ctrl_tx(struct xhci_hcd * 
     740                field |= 0x1; 
     741  
     742        /* xHCI 1.0/1.1 6.4.1.2.1: Transfer Type field */ 
     743-       if (xhci->hci_version >= 0x100) { 
     744+       if ((xhci->hci_version >= 0x100) || (xhci->quirks & XHCI_MTK_HOST)) { 
     745                if (urb->transfer_buffer_length > 0) { 
     746                        if (setup->bRequestType & USB_DIR_IN) 
     747                                field |= TRB_TX_TYPE(TRB_DATA_IN); 
    777748--- a/drivers/usb/host/xhci.c 
    778749+++ b/drivers/usb/host/xhci.c 
     
    798769  
    799770        /* Set the HCD state before we enable the irqs */ 
    800 @@ -1708,6 +1713,9 @@ int xhci_drop_endpoint(struct usb_hcd *h 
     771@@ -1710,6 +1715,9 @@ int xhci_drop_endpoint(struct usb_hcd *h 
    801772  
    802773        xhci_endpoint_zero(xhci, xhci->devs[udev->slot_id], ep); 
     
    808779                        (unsigned int) ep->desc.bEndpointAddress, 
    809780                        udev->slot_id, 
    810 @@ -1803,6 +1811,12 @@ int xhci_add_endpoint(struct usb_hcd *hc 
     781@@ -1805,6 +1813,12 @@ int xhci_add_endpoint(struct usb_hcd *hc 
    811782                return -ENOMEM; 
    812783        } 
     
    823794--- a/drivers/usb/host/xhci.h 
    824795+++ b/drivers/usb/host/xhci.h 
    825 @@ -1568,6 +1568,7 @@ struct xhci_hcd { 
     796@@ -1570,6 +1570,7 @@ struct xhci_hcd { 
    826797 /* For controllers with a broken beyond repair streams implementation */ 
    827798 #define XHCI_BROKEN_STREAMS    (1 << 19) 
    828799 #define XHCI_PME_STUCK_QUIRK   (1 << 20) 
    829800+#define XHCI_MTK_HOST          (1 << 21) 
     801 #define XHCI_SSIC_PORT_UNUSED  (1 << 22) 
    830802        unsigned int            num_active_eps; 
    831803        unsigned int            limit_active_eps; 
    832         /* There are two roothubs to keep track of bus suspend info for */ 
  • trunk/target/linux/oxnas/patches-4.1/800-oxnas-ehci.patch

    r46636 r49035  
    1717--- a/drivers/usb/host/Makefile 
    1818+++ b/drivers/usb/host/Makefile 
    19 @@ -42,6 +42,7 @@ obj-$(CONFIG_USB_EHCI_HCD_AT91) += ehci- 
     19@@ -39,6 +39,7 @@ obj-$(CONFIG_USB_EHCI_HCD_AT91) += ehci- 
    2020 obj-$(CONFIG_USB_EHCI_MSM)     += ehci-msm.o 
    2121 obj-$(CONFIG_USB_EHCI_TEGRA)   += ehci-tegra.o 
Note: See TracChangeset for help on using the changeset viewer.