1. 28 Aug, 2019 3 commits
    • Nishka Dasgupta's avatar
      usb: dwc3: st: Add of_dev_put() in probe function · bceb418b
      Nishka Dasgupta authored
      In function st_dwc3_probe, variable child_pdev takes the value returned
      by of_find_device_by_node, which gets a device pointer but does not put
      it. If child_pdev is not put before the probe function returns, it may
      cause a reference leak. Hence put child_pdev after its last usage.
      Issue found with Coccinelle.
      Reviewed-by: default avatarPatrice Chotard <patrice.chotard@st.com>
      Signed-off-by: default avatarNishka Dasgupta <nishkadg.linux@gmail.com>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      bceb418b
    • Nishka Dasgupta's avatar
      usb: dwc3: st: Add of_node_put() before return in probe function · e36721b9
      Nishka Dasgupta authored
      The local variable child in the function st_dwc3_probe takes the return
      value of of_get_child_by_name, which gets a node and does not put it. If
      the function returns without releasing child, this could cause a memory
      error. Hence put child as soon as there is no more use for it. Also
      create a new label, err_node_put, just before label undo_softreset; so
      that err_node_put puts child. In between initialisation of child and its
      first put, modify all statements that go to undo_softreset to now go to
      err_node_put instead, from where they can fall through to
      undo_softreset.
      Issue found with Coccinelle.
      Reviewed-by: default avatarPatrice Chotard <patrice.chotard@st.com>
      Signed-off-by: default avatarNishka Dasgupta <nishkadg.linux@gmail.com>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      e36721b9
    • Roger Quadros's avatar
      usb: dwc3: don't set gadget->is_otg flag · c09b73cf
      Roger Quadros authored
      This reverts
      commit 6a4290cc ("usb: dwc3: gadget: set the OTG flag in dwc3 gadget driver.")
      
      We don't yet support any of the OTG mechanisms (HNP/SRP/ADP)
      and are not setting gadget->otg_caps, so don't set gadget->is_otg
      flag.
      
      If we do then we end up publishing a OTG1.0 descriptor in
      the gadget descriptor which causes device enumeration to fail
      if we are connected to a host with CONFIG_USB_OTG enabled.
      
      Host side log without this patch
      
      [   96.720453] usb 1-1: new high-speed USB device number 2 using xhci-hcd
      [   96.901391] usb 1-1: Dual-Role OTG device on non-HNP port
      [   96.907552] usb 1-1: set a_alt_hnp_support failed: -32
      [   97.060447] usb 1-1: new high-speed USB device number 3 using xhci-hcd
      [   97.241378] usb 1-1: Dual-Role OTG device on non-HNP port
      [   97.247536] usb 1-1: set a_alt_hnp_support failed: -32
      [   97.253606] usb usb1-port1: attempt power cycle
      [   97.960449] usb 1-1: new high-speed USB device number 4 using xhci-hcd
      [   98.141383] usb 1-1: Dual-Role OTG device on non-HNP port
      [   98.147540] usb 1-1: set a_alt_hnp_support failed: -32
      [   98.300453] usb 1-1: new high-speed USB device number 5 using xhci-hcd
      [   98.481391] usb 1-1: Dual-Role OTG device on non-HNP port
      [   98.487545] usb 1-1: set a_alt_hnp_support failed: -32
      [   98.493532] usb usb1-port1: unable to enumerate USB device
      Signed-off-by: default avatarRoger Quadros <rogerq@ti.com>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      c09b73cf
  2. 12 Aug, 2019 10 commits
  3. 09 Aug, 2019 14 commits
  4. 05 Aug, 2019 1 commit
  5. 04 Aug, 2019 10 commits
  6. 03 Aug, 2019 2 commits
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-current-fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · cf6c8aef
      Linus Torvalds authored
      Pull i2c fixes from Wolfram Sang:
       "A set of driver fixes for the I2C subsystem"
      
      * 'i2c/for-current-fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: s3c2410: Mark expected switch fall-through
        i2c: at91: fix clk_offset for sama5d2
        i2c: at91: disable TXRDY interrupt after sending data
        i2c: iproc: Fix i2c master read more than 63 bytes
        eeprom: at24: make spd world-readable again
      cf6c8aef
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 8b7fd679
      Linus Torvalds authored
      Pull perf tooling fixes from Thomas Gleixner:
       "A set of updates for perf tools and documentation:
      
        perf header:
          - Prevent a division by zero
          - Deal with an uninitialized warning proper
      
        libbpf:
          - Fix the missiong __WORDSIZE definition for musl & al
      
        UAPI headers:
          - Synchronize kernel headers
      
        Documentation:
          - Fix the memory units for perf.data size"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        libbpf: fix missing __WORDSIZE definition
        perf tools: Fix perf.data documentation units for memory size
        perf header: Fix use of unitialized value warning
        perf header: Fix divide by zero error if f_header.attr_size==0
        tools headers UAPI: Sync if_link.h with the kernel
        tools headers UAPI: Sync sched.h with the kernel
        tools headers UAPI: Sync usbdevice_fs.h with the kernels to get new ioctl
        tools perf beauty: Fix usbdevfs_ioctl table generator to handle _IOC()
        tools headers UAPI: Update tools's copy of drm.h headers
        tools headers UAPI: Update tools's copy of mman.h headers
        tools headers UAPI: Update tools's copy of kvm.h headers
        tools include UAPI: Sync x86's syscalls_64.tbl and generic unistd.h to pick up clone3 and pidfd_open
      8b7fd679