1. 01 Nov, 2017 27 commits
  2. 30 Oct, 2017 4 commits
  3. 27 Oct, 2017 4 commits
    • Gustavo A. R. Silva's avatar
      usb: atm: cxacru: mark expected switch fall-throughs · 3a851c03
      Gustavo A. R. Silva authored
      In preparation to enabling -Wimplicit-fallthrough, mark switch cases
      where we are expecting to fall through.
      Signed-off-by: default avatarGustavo A. R. Silva <garsilva@embeddedor.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3a851c03
    • Gustavo A. R. Silva's avatar
      usb: class: usbtmc: mark expected switch fall-through · e4c6594d
      Gustavo A. R. Silva authored
      In preparation to enabling -Wimplicit-fallthrough, mark switch cases
      where we are expecting to fall through.
      Signed-off-by: default avatarGustavo A. R. Silva <garsilva@embeddedor.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e4c6594d
    • Greg Kroah-Hartman's avatar
      Merge tag 'extcon-next-for-4.15' of... · 4dce3c4b
      Greg Kroah-Hartman authored
      Merge tag 'extcon-next-for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into usb-next
      
      Chanwoo writes:
      
      Update extcon for 4.15
      
      Detailed description for this pull request:
      1. Split out extcon header file for consumer and provider device
      : The extcon has two type of extcon devices as following.
      - 'extcon provider deivce' adds new extcon device and detect
      the state/properties of external connector. Also, it notifies the
      state/properties to the extcon consumer device.
      - 'extcon consumer device' gets the change state/properties
      from extcon provider device.
      
      Prior to that, include/linux/extcon.h contains all exported API
      for both provider and consumer device driver. To clarify the meaning
      of header file and to remove the wrong use-case on consumer device.
      - include/linux/extcon-provider.h includes API for the provider device driver.
      - include/linux/extcon.h includes the API for the consumer device driver.
      
      2. Support the SmartDock accessory on extcon-max77843.c device driver
      - Support the SmartDock accessory which detects following connectors
       at the same time.
       : USB host throught USB hub for mouse, keyboard and so on.
       : MHL connector for video output.
       : Charger connector for battery charging.
      - It tested with Unitek Y-2165 MHL+OTG Hub Smart Phone Dock.
      
      3. Fix the minor issue of extcon driver
      - Delete the unneeded initialization in extcon-max14577.
      - Make extcon_info static const in order to fix the warning.
      4dce3c4b
    • Greg Kroah-Hartman's avatar
      Merge tag 'phy-for-4.15_v1' of... · 6bd5bb1e
      Greg Kroah-Hartman authored
      Merge tag 'phy-for-4.15_v1' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-next
      
      Kishon writes:
      
      phy: for 4.15
      
       *) Add support in phy core to perform phy calibration
       *) Return NULL for optional PHY's even if CONFIG_GENERIC_PHY is not selected
       *) Add USB Phy driver for Broadcom STB SoCs
       *) Add support to force mediatek PHY with USB OTG function to enter
          a specific mode
       *) Calibrate rockchip-typec PHY according to docs
       *) Enable dual route feature for sun4i-usb in V3s SoC
       *) Use dr_mode dt property to enable otg capability in rcar-gen3-usb2
       *) Add driver data to specify dedicated otg pins in rcar-gen3-usb2 driver
       *) Configure the RX equalizer of brcm-sata PHY
       *) Update pcie phy settings for ti-pipe3 phy
       *) Add set_mode callback in qcom-ufs-qmp-14nm phy
       *) Use PHY callbacks in phy-qcom-ufs instead of export APIs
      Signed-off-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
      6bd5bb1e
  4. 26 Oct, 2017 1 commit
  5. 25 Oct, 2017 1 commit
  6. 24 Oct, 2017 3 commits
    • Greg Kroah-Hartman's avatar
      Merge tag 'usb-for-v4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next · 2d5afd51
      Greg Kroah-Hartman authored
      Felipe writes:
      
      usb: changes for v4.15 merge window
      
      Not much going on this time around. With only 51 non-merge commits,
      this was one of the smallest pull requests from the Gadget tree.
      
      Most of the changes are in the mtu3 driver which added support for
      36-bit DMA, support for USB 3.1 and support for dual-role (along with
      some non-critical fixes).
      
      The dwc2 driver got a few improvements to how we handle gadget state
      tracking and also added support for STM32F7xx devices.
      
      Other than that, we just some minor non-critical fixes and
      improvements all over the place.
      2d5afd51
    • John Stultz's avatar
      usb: dwc2: Fix UDC state tracking · ce2b21a4
      John Stultz authored
      It has been noticed that the dwc2 udc state reporting doesn't
      seem to work (at least on HiKey boards). Where after the initial
      setup, the sysfs /sys/class/udc/f72c0000.usb/state file would
      report "configured" no matter the state of the OTG port.
      
      This patch adds a call so that we report to the UDC layer when
      the gadget device is disconnected.
      
      This patch does depend on the previous patch ("usb: dwc2:
      Improve gadget state disconnection handling") in this patch set
      in order to properly work.
      
      Cc: Wei Xu <xuwei5@hisilicon.com>
      Cc: Guodong Xu <guodong.xu@linaro.org>
      Cc: Amit Pundir <amit.pundir@linaro.org>
      Cc: YongQin Liu <yongqin.liu@linaro.org>
      Cc: John Youn <johnyoun@synopsys.com>
      Cc: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
      Cc: Douglas Anderson <dianders@chromium.org>
      Cc: Chen Yu <chenyu56@huawei.com>
      Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: linux-usb@vger.kernel.org
      Acked-by: default avatarMinas Harutyunyan <hminas@synopsys.com>
      Tested-by: default avatarMinas Harutyunyan <hminas@synopsys.com>
      Reported-by: default avatarAmit Pundir <amit.pundir@linaro.org>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      ce2b21a4
    • John Stultz's avatar
      usb: dwc2: Error out of dwc2_hsotg_ep_disable() if we're in host mode · 9b481092
      John Stultz authored
      We've found that while in host mode, using Android, if one runs
      the command:
        stop adbd
      
      The existing usb devices being utilized in host mode are disconnected.
      This is most visible with usb networking devices.
      
      This seems to be due to adbd closing the file:
        /dev/usb-ffs/adb/ep0
      Which calls ffs_ep0_release() and the following backtrace:
      
      [<ffffff800875a430>] dwc2_hsotg_ep_disable+0x148/0x150
      [<ffffff800875a498>] dwc2_hsotg_udc_stop+0x60/0x110
      [<ffffff8008787950>] usb_gadget_remove_driver+0x58/0x78
      [<ffffff80087879e4>] usb_gadget_unregister_driver+0x74/0xe8
      [<ffffff80087850c0>] unregister_gadget+0x28/0x58
      [<ffffff800878511c>] unregister_gadget_item+0x2c/0x40
      [<ffffff8008790ea8>] ffs_data_clear+0xe8/0xf8
      [<ffffff8008790ed8>] ffs_data_reset+0x20/0x58
      [<ffffff8008793218>] ffs_data_closed+0x98/0xe8
      [<ffffff80087932d8>] ffs_ep0_release+0x20/0x30
      
      Then when dwc2_hsotg_ep_disable() is called, we call
      kill_all_requests() which causes a bunch of the following
      messages:
      
      dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode
      dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode
      dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode
      dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode
      dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode
      dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode
      dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode
      dwc2 f72c0000.usb: Mode Mismatch Interrupt: currently in Host mode
      init: Service 'adbd' (pid 1915) killed by signal 9
      init: Sending signal 9 to service 'adbd' (pid 1915) process group...
      init: Successfully killed process cgroup uid 0 pid 1915 in 0ms
      init: processing action (init.svc.adbd=stopped) from (/init.usb.configfs.rc:15)
      dwc2 f72c0000.usb: dwc2_hc_chhltd_intr_dma: Channel 8 - ChHltd set, but reason is unknown
      dwc2 f72c0000.usb: hcint 0x00000002, intsts 0x04200029
      dwc2 f72c0000.usb: dwc2_hc_chhltd_intr_dma: Channel 12 - ChHltd set, but reason is unknown
      dwc2 f72c0000.usb: hcint 0x00000002, intsts 0x04200029
      dwc2 f72c0000.usb: dwc2_hc_chhltd_intr_dma: Channel 15 - ChHltd set, but reason is unknown
      dwc2 f72c0000.usb: hcint 0x00000002, intsts 0x04200029
      dwc2 f72c0000.usb: dwc2_hc_chhltd_intr_dma: Channel 3 - ChHltd set, but reason is unknown
      dwc2 f72c0000.usb: hcint 0x00000002, intsts 0x04200029
      dwc2 f72c0000.usb: dwc2_hc_chhltd_intr_dma: Channel 4 - ChHltd set, but reason is unknown
      dwc2 f72c0000.usb: hcint 0x00000002, intsts 0x04200029
      dwc2 f72c0000.usb: dwc2_update_urb_state_abn(): trimming xfer length
      
      And the usb devices connected are basically hung at this point.
      
      It seems like if we're in host mode, we probably shouldn't run
      the dwc2_hostg_ep_disable logic, so this patch returns an error
      in that case.
      
      With this patch (along with the previous patch in this set), we avoid
      the mismatched interrupts and connected usb devices continue to function.
      
      I'm not sure if some other solution would be better here, but this seems
      to work, so I wanted to send it out for input on what the right approach
      should be.
      
      Cc: Wei Xu <xuwei5@hisilicon.com>
      Cc: Guodong Xu <guodong.xu@linaro.org>
      Cc: Amit Pundir <amit.pundir@linaro.org>
      Cc: YongQin Liu <yongqin.liu@linaro.org>
      Cc: John Youn <johnyoun@synopsys.com>
      Cc: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
      Cc: Douglas Anderson <dianders@chromium.org>
      Cc: Chen Yu <chenyu56@huawei.com>
      Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: linux-usb@vger.kernel.org
      Acked-by: default avatarMinas Harutyunyan <hminas@synopsys.com>
      Tested-by: default avatarMinas Harutyunyan <hminas@synopsys.com>
      Reported-by: default avatarYongQin Liu <yongqin.liu@linaro.org>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      9b481092