1. 28 Oct, 2019 2 commits
    • Alan Stern's avatar
      USB: Skip endpoints with 0 maxpacket length · d482c7bb
      Alan Stern authored
      Endpoints with a maxpacket length of 0 are probably useless.  They
      can't transfer any data, and it's not at all unlikely that an HCD will
      crash or hang when trying to handle an URB for such an endpoint.
      
      Currently the USB core does not check for endpoints having a maxpacket
      value of 0.  This patch adds a check, printing a warning and skipping
      over any endpoints it catches.
      
      Now, the USB spec does not rule out endpoints having maxpacket = 0.
      But since they wouldn't have any practical use, there doesn't seem to
      be any good reason for us to accept them.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      
      Link: https://lore.kernel.org/r/Pine.LNX.4.44L0.1910281050420.1485-100000@iolanthe.rowland.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d482c7bb
    • Greg Kroah-Hartman's avatar
      Merge tag 'fixes-for-v5.4-rc5' of... · 4ae8beac
      Greg Kroah-Hartman authored
      Merge tag 'fixes-for-v5.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus
      
      Felipe writes:
      
      USB: fixes for v5.4-rc5
      
      Not much here, only 14 commits in different drivers.
      
      As for the specifics, Roger Quadros fixed an important bug in cdns3
      where the driver was making decisions about data pull-up management
      behind the UDC framework's back.
      
      The Atmel UDC got a fix for interrupt storm in FIFO mode, this was done
      by Cristian Brisan.
      
      Apart from these, we have the usual set of non-critical fixes.
      Signed-off-by: default avatarFelipe Balbi <balbi@kernel.org>
      
      * tag 'fixes-for-v5.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb:
        usb: cdns3: gadget: Don't manage pullups
        usb: dwc3: remove the call trace of USBx_GFLADJ
        usb: gadget: configfs: fix concurrent issue between composite APIs
        usb: dwc3: pci: prevent memory leak in dwc3_pci_probe
        usb: gadget: composite: Fix possible double free memory bug
        usb: gadget: udc: atmel: Fix interrupt storm in FIFO mode.
        usb: renesas_usbhs: fix type of buf
        usb: renesas_usbhs: Fix warnings in usbhsg_recip_handler_std_set_device()
        usb: gadget: udc: renesas_usb3: Fix __le16 warnings
        usb: renesas_usbhs: fix __le16 warnings
        usb: cdns3: include host-export,h for cdns3_host_init
        usb: mtu3: fix missing include of mtu3_dr.h
        usb: fsl: Check memory resource before releasing it
        usb: dwc3: select CONFIG_REGMAP_MMIO
      4ae8beac
  2. 27 Oct, 2019 21 commits
    • Linus Torvalds's avatar
      Linux 5.4-rc5 · d6d5df1d
      Linus Torvalds authored
      d6d5df1d
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 153a971f
      Linus Torvalds authored
      Pull x86 fixes from Thomas Gleixner:
       "Two fixes for the VMWare guest support:
      
         - Unbreak VMWare platform detection which got wreckaged by converting
           an integer constant to a string constant.
      
         - Fix the clang build of the VMWAre hypercall by explicitely
           specifying the ouput register for INL instead of using the short
           form"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/cpu/vmware: Fix platform detection VMWARE_PORT macro
        x86/cpu/vmware: Use the full form of INL in VMWARE_HYPERCALL, for clang/llvm
      153a971f
    • Linus Torvalds's avatar
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 2b776b54
      Linus Torvalds authored
      Pull timer fixes from Thomas Gleixner:
       "A small set of fixes for time(keeping):
      
         - Add a missing include to prevent compiler warnings.
      
         - Make the VDSO implementation of clock_getres() POSIX compliant
           again. A recent change dropped the NULL pointer guard which is
           required as NULL is a valid pointer value for this function.
      
         - Fix two function documentation typos"
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        posix-cpu-timers: Fix two trivial comments
        timers/sched_clock: Include local timekeeping.h for missing declarations
        lib/vdso: Make clock_getres() POSIX compliant again
      2b776b54
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · a8a31fdc
      Linus Torvalds authored
      Pull perf fixes from Thomas Gleixner:
       "A set of perf fixes:
      
        kernel:
      
         - Unbreak the tracking of auxiliary buffer allocations which got
           imbalanced causing recource limit failures.
      
         - Fix the fallout of splitting of ToPA entries which missed to shift
           the base entry PA correctly.
      
         - Use the correct context to lookup the AUX event when unmapping the
           associated AUX buffer so the event can be stopped and the buffer
           reference dropped.
      
        tools:
      
         - Fix buildiid-cache mode setting in copyfile_mode_ns() when copying
           /proc/kcore
      
         - Fix freeing id arrays in the event list so the correct event is
           closed.
      
         - Sync sched.h anc kvm.h headers with the kernel sources.
      
         - Link jvmti against tools/lib/ctype.o to have weak strlcpy().
      
         - Fix multiple memory and file descriptor leaks, found by coverity in
           perf annotate.
      
         - Fix leaks in error handling paths in 'perf c2c', 'perf kmem', found
           by a static analysis tool"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/aux: Fix AUX output stopping
        perf/aux: Fix tracking of auxiliary trace buffer allocation
        perf/x86/intel/pt: Fix base for single entry topa
        perf kmem: Fix memory leak in compact_gfp_flags()
        tools headers UAPI: Sync sched.h with the kernel
        tools headers kvm: Sync kvm.h headers with the kernel sources
        tools headers kvm: Sync kvm headers with the kernel sources
        tools headers kvm: Sync kvm headers with the kernel sources
        perf c2c: Fix memory leak in build_cl_output()
        perf tools: Fix mode setting in copyfile_mode_ns()
        perf annotate: Fix multiple memory and file descriptor leaks
        perf tools: Fix resource leak of closedir() on the error paths
        perf evlist: Fix fix for freed id arrays
        perf jvmti: Link against tools/lib/ctype.h to have weak strlcpy()
      a8a31fdc
    • Linus Torvalds's avatar
      Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 1e1ac1cb
      Linus Torvalds authored
      Pull irq fixes from Thomas Gleixner:
       "Two fixes for interrupt controller drivers:
      
         - Skip IRQ_M_EXT entries in the device tree when initializing the
           RISCV PLIC controller to avoid a double init attempt.
      
         - Use the correct ITS list when issuing the VMOVP synchronization
           command so the operation works only on the ITS instances which are
           associated to a VM"
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqchip/sifive-plic: Skip contexts except supervisor in plic_init()
        irqchip/gic-v3-its: Use the exact ITSList for VMOVP
      1e1ac1cb
    • Linus Torvalds's avatar
      Merge tag '5.4-rc5-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 · c9a2e4a8
      Linus Torvalds authored
      Pull cifs fixes from Steve French:
       "Seven cifs/smb3 fixes, including three for stable"
      
      * tag '5.4-rc5-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: Fix cifsInodeInfo lock_sem deadlock when reconnect occurs
        CIFS: Fix use after free of file info structures
        CIFS: Fix retry mid list corruption on reconnects
        cifs: Fix missed free operations
        CIFS: avoid using MID 0xFFFF
        cifs: clarify comment about timestamp granularity for old servers
        cifs: Handle -EINPROGRESS only when noblockcnt is set
      c9a2e4a8
    • Linus Torvalds's avatar
      Merge tag 'riscv/for-v5.4-rc5-b' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · 6995a6a5
      Linus Torvalds authored
      Pull RISC-V fixes from Paul Walmsley:
       "Several minor fixes and cleanups for v5.4-rc5:
      
         - Three build fixes for various SPARSEMEM-related kernel
           configurations
      
         - Two cleanup patches for the kernel bug and breakpoint trap handler
           code"
      
      * tag 'riscv/for-v5.4-rc5-b' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        riscv: cleanup do_trap_break
        riscv: cleanup <asm/bug.h>
        riscv: Fix undefined reference to vmemmap_populate_basepages
        riscv: Fix implicit declaration of 'page_to_section'
        riscv: fix fs/proc/kcore.c compilation with sparsemem enabled
      6995a6a5
    • Roger Quadros's avatar
      usb: cdns3: gadget: Don't manage pullups · f3fb802e
      Roger Quadros authored
      The USB gadget core is supposed to manage pullups
      of the controller. Don't manage pullups from within
      the controller driver. Otherwise, function drivers
      are not able to keep the controller disconnected from
      the bus till they are ready. (e.g. g_webcam)
      Reviewed-by: default avatarPawel Laszczak <pawell@cadence.com>
      Signed-off-by: default avatarRoger Quadros <rogerq@ti.com>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      f3fb802e
    • Yinbo Zhu's avatar
      usb: dwc3: remove the call trace of USBx_GFLADJ · a7d9874c
      Yinbo Zhu authored
      layerscape board sometimes reported some usb call trace, that is due to
      kernel sent LPM tokerns automatically when it has no pending transfers
      and think that the link is idle enough to enter L1, which procedure will
      ask usb register has a recovery,then kernel will compare USBx_GFLADJ and
      set GFLADJ_30MHZ, GFLADJ_30MHZ_REG until GFLADJ_30MHZ is equal 0x20, if
      the conditions were met then issue occur, but whatever the conditions
      whether were met that usb is all need keep GFLADJ_30MHZ of value is 0x20
      (xhci spec ask use GFLADJ_30MHZ to adjust any offset from clock source
      that generates the clock that drives the SOF counter, 0x20 is default
      value of it)That is normal logic, so need remove the call trace.
      Signed-off-by: default avatarYinbo Zhu <yinbo.zhu@nxp.com>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      a7d9874c
    • Peter Chen's avatar
      usb: gadget: configfs: fix concurrent issue between composite APIs · 1a1c851b
      Peter Chen authored
      We meet several NULL pointer issues if configfs_composite_unbind
      and composite_setup (or composite_disconnect) are running together.
      These issues occur when do the function switch stress test, the
      configfs_compsoite_unbind is called from user mode by
      echo "" to /sys/../UDC entry, and meanwhile, the setup interrupt
      or disconnect interrupt occurs by hardware. The composite_setup
      will get the cdev from get_gadget_data, but configfs_composite_unbind
      will set gadget data as NULL, so the NULL pointer issue occurs.
      This concurrent is hard to reproduce by native kernel, but can be
      reproduced by android kernel.
      
      In this commit, we introduce one spinlock belongs to structure
      gadget_info since we can't use the same spinlock in usb_composite_dev
      due to exclusive running together between composite_setup and
      configfs_composite_unbind. And one bit flag 'unbind' to indicate the
      code is at unbind routine, this bit is needed due to we release the
      lock at during configfs_composite_unbind sometimes, and composite_setup
      may be run at that time.
      
      Several oops:
      
      oops 1:
      android_work: sent uevent USB_STATE=CONNECTED
      configfs-gadget gadget: super-speed config #1: b
      android_work: sent uevent USB_STATE=CONFIGURED
      init: Received control message 'start' for 'adbd' from pid: 3515 (system_server)
      Unable to handle kernel NULL pointer dereference at virtual address 0000002a
      init: Received control message 'stop' for 'adbd' from pid: 3375 (/vendor/bin/hw/android.hardware.usb@1.1-servic)
      Mem abort info:
        Exception class = DABT (current EL), IL = 32 bits
        SET = 0, FnV = 0
        EA = 0, S1PTW = 0
      Data abort info:
        ISV = 0, ISS = 0x00000004
        CM = 0, WnR = 0
      user pgtable: 4k pages, 48-bit VAs, pgd = ffff8008f1b7f000
      [000000000000002a] *pgd=0000000000000000
      Internal error: Oops: 96000004 [#1] PREEMPT SMP
      Modules linked in:
      CPU: 4 PID: 2457 Comm: irq/125-5b11000 Not tainted 4.14.98-07846-g0b40a9b-dirty #16
      Hardware name: Freescale i.MX8QM MEK (DT)
      task: ffff8008f2a98000 task.stack: ffff00000b7b8000
      PC is at composite_setup+0x44/0x1508
      LR is at android_setup+0xb8/0x13c
      pc : [<ffff0000089ffb3c>] lr : [<ffff000008a032fc>] pstate: 800001c5
      sp : ffff00000b7bbb80
      x29: ffff00000b7bbb80 x28: ffff8008f2a3c010
      x27: 0000000000000001 x26: 0000000000000000                                                          [1232/1897]
      audit: audit_lost=25791 audit_rate_limit=5 audit_backlog_limit=64
      x25: 00000000ffffffa1 x24: ffff8008f2a3c010
      audit: rate limit exceeded
      x23: 0000000000000409 x22: ffff000009c8e000
      x21: ffff8008f7a8b428 x20: ffff00000afae000
      x19: ffff0000089ff000 x18: 0000000000000000
      x17: 0000000000000000 x16: ffff0000082b7c9c
      x15: 0000000000000000 x14: f1866f5b952aca46
      x13: e35502e30d44349c x12: 0000000000000008
      x11: 0000000000000008 x10: 0000000000000a30
      x9 : ffff00000b7bbd00 x8 : ffff8008f2a98a90
      x7 : ffff8008f27a9c90 x6 : 0000000000000001
      x5 : 0000000000000000 x4 : 0000000000000001
      x3 : 0000000000000000 x2 : 0000000000000006
      x1 : ffff0000089ff8d0 x0 : 732a010310b9ed00
      
      X7: 0xffff8008f27a9c10:
      9c10  00000002 00000000 00000001 00000000 13110000 ffff0000 00000002 00208040
      9c30  00000000 00000000 00000000 00000000 00000000 00000005 00000029 00000000
      9c50  00051778 00000001 f27a8e00 ffff8008 00000005 00000000 00000078 00000078
      9c70  00000078 00000000 09031d48 ffff0000 00100000 00000000 00400000 00000000
      9c90  00000001 00000000 00000000 00000000 00000000 00000000 ffefb1a0 ffff8008
      9cb0  f27a9ca8 ffff8008 00000000 00000000 b9d88037 00000173 1618a3eb 00000001
      9cd0  870a792a 0000002e 16188fe6 00000001 0000242b 00000000 00000000 00000000
      using random self ethernet address
      9cf0  019a4646 00000000 000547f3 00000000 ecfd6c33 00000002 00000000
      using random host ethernet address
       00000000
      
      X8: 0xffff8008f2a98a10:
      8a10  00000000 00000000 f7788d00 ffff8008 00000001 00000000 00000000 00000000
      8a30  eb218000 ffff8008 f2a98000 ffff8008 f2a98000 ffff8008 09885000 ffff0000
      8a50  f34df480 ffff8008 00000000 00000000 f2a98648 ffff8008 09c8e000 ffff0000
      8a70  fff2c800 ffff8008 09031d48 ffff0000 0b7bbd00 ffff0000 0b7bbd00 ffff0000
      8a90  080861bc ffff0000 00000000 00000000 00000000 00000000 00000000 00000000
      8ab0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      8ad0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      8af0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      
      X21: 0xffff8008f7a8b3a8:
      b3a8  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      b3c8  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      b3e8  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      b408  00000000 00000000 00000000 00000000 00000000 00000000 00000001 00000000
      b428  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      b448  0053004d 00540046 00300031 00010030 eb07b520 ffff8008 20011201 00000003
      b468  e418d109 0104404e 00010302 00000000 eb07b558 ffff8008 eb07b558 ffff8008
      b488  f7a8b488 ffff8008 f7a8b488 ffff8008 f7a8b300 ffff8008 00000000 00000000
      
      X24: 0xffff8008f2a3bf90:
      bf90  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      bfb0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      bfd0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      bff0  00000000 00000000 00000000 00000000 f76c8010 ffff8008 f76c8010 ffff8008
      c010  00000000 00000000 f2a3c018 ffff8008 f2a3c018 ffff8008 08a067dc ffff0000
      c030  f2a5a000 ffff8008 091c3650 ffff0000 f716fd18 ffff8008 f716fe30 ffff8008
      c050  f2ce4a30 ffff8008 00000000 00000005 00000000 00000000 095d1568 ffff0000
      c070  f76c8010 ffff8008 f2ce4b00 ffff8008 095cac68 ffff0000 f2a5a028 ffff8008
      
      X28: 0xffff8008f2a3bf90:
      bf90  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      bfb0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      bfd0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      bff0  00000000 00000000 00000000 00000000 f76c8010 ffff8008 f76c8010 ffff8008
      c010  00000000 00000000 f2a3c018 ffff8008 f2a3c018 ffff8008 08a067dc ffff0000
      c030  f2a5a000 ffff8008 091c3650 ffff0000 f716fd18 ffff8008 f716fe30 ffff8008
      c050  f2ce4a30 ffff8008 00000000 00000005 00000000 00000000 095d1568 ffff0000
      c070  f76c8010 ffff8008 f2ce4b00 ffff8008 095cac68 ffff0000 f2a5a028 ffff8008
      
      Process irq/125-5b11000 (pid: 2457, stack limit = 0xffff00000b7b8000)
      Call trace:
      Exception stack(0xffff00000b7bba40 to 0xffff00000b7bbb80)
      ba40: 732a010310b9ed00 ffff0000089ff8d0 0000000000000006 0000000000000000
      ba60: 0000000000000001 0000000000000000 0000000000000001 ffff8008f27a9c90
      ba80: ffff8008f2a98a90 ffff00000b7bbd00 0000000000000a30 0000000000000008
      baa0: 0000000000000008 e35502e30d44349c f1866f5b952aca46 0000000000000000
      bac0: ffff0000082b7c9c 0000000000000000 0000000000000000 ffff0000089ff000
      bae0: ffff00000afae000 ffff8008f7a8b428 ffff000009c8e000 0000000000000409
      bb00: ffff8008f2a3c010 00000000ffffffa1 0000000000000000 0000000000000001
      bb20: ffff8008f2a3c010 ffff00000b7bbb80 ffff000008a032fc ffff00000b7bbb80
      bb40: ffff0000089ffb3c 00000000800001c5 ffff00000b7bbb80 732a010310b9ed00
      bb60: ffffffffffffffff ffff0000080f777c ffff00000b7bbb80 ffff0000089ffb3c
      [<ffff0000089ffb3c>] composite_setup+0x44/0x1508
      [<ffff000008a032fc>] android_setup+0xb8/0x13c
      [<ffff0000089bd9a8>] cdns3_ep0_delegate_req+0x44/0x70
      [<ffff0000089bdff4>] cdns3_check_ep0_interrupt_proceed+0x33c/0x654
      [<ffff0000089bca44>] cdns3_device_thread_irq_handler+0x4b0/0x4bc
      [<ffff0000089b77b4>] cdns3_thread_irq+0x48/0x68
      [<ffff000008145bf0>] irq_thread_fn+0x28/0x88
      [<ffff000008145e38>] irq_thread+0x13c/0x228
      [<ffff0000080fed70>] kthread+0x104/0x130
      [<ffff000008085064>] ret_from_fork+0x10/0x18
      
      oops2:
      composite_disconnect: Calling disconnect on a Gadget that is                      not connected
      android_work: did not send uevent (0 0           (null))
      init: Received control message 'stop' for 'adbd' from pid: 3359 (/vendor/bin/hw/android.hardware.usb@1.1-service.imx)
      init: Sending signal 9 to service 'adbd' (pid 22343) process group...
      ------------[ cut here ]------------
      audit: audit_lost=180038 audit_rate_limit=5 audit_backlog_limit=64
      audit: rate limit exceeded
      WARNING: CPU: 0 PID: 3468 at kernel_imx/drivers/usb/gadget/composite.c:2009 composite_disconnect+0x80/0x88
      Modules linked in:
      CPU: 0 PID: 3468 Comm: HWC-UEvent-Thre Not tainted 4.14.98-07846-g0b40a9b-dirty #16
      Hardware name: Freescale i.MX8QM MEK (DT)
      task: ffff8008f2349c00 task.stack: ffff00000b0a8000
      PC is at composite_disconnect+0x80/0x88
      LR is at composite_disconnect+0x80/0x88
      pc : [<ffff0000089ff9b0>] lr : [<ffff0000089ff9b0>] pstate: 600001c5
      sp : ffff000008003dd0
      x29: ffff000008003dd0 x28: ffff8008f2349c00
      x27: ffff000009885018 x26: ffff000008004000
      Timeout for IPC response!
      x25: ffff000009885018 x24: ffff000009c8e280
      x23: ffff8008f2d98010 x22: 00000000000001c0
      x21: ffff8008f2d98394 x20: ffff8008f2d98010
      x19: 0000000000000000 x18: 0000e3956f4f075a
      fxos8700 4-001e: i2c block read acc failed
      x17: 0000e395735727e8 x16: ffff00000829f4d4
      x15: ffffffffffffffff x14: 7463656e6e6f6320
      x13: 746f6e2009090920 x12: 7369207461687420
      x11: 7465676461472061 x10: 206e6f207463656e
      x9 : 6e6f637369642067 x8 : ffff000009c8e280
      x7 : ffff0000086ca6cc x6 : ffff000009f15e78
      x5 : 0000000000000000 x4 : 0000000000000000
      x3 : ffffffffffffffff x2 : c3f28b86000c3900
      x1 : c3f28b86000c3900 x0 : 000000000000004e
      
      X20: 0xffff8008f2d97f90:
      7f90  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      7fb0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      libprocessgroup: Failed to kill process cgroup uid 0 pid 22343 in 215ms, 1 processes remain
      7fd0
      Timeout for IPC response!
       00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      using random self ethernet address
      7ff0  00000000 00000000 00000000 00000000 f76c8010 ffff8008 f76c8010 ffff8008
      8010  00000100 00000000 f2d98018 ffff8008 f2d98018 ffff8008 08a067dc
      using random host ethernet address
       ffff0000
      8030  f206d800 ffff8008 091c3650 ffff0000 f7957b18 ffff8008 f7957730 ffff8008
      8050  f716a630 ffff8008 00000000 00000005 00000000 00000000 095d1568 ffff0000
      8070  f76c8010 ffff8008 f716a800 ffff8008 095cac68 ffff0000 f206d828 ffff8008
      
      X21: 0xffff8008f2d98314:
      8314  ffff8008 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      8334  00000000 00000000 00000000 00000000 00000000 08a04cf4 ffff0000 00000000
      8354  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      8374  00000000 00000000 00000000 00001001 00000000 00000000 00000000 00000000
      8394  e4bbe4bb 0f230000 ffff0000 0afae000 ffff0000 ae001000 00000000 f206d400
      Timeout for IPC response!
      83b4  ffff8008 00000000 00000000 f7957b18 ffff8008 f7957718 ffff8008 f7957018
      83d4  ffff8008 f7957118 ffff8008 f7957618 ffff8008 f7957818 ffff8008 f7957918
      83f4  ffff8008 f7957d18 ffff8008 00000000 00000000 00000000 00000000 00000000
      
      X23: 0xffff8008f2d97f90:
      7f90  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      7fb0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      7fd0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      7ff0  00000000 00000000 00000000 00000000 f76c8010 ffff8008 f76c8010 ffff8008
      8010  00000100 00000000 f2d98018 ffff8008 f2d98018 ffff8008 08a067dc ffff0000
      8030  f206d800 ffff8008 091c3650 ffff0000 f7957b18 ffff8008 f7957730 ffff8008
      8050  f716a630 ffff8008 00000000 00000005 00000000 00000000 095d1568 ffff0000
      8070  f76c8010 ffff8008 f716a800 ffff8008 095cac68 ffff0000 f206d828 ffff8008
      
      X28: 0xffff8008f2349b80:
      9b80  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      9ba0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      9bc0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      9be0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      9c00  00000022 00000000 ffffffff ffffffff 00010001 00000000 00000000 00000000
      9c20  0b0a8000 ffff0000 00000002 00404040 00000000 00000000 00000000 00000000
      9c40  00000001 00000000 00000001 00000000 001ebd44 00000001 f390b800 ffff8008
      9c60  00000000 00000001 00000070 00000070 00000070 00000000 09031d48 ffff0000
      
      Call trace:
      Exception stack(0xffff000008003c90 to 0xffff000008003dd0)
      3c80:                                   000000000000004e c3f28b86000c3900
      3ca0: c3f28b86000c3900 ffffffffffffffff 0000000000000000 0000000000000000
      3cc0: ffff000009f15e78 ffff0000086ca6cc ffff000009c8e280 6e6f637369642067
      3ce0: 206e6f207463656e 7465676461472061 7369207461687420 746f6e2009090920
      3d00: 7463656e6e6f6320 ffffffffffffffff ffff00000829f4d4 0000e395735727e8
      3d20: 0000e3956f4f075a 0000000000000000 ffff8008f2d98010 ffff8008f2d98394
      3d40: 00000000000001c0 ffff8008f2d98010 ffff000009c8e280 ffff000009885018
      3d60: ffff000008004000 ffff000009885018 ffff8008f2349c00 ffff000008003dd0
      3d80: ffff0000089ff9b0 ffff000008003dd0 ffff0000089ff9b0 00000000600001c5
      3da0: ffff8008f33f2cd8 0000000000000000 0000ffffffffffff 0000000000000000
      init: Received control message 'start' for 'adbd' from pid: 3359 (/vendor/bin/hw/android.hardware.usb@1.1-service.imx)
      3dc0: ffff000008003dd0 ffff0000089ff9b0
      [<ffff0000089ff9b0>] composite_disconnect+0x80/0x88
      [<ffff000008a044d4>] android_disconnect+0x3c/0x68
      [<ffff0000089ba9f8>] cdns3_device_irq_handler+0xfc/0x2c8
      [<ffff0000089b84c0>] cdns3_irq+0x44/0x94
      [<ffff00000814494c>] __handle_irq_event_percpu+0x60/0x24c
      [<ffff000008144c0c>] handle_irq_event+0x58/0xc0
      [<ffff00000814873c>] handle_fasteoi_irq+0x98/0x180
      [<ffff000008143a10>] generic_handle_irq+0x24/0x38
      [<ffff000008144170>] __handle_domain_irq+0x60/0xac
      [<ffff0000080819c4>] gic_handle_irq+0xd4/0x17c
      Signed-off-by: default avatarPeter Chen <peter.chen@nxp.com>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      1a1c851b
    • Navid Emamdoost's avatar
      usb: dwc3: pci: prevent memory leak in dwc3_pci_probe · 9bbfceea
      Navid Emamdoost authored
      In dwc3_pci_probe a call to platform_device_alloc allocates a device
      which is correctly put in case of error except one case: when the call to
      platform_device_add_properties fails it directly returns instead of
      going to error handling. This commit replaces return with the goto.
      
      Fixes: 1a7b12f6 ("usb: dwc3: pci: Supply device properties via driver data")
      Signed-off-by: default avatarNavid Emamdoost <navid.emamdoost@gmail.com>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      9bbfceea
    • Chandana Kishori Chiluveru's avatar
      usb: gadget: composite: Fix possible double free memory bug · 1c20c89b
      Chandana Kishori Chiluveru authored
      composite_dev_cleanup call from the failure of configfs_composite_bind
      frees up the cdev->os_desc_req and cdev->req. If the previous calls of
      bind and unbind is successful these will carry stale values.
      
      Consider the below sequence of function calls:
      configfs_composite_bind()
              composite_dev_prepare()
                      - Allocate cdev->req, cdev->req->buf
              composite_os_desc_req_prepare()
                      - Allocate cdev->os_desc_req, cdev->os_desc_req->buf
      configfs_composite_unbind()
              composite_dev_cleanup()
                      - free the cdev->os_desc_req->buf and cdev->req->buf
      Next composition switch
      configfs_composite_bind()
              - If it fails goto err_comp_cleanup will call the
      	  composite_dev_cleanup() function
              composite_dev_cleanup()
      	        - calls kfree up with the stale values of cdev->req->buf and
      		  cdev->os_desc_req from the previous configfs_composite_bind
      		  call. The free call on these stale values leads to double free.
      
      Hence, Fix this issue by setting request and buffer pointer to NULL after
      kfree.
      Signed-off-by: default avatarChandana Kishori Chiluveru <cchiluve@codeaurora.org>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      1c20c89b
    • Cristian Birsan's avatar
      usb: gadget: udc: atmel: Fix interrupt storm in FIFO mode. · ba3a1a91
      Cristian Birsan authored
      Fix interrupt storm generated by endpoints when working in FIFO mode.
      The TX_COMPLETE interrupt is used only by control endpoints processing.
      Do not enable it for other types of endpoints.
      
      Fixes: 914a3f3b ("USB: add atmel_usba_udc driver")
      Signed-off-by: default avatarCristian Birsan <cristian.birsan@microchip.com>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      ba3a1a91
    • Ben Dooks (Codethink)'s avatar
      usb: renesas_usbhs: fix type of buf · e92f30ac
      Ben Dooks (Codethink) authored
      Fix the type of buf in __usbhsg_recip_send_status to
      be __le16 to avoid the following sparse warning:
      
      drivers/usb/renesas_usbhs/mod_gadget.c:335:14: warning: incorrect type in assignment (different base types)
      drivers/usb/renesas_usbhs/mod_gadget.c:335:14:    expected unsigned short
      drivers/usb/renesas_usbhs/mod_gadget.c:335:14:    got restricted __le16 [usertype]
      Reviewed-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
      Signed-off-by: default avatarBen Dooks <ben.dooks@codethink.co.uk>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      e92f30ac
    • Yoshihiro Shimoda's avatar
      usb: renesas_usbhs: Fix warnings in usbhsg_recip_handler_std_set_device() · 20ee71cc
      Yoshihiro Shimoda authored
      This patch fixes the following sparse warnings by shifting 8-bits after
      le16_to_cpu().
      
      drivers/usb/renesas_usbhs/mod_gadget.c:268:47: warning: restricted __le16 degrades to integer
      drivers/usb/renesas_usbhs/mod_gadget.c:268:47: warning: cast to restricted __le16
      Signed-off-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      20ee71cc
    • Yoshihiro Shimoda's avatar
      usb: gadget: udc: renesas_usb3: Fix __le16 warnings · ef48aacf
      Yoshihiro Shimoda authored
      This patch fixes the following sparse warnings by using
      a macro and a suitable variable type.
      
      drivers/usb/gadget/udc/renesas_usb3.c:1547:17: warning: restricted __le16 degrades to integer
      drivers/usb/gadget/udc/renesas_usb3.c:1550:43: warning: incorrect type in argument 2 (different base types)
      drivers/usb/gadget/udc/renesas_usb3.c:1550:43:    expected unsigned short [usertype] addr
      drivers/usb/gadget/udc/renesas_usb3.c:1550:43:    got restricted __le16 [usertype] wValue
      drivers/usb/gadget/udc/renesas_usb3.c:1607:24: warning: incorrect type in assignment (different base types)
      drivers/usb/gadget/udc/renesas_usb3.c:1607:24:    expected unsigned short [assigned] [usertype] status
      drivers/usb/gadget/udc/renesas_usb3.c:1607:24:    got restricted __le16 [usertype]
      drivers/usb/gadget/udc/renesas_usb3.c:1775:17: warning: restricted __le16 degrades to integer
      Signed-off-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      ef48aacf
    • Ben Dooks (Codethink)'s avatar
      usb: renesas_usbhs: fix __le16 warnings · 2457b2c1
      Ben Dooks (Codethink) authored
      Fix the warnings generated by casting to/from __le16 without
      using the correct functions.
      
      Fixes the following sparse warnings:
      
      drivers/usb/renesas_usbhs/common.c:165:25: warning: incorrect type in assignment (different base types)
      drivers/usb/renesas_usbhs/common.c:165:25:    expected restricted __le16 [usertype] wValue
      drivers/usb/renesas_usbhs/common.c:165:25:    got unsigned short
      drivers/usb/renesas_usbhs/common.c:166:25: warning: incorrect type in assignment (different base types)
      drivers/usb/renesas_usbhs/common.c:166:25:    expected restricted __le16 [usertype] wIndex
      drivers/usb/renesas_usbhs/common.c:166:25:    got unsigned short
      drivers/usb/renesas_usbhs/common.c:167:25: warning: incorrect type in assignment (different base types)
      drivers/usb/renesas_usbhs/common.c:167:25:    expected restricted __le16 [usertype] wLength
      drivers/usb/renesas_usbhs/common.c:167:25:    got unsigned short
      drivers/usb/renesas_usbhs/common.c:173:39: warning: incorrect type in argument 3 (different base types)
      drivers/usb/renesas_usbhs/common.c:173:39:    expected unsigned short [usertype] data
      drivers/usb/renesas_usbhs/common.c:173:39:    got restricted __le16 [usertype] wValue
      drivers/usb/renesas_usbhs/common.c:174:39: warning: incorrect type in argument 3 (different base types)
      drivers/usb/renesas_usbhs/common.c:174:39:    expected unsigned short [usertype] data
      drivers/usb/renesas_usbhs/common.c:174:39:    got restricted __le16 [usertype] wIndex
      drivers/usb/renesas_usbhs/common.c:175:39: warning: incorrect type in argument 3 (different base types)
      drivers/usb/renesas_usbhs/common.c:175:39:    expected unsigned short [usertype] data
      
      Note. I belive this to be correct, and should be a no-op on arm.
      Reviewed-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Reviewed-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
      Signed-off-by: default avatarBen Dooks <ben.dooks@codethink.co.uk>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      2457b2c1
    • Ben Dooks (Codethink)'s avatar
      usb: cdns3: include host-export,h for cdns3_host_init · 5053691a
      Ben Dooks (Codethink) authored
      The cdns3_host_init() function is declared in host-export.h
      but host.c does not include it. Add the include to have
      the declaration present (and remove the declaration of
      cdns3_host_exit which is now static).
      
      Fixes the following sparse warning:
      
      drivers/usb/cdns3/host.c:58:5: warning: symbol 'cdns3_host_init' was not declared. Should it be static?
      Signed-off-by: default avatarBen Dooks <ben.dooks@codethink.co.uk>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      5053691a
    • Ben Dooks (Codethink)'s avatar
      usb: mtu3: fix missing include of mtu3_dr.h · b26a4052
      Ben Dooks (Codethink) authored
      The declarations of ssusb_gadget_{init,exit} are
      in the mtu3_dr.h file but the code does that implements
      them does not include this. Add the include to fix the
      following sparse warnigns:
      
      drivers/usb/mtu3/mtu3_core.c:825:5: warning: symbol 'ssusb_gadget_init' was not declared. Should it be static?
      drivers/usb/mtu3/mtu3_core.c:925:6: warning: symbol 'ssusb_gadget_exit' was not declared. Should it be static?
      Acked-by: default avatarChunfeng Yun <chunfeng.yun@mediatek.com>
      Signed-off-by: default avatarBen Dooks <ben.dooks@codethink.co.uk>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      b26a4052
    • Nikhil Badola's avatar
      usb: fsl: Check memory resource before releasing it · bc1e3a2d
      Nikhil Badola authored
      Check memory resource existence before releasing it to avoid NULL
      pointer dereference
      Signed-off-by: default avatarNikhil Badola <nikhil.badola@freescale.com>
      Reviewed-by: default avatarRan Wang <ran.wang_1@nxp.com>
      Reviewed-by: default avatarPeter Chen <peter.chen@nxp.com>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      bc1e3a2d
    • Arnd Bergmann's avatar
      usb: dwc3: select CONFIG_REGMAP_MMIO · a51bab59
      Arnd Bergmann authored
      After many randconfig builds, one configuration caused a link
      error with dwc3-meson-g12a lacking the regmap-mmio code:
      
      drivers/usb/dwc3/dwc3-meson-g12a.o: In function `dwc3_meson_g12a_probe':
      dwc3-meson-g12a.c:(.text+0x9f): undefined reference to `__devm_regmap_init_mmio_clk'
      
      Add the select statement that we have for all other users
      of that dependency.
      
      Fixes: c9999337 ("usb: dwc3: Add Amlogic G12A DWC3 glue")
      Acked-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      a51bab59
  3. 26 Oct, 2019 13 commits
  4. 25 Oct, 2019 4 commits