Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux...
authorHuang, Tao <huangtao@rock-chips.com>
Sat, 6 May 2017 06:23:00 +0000 (14:23 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Sat, 6 May 2017 06:23:00 +0000 (14:23 +0800)
* linux-linaro-lsk-v4.4-android: (521 commits)
  Linux 4.4.66
  ftrace/x86: Fix triple fault with graph tracing and suspend-to-ram
  ARCv2: save r30 on kernel entry as gcc uses it for code-gen
  nfsd: check for oversized NFSv2/v3 arguments
  Input: i8042 - add Clevo P650RS to the i8042 reset list
  p9_client_readdir() fix
  MIPS: Avoid BUG warning in arch_check_elf
  MIPS: KGDB: Use kernel context for sleeping threads
  ALSA: seq: Don't break snd_use_lock_sync() loop by timeout
  ALSA: firewire-lib: fix inappropriate assignment between signed/unsigned type
  ipv6: check raw payload size correctly in ioctl
  ipv6: check skb->protocol before lookup for nexthop
  macvlan: Fix device ref leak when purging bc_queue
  ip6mr: fix notification device destruction
  netpoll: Check for skb->queue_mapping
  net: ipv6: RTF_PCPU should not be settable from userspace
  dp83640: don't recieve time stamps twice
  tcp: clear saved_syn in tcp_disconnect()
  sctp: listen on the sock only when it's state is listening or closed
  net: ipv4: fix multipath RTM_GETROUTE behavior when iif is given
  ...

Conflicts:
drivers/usb/dwc3/gadget.c
include/linux/usb/quirks.h

Change-Id: I490f766b9a530b10da3107e20709538e4536a99d

20 files changed:
1  2 
Makefile
arch/arm64/Makefile
drivers/base/power/opp/core.c
drivers/cpufreq/cpufreq.c
drivers/cpufreq/cpufreq_interactive.c
drivers/misc/Kconfig
drivers/misc/Makefile
drivers/mmc/core/mmc.c
drivers/mmc/host/sdhci.c
drivers/pci/pci.c
drivers/usb/core/hcd.c
drivers/usb/core/hub.c
drivers/usb/dwc3/gadget.c
drivers/usb/gadget/function/f_accessory.c
drivers/usb/gadget/function/f_mtp.c
fs/proc/task_mmu.c
include/linux/mmc/card.h
include/linux/mmc/mmc.h
include/linux/usb/quirks.h
kernel/sched/fair.c

diff --cc Makefile
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 06750b9428275a1760218ddfeb553a5ef660a430,9a3b402921b22aa485f7648d282d10e9d2dafb32..c73cc3ee844922364a9633f1afbb8cd94b58d08b
@@@ -57,6 -56,5 +57,6 @@@ obj-$(CONFIG_GENWQE)          += genwqe
  obj-$(CONFIG_ECHO)            += echo/
  obj-$(CONFIG_VEXPRESS_SYSCFG) += vexpress-syscfg.o
  obj-$(CONFIG_CXL_BASE)                += cxl/
- obj-$(CONFIG_UID_CPUTIME) += uid_cputime.o
+ obj-$(CONFIG_UID_SYS_STATS) += uid_sys_stats.o
  obj-$(CONFIG_MEMORY_STATE_TIME) += memory_state_time.o
 +obj-$(CONFIG_USB_CAM_GPIO)    += usb_cam_gpio.o
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 3399679513a8a310ca50156cce5642ea4572004a,ec7a50f98f57a70e3ddb640215794fe4a6f66677..46c7bb4cfd10412b2db15d5d6a9ee4d4f5526143
@@@ -174,14 -235,24 +174,15 @@@ void dwc3_gadget_giveback(struct dwc3_e
                int status)
  {
        struct dwc3                     *dwc = dep->dwc;
+       unsigned int                    unmap_after_complete = false;
        int                             i;
  
 -      if (req->queued) {
 +      if (req->started) {
                i = 0;
                do {
 -                      dep->busy_slot++;
 -                      /*
 -                       * Skip LINK TRB. We can't use req->trb and check for
 -                       * DWC3_TRBCTL_LINK_TRB because it points the TRB we
 -                       * just completed (not the LINK TRB).
 -                       */
 -                      if (((dep->busy_slot & DWC3_TRB_MASK) ==
 -                              DWC3_TRB_NUM- 1) &&
 -                              usb_endpoint_xfer_isoc(dep->endpoint.desc))
 -                              dep->busy_slot++;
 +                      dwc3_ep_inc_deq(dep);
                } while(++i < req->request.num_mapped_sgs);
 -              req->queued = false;
 +              req->started = false;
        }
        list_del(&req->list);
        req->trb = NULL;
        if (req->request.status == -EINPROGRESS)
                req->request.status = status;
  
-       if (dwc->ep0_bounced && dep->number <= 1)
+       /*
+        * NOTICE we don't want to unmap before calling ->complete() if we're
+        * dealing with a bounced ep0 request. If we unmap it here, we would end
+        * up overwritting the contents of req->buf and this could confuse the
+        * gadget driver.
+        */
+       if (dwc->ep0_bounced && dep->number <= 1) {
                dwc->ep0_bounced = false;
-       usb_gadget_unmap_request(&dwc->gadget, &req->request,
-                       req->direction);
+               unmap_after_complete = true;
+       } else {
+               usb_gadget_unmap_request(&dwc->gadget,
+                               &req->request, req->direction);
+       }
  
 -      dev_dbg(dwc->dev, "request %p from %s completed %d/%d ===> %d\n",
 -                      req, dep->name, req->request.actual,
 -                      req->request.length, status);
        trace_dwc3_gadget_giveback(req);
  
        spin_unlock(&dwc->lock);
        usb_gadget_giveback_request(&dep->endpoint, &req->request);
        spin_lock(&dwc->lock);
  
+       if (unmap_after_complete)
+               usb_gadget_unmap_request(&dwc->gadget,
+                               &req->request, req->direction);
++
 +      if (dep->number > 1)
 +              pm_runtime_put(dwc->dev);
  }
  
  int dwc3_send_gadget_generic_command(struct dwc3 *dwc, unsigned cmd, u32 param)
Simple merge
Simple merge
Simple merge
Simple merge
index 56939098675ef0ce0f9b25596be7b76838f15f85,de2a722fe3cf7c457352eb02548f0351a669ddf5..594385d1ad363e0639c4c9d41175a15ac06b8e3a
  /* device can't handle Link Power Management */
  #define USB_QUIRK_NO_LPM                      BIT(10)
  
- #define USB_QUIRK_AUTO_SUSPEND                        BIT(11)
+ /*
+  * Device reports its bInterval as linear frames instead of the
+  * USB 2.0 calculation.
+  */
+ #define USB_QUIRK_LINEAR_FRAME_INTR_BINTERVAL BIT(11)
 +/* device can't support auto suspend function */
++#define USB_QUIRK_AUTO_SUSPEND                        BIT(12)
 +
  #endif /* __LINUX_USB_QUIRKS_H */
Simple merge