1. 01 Nov, 2017 4 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 14 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
    • John Stultz's avatar
      usb: dwc2: Improve gadget state disconnection handling · d2471d4a
      John Stultz authored
      In the earlier commit dad3f793 ("usb: dwc2: Make sure we
      disconnect the gadget state"), I was trying to fix up the
      fact that we somehow weren't disconnecting the gadget state,
      so that when the OTG port was plugged in the second time we
      would get warnings about the state tracking being wrong.
      
      (This seems to be due to a quirk of the HiKey board where
      we do not ever get any otg interrupts, particularly the session
      end detected signal. Instead we only see status change
      interrupt.)
      
      The fix there was somewhat simple, as it just made sure to
      call dwc2_hsotg_disconnect() before we connected things up
      in OTG mode, ensuring the state handling didn't throw errors.
      
      But in looking at a different issue I was seeing with UDC
      state handling, I realized that it would be much better
      to call dwc2_hsotg_disconnect when we get the state change
      signal moving to host mode.
      
      Thus, this patch removes the earlier disconnect call I added
      and moves it (and the needed locking) to the host mode
      transition.
      
      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>
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      d2471d4a
    • Manu Gautam's avatar
      usb: dwc3: core: Notify current USB mode to USB3 PHY as well · 644cbbc3
      Manu Gautam authored
      Driver currently notifies only USB2 PHY on USB mode change.
      Extend this to USB3 PHY so that PHY drivers based on the
      mode can release system resources - clocks, regulators etc.
      Additionally Qualcomm QMP and QUSB2 PHY drivers need to
      override VBUS signal in PHY wrapper in device mode as USB
      VBUS line is not connected to PHYs. Also, remove NULL checks
      for PHY when calling phy_set_mode as PHY ops already check this.
      Signed-off-by: default avatarManu Gautam <mgautam@codeaurora.org>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      644cbbc3
    • Manu Gautam's avatar
      usb: dwc3: pci: Runtime resume child device from wq · 8eed00b2
      Manu Gautam authored
      Driver currently resumes and increments pm usage_count
      of its child device (dwc3 main) from its runtime_resume
      handler. This requires dwc3 runtime_resume to perform
      pm_runtime_put to decrement the pm usage_count. However
      runtime_put from dwc3 happens for non pci drivers
      (e.g. dwc3-if-simple.c) as well which results in dwc3
      pm usage_count becoming negative after couple of
      runtime suspend resume iterations. Fix this by
      performing runtime_get/put from dwc3-pci driver only
      using workqueue.
      Signed-off-by: default avatarManu Gautam <mgautam@codeaurora.org>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      8eed00b2
    • Manu Gautam's avatar
      usb: dwc3: Don't reinitialize core during host bus-suspend/resume · 689bf72c
      Manu Gautam authored
      Driver powers-off PHYs and reinitializes DWC3 core and gadget on
      resume. While this works fine for gadget mode but in host
      mode there is not re-initialization of host stack. Also, resetting
      bus as part of bus_suspend/resume is not correct which could affect
      (or disconnect) connected devices.
      Fix this by not reinitializing core on suspend/resume in host mode
      for HOST only and OTG/drd configurations.
      Signed-off-by: default avatarManu Gautam <mgautam@codeaurora.org>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      689bf72c
    • Alexey Khoroshilov's avatar
      usb: phy: tahvo: fix error handling in tahvo_usb_probe() · ce035409
      Alexey Khoroshilov authored
      If devm_extcon_dev_allocate() fails, we should disable clk before return.
      
      Found by Linux Driver Verification project (linuxtesting.org).
      Signed-off-by: default avatarAlexey Khoroshilov <khoroshilov@ispras.ru>
      Fixes: 860d2686 ("usb: phy: tahvo: Use devm_extcon_dev_[allocate|register]() and replace deprecated API")
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      ce035409
    • Gustavo A. R. Silva's avatar
      usb: gadget: serial: mark expected switch fall-through · fdb5e4fa
      Gustavo A. R. Silva authored
      In preparation to enabling -Wimplicit-fallthrough, mark switch cases
      where we are expecting to fall through.
      
      Addresses-Coverity-ID: 1350962
      Signed-off-by: default avatarGustavo A. R. Silva <garsilva@embeddedor.com>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      fdb5e4fa
    • Gustavo A. R. Silva's avatar
      usb: phy: phy-msm-usb: mark expected switch fall-through · 58a636ec
      Gustavo A. R. Silva authored
      In preparation to enabling -Wimplicit-fallthrough, mark switch cases
      where we are expecting to fall through.
      
      Addresses-Coverity-ID: 1222118
      Signed-off-by: default avatarGustavo A. R. Silva <garsilva@embeddedor.com>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      58a636ec
    • Gustavo A. R. Silva's avatar
      usb: gadget: f_tcm: mark expected switch fall-through · d4acce95
      Gustavo A. R. Silva authored
      In preparation to enabling -Wimplicit-fallthrough, mark switch cases
      where we are expecting to fall through.
      
      Addresses-Coverity-ID: 703128
      Signed-off-by: default avatarGustavo A. R. Silva <garsilva@embeddedor.com>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      d4acce95
    • Gustavo A. R. Silva's avatar
      usb: gadget: goku_udc: mark expected switch fall-throughs · 457b16d4
      Gustavo A. R. Silva authored
      In preparation to enabling -Wimplicit-fallthrough, mark switch cases
      where we are expecting to fall through.
      
      Addresses-Coverity-ID: 145713
      Signed-off-by: default avatarGustavo A. R. Silva <garsilva@embeddedor.com>
      Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
      457b16d4
    • Marek Szyprowski's avatar
      extcon: max77843: Add support for SmartDock accessory · 4a4a8714
      Marek Szyprowski authored
      SmartDock uses ADC_RESERVED_ACC_3 (0x10) ADC ID type and provides following
      features:
      1. USB host with embedded USB hub (2-4 ports) for mice, keyboard, etc,
      2. MHL for video output,
      3. charging.
      
      Tested with Unitek Y-2165 MHL+OTG Hub Smart Phone Dock.
      Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Acked-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
      Acked-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
      4a4a8714
    • Marek Szyprowski's avatar
      extcon: max77843: Add OTG power control to the MUIC driver · 7b965110
      Marek Szyprowski authored
      Enabling power on VBUS micro-usb pin is required only when passive OTG
      cable is connected. Initially OTG VBUS power control was planned to be
      done in charger driver. However such information is not really available
      from the extcon notifications, so VBUS power control has to be done
      directly in MUIC driver, which has all information about the attached
      accessory.
      
      For example SmartDock is externally powered accessory, provides OTG
      (USB HOST) functionality and use VBUS pin for charging a device battery,
      so the VBUS charging pump should be disabled in such case.
      Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Acked-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
      Acked-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
      7b965110
  7. 23 Oct, 2017 12 commits
    • Greg Kroah-Hartman's avatar
      Merge 4.14-rc6 into usb-next · 0520d37b
      Greg Kroah-Hartman authored
      We need the USB fixes in here as well.
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      0520d37b
    • Linus Torvalds's avatar
      Linux 4.14-rc6 · bb176f67
      Linus Torvalds authored
      bb176f67
    • Linus Torvalds's avatar
      Merge tag 'staging-4.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · dd9d064e
      Linus Torvalds authored
      Pull staging and IIO fixes from Greg KH:
       "Here are a small number of patches to resolve some reported IIO and a
        staging driver problem. Nothing major here, full details are in the
        shortlog below.
      
        All have been in linux-next with no reported issues"
      
      * tag 'staging-4.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        staging: bcm2835-audio: Fix memory corruption
        iio: adc: at91-sama5d2_adc: fix probe error on missing trigger property
        iio: adc: dln2-adc: fix build error
        iio: dummy: events: Add missing break
        staging: iio: ade7759: fix signed extension bug on shift of a u8
        iio: pressure: zpa2326: Remove always-true check which confuses gcc
        iio: proximity: as3935: noise detection + threshold changes
      dd9d064e
    • Linus Torvalds's avatar
      Merge tag 'char-misc-4.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 17e7637f
      Linus Torvalds authored
      Pull char/misc driver fixes from Greg KH:
       "Here are four small fixes for 4.14-rc6.
      
        Three of them are binder driver fixes for reported issues, and the
        last one is a hyperv driver bugfix. Nothing major, but good fixes to
        get into 4.14-final.
      
        All of these have been in linux-next with no reported issues"
      
      * tag 'char-misc-4.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        android: binder: Fix null ptr dereference in debug msg
        android: binder: Don't get mm from task
        vmbus: hvsock: add proper sync for vmbus_hvsock_device_unregister()
        binder: call poll_wait() unconditionally.
      17e7637f
    • Linus Torvalds's avatar
      Merge tag 'usb-4.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 58059921
      Linus Torvalds authored
      Pull USB/PHY fixes from Greg KH:
       "Here are a small number of USB and PHY driver fixes for 4.14-rc6
      
        There is the usual musb and xhci fixes in here, as well as some needed
        phy patches. Also is a nasty regression fix for usbfs that has started
        to hit a lot of people using virtual machines.
      
        All of these have been in linux-next with no reported problems"
      
      * tag 'usb-4.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (26 commits)
        usb: hub: Allow reset retry for USB2 devices on connect bounce
        USB: core: fix out-of-bounds access bug in usb_get_bos_descriptor()
        MAINTAINERS: fix git tree url for musb module
        usb: quirks: add quirk for WORLDE MINI MIDI keyboard
        usb: musb: sunxi: Explicitly release USB PHY on exit
        usb: musb: Check for host-mode using is_host_active() on reset interrupt
        usb: musb: musb_cppi41: Configure the number of channels for DA8xx
        usb: musb: musb_cppi41: Fix cppi41_set_dma_mode() for DA8xx
        usb: musb: musb_cppi41: Fix the address of teardown and autoreq registers
        USB: musb: fix late external abort on suspend
        USB: musb: fix session-bit runtime-PM quirk
        usb: cdc_acm: Add quirk for Elatec TWN3
        USB: devio: Revert "USB: devio: Don't corrupt user memory"
        usb: xhci: Handle error condition in xhci_stop_device()
        usb: xhci: Reset halted endpoint if trb is noop
        xhci: Cleanup current_cmd in xhci_cleanup_command_queue()
        xhci: Identify USB 3.1 capable hosts by their port protocol capability
        USB: serial: metro-usb: add MS7820 device id
        phy: rockchip-typec: Check for errors from tcphy_phy_init()
        phy: rockchip-typec: Don't set the aux voltage swing to 400 mV
        ...
      58059921
    • Daniel Drake's avatar
      USB: Force disconnect Huawei 4G modem during suspend · 8dd8d2c9
      Daniel Drake authored
      When going into S3 suspend, the Acer TravelMate P648-M and P648-G3
      laptops immediately wake up 3-4 seconds later for no obvious reason.
      
      Unbinding the integrated Huawei 4G LTE modem before suspend avoids
      the issue, even though we are not using the modem at all (checked
      from rescue.target/runlevel1). The problem also occurs when the option
      and cdc-ether modem drivers aren't loaded; it reproduces just with the
      base usb driver. Under Windows the system can suspend fine.
      
      Seeking a better fix, we've tried a lot of things, including:
       - Check that the device's power/wakeup is disabled
       - Check that remote wakeup is off at the USB level
       - All the quirks in drivers/usb/core/quirks.c e.g. USB_QUIRK_RESET_RESUME,
         USB_QUIRK_RESET, USB_QUIRK_IGNORE_REMOTE_WAKEUP, USB_QUIRK_NO_LPM.
      
      but none of that makes any difference.
      
      There are no errors in the logs showing any suspend/resume-related issues.
      When the system wakes up due to the modem, log-wise it appears to be a
      normal resume.
      
      Introduce a quirk to disable the port during suspend when the modem is
      detected.
      
      The modem from the P648-G3 model is:
      T:  Bus=01 Lev=01 Prnt=01 Port=08 Cnt=04 Dev#=  5 Spd=480  MxCh= 0
      D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=ff MxPS=64 #Cfgs=  3
      P:  Vendor=12d1 ProdID=15c3 Rev= 1.02
      S:  Manufacturer=Huawei Technologies Co., Ltd.
      S:  Product=HUAWEI Mobile
      S:  SerialNumber=0123456789ABCDEF
      C:  #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=  2mA
      I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=06 Prot=10 Driver=
      E:  Ad=82(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
      E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      I:  If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=13 Driver=
      E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      I:  If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=12 Driver=
      E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      I:  If#= 3 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=06 Prot=16 Driver=
      E:  Ad=86(I) Atr=03(Int.) MxPS=  16 Ivl=2ms
      I:  If#= 3 Alt= 1 #EPs= 3 Cls=ff(vend.) Sub=06 Prot=16 Driver=
      E:  Ad=86(I) Atr=03(Int.) MxPS=  16 Ivl=2ms
      E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      I:  If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=1b Driver=
      E:  Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      C:* #Ifs= 6 Cfg#= 2 Atr=a0 MxPwr=  2mA
      I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=cdc_ether
      E:  Ad=82(I) Atr=03(Int.) MxPS=  16 Ivl=2ms
      I:* If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=06 Prot=00 Driver=cdc_ether
      E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=06 Prot=10 Driver=option
      E:  Ad=84(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
      E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=13 Driver=option
      E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=12 Driver=option
      E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      I:* If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=1b Driver=option
      E:  Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      C:  #Ifs= 2 Cfg#= 3 Atr=a0 MxPwr=  2mA
      A:  FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=0e Prot=00
      I:  If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver=
      E:  Ad=82(I) Atr=03(Int.) MxPS=  16 Ivl=2ms
      I:  If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=02 Driver=
      I:  If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=
      E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      
      Based on an earlier patch by Chris Chiu.
      Signed-off-by: default avatarDaniel Drake <drake@endlessm.com>
      Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8dd8d2c9
    • Jaejoong Kim's avatar
      usb: misc: usbtest: remove duplicate & operation · 9f8e32df
      Jaejoong Kim authored
      usb_endpoint_maxp() has an inline keyword and searches for bits[10:0]
      by & operation with 0x7ff. So, we can remove the duplicate & operation
      with 0x7ff.
      Signed-off-by: default avatarJaejoong Kim <climbbb.kim@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9f8e32df
    • Chunfeng Yun's avatar
      dt-bindings: usb: mtk-xhci: remove dummy clocks and add optional ones · e7eef2ce
      Chunfeng Yun authored
      Remove dummy clocks for usb wakeup and add optional ones for
      MCU_BUS_CK and DMA_BUS_CK.
      Signed-off-by: default avatarChunfeng Yun <chunfeng.yun@mediatek.com>
      Acked-by: default avatarRob Herring <robh@kernel.org>
      Reviewed-by: default avatarMatthias Brugger <matthias.bgg@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e7eef2ce
    • Chunfeng Yun's avatar
      dt-bindings: usb: mtk-xhci: add a optional property to disable u3ports · 2fbf8050
      Chunfeng Yun authored
      Add a new optional property to disable u3ports
      Signed-off-by: default avatarChunfeng Yun <chunfeng.yun@mediatek.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2fbf8050
    • Chunfeng Yun's avatar
      usb: host: modify description for MTK xHCI config · 7b81a586
      Chunfeng Yun authored
      Due to all MediaTek SoCs with xHCI host controller use this
      driver, remove limitation for specific SoCs
      Signed-off-by: default avatarChunfeng Yun <chunfeng.yun@mediatek.com>
      Acked-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7b81a586
    • Chunfeng Yun's avatar
      usb: xhci-mtk: add optional mcu and dma bus clocks · b6bb72cf
      Chunfeng Yun authored
      There are mcu_bus and dma_bus clocks needed to be controlled by
      driver on some SoCs, so add them as optional ones
      Signed-off-by: default avatarChunfeng Yun <chunfeng.yun@mediatek.com>
      Acked-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
      Reviewed-by: default avatarMatthias Brugger <matthias.bgg@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b6bb72cf
    • Chunfeng Yun's avatar
      usb: xhci-mtk: remove dummy wakeup debounce clocks · 603fbd15
      Chunfeng Yun authored
      The wakeup debounce clocks for each ports in fact are not
      needed, so remove them.
      Signed-off-by: default avatarChunfeng Yun <chunfeng.yun@mediatek.com>
      Acked-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
      Reviewed-by: default avatarMatthias Brugger <matthias.bgg@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      603fbd15