1. 15 5月, 2018 4 次提交
  2. 26 3月, 2018 1 次提交
    • F
      usb: dwc3: gadget: never call ->complete() from ->ep_queue() · c91815b5
      Felipe Balbi 提交于
      This is a requirement which has always existed but, somehow, wasn't
      reflected in the documentation and problems weren't found until now
      when Tuba Yavuz found a possible deadlock happening between dwc3 and
      f_hid. She described the situation as follows:
      
      spin_lock_irqsave(&hidg->write_spinlock, flags); // first acquire
      /* we our function has been disabled by host */
      if (!hidg->req) {
      	free_ep_req(hidg->in_ep, hidg->req);
      	goto try_again;
      }
      
      [...]
      
      status = usb_ep_queue(hidg->in_ep, hidg->req, GFP_ATOMIC);
      =>
      	[...]
      	=> usb_gadget_giveback_request
      		=>
      		f_hidg_req_complete
      			=>
      			spin_lock_irqsave(&hidg->write_spinlock, flags); // second acquire
      
      Note that this happens because dwc3 would call ->complete() on a
      failed usb_ep_queue() due to failed Start Transfer command. This is,
      anyway, a theoretical situation because dwc3 currently uses "No
      Response Update Transfer" command for Bulk and Interrupt endpoints.
      
      It's still good to make this case impossible to happen even if the "No
      Reponse Update Transfer" command is changed.
      Reported-by: NTuba Yavuz <tuba@ece.ufl.edu>
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c91815b5
  3. 22 3月, 2018 12 次提交
  4. 19 3月, 2018 1 次提交
  5. 13 3月, 2018 6 次提交
  6. 08 3月, 2018 1 次提交
  7. 28 2月, 2018 1 次提交
  8. 15 2月, 2018 1 次提交
    • R
      usb: dwc3: core: Fix ULPI PHYs and prevent phy_get/ulpi_init during suspend/resume · 98112041
      Roger Quadros 提交于
      In order for ULPI PHYs to work, dwc3_phy_setup() and dwc3_ulpi_init()
      must be doene before dwc3_core_get_phy().
      
      commit 541768b0 ("usb: dwc3: core: Call dwc3_core_get_phy() before initializing phys")
      broke this.
      
      The other issue is that dwc3_core_get_phy() and dwc3_ulpi_init() should
      be called only once during the life cycle of the driver. However,
      as dwc3_core_init() is called during system suspend/resume it will
      result in multiple calls to dwc3_core_get_phy() and dwc3_ulpi_init()
      which is wrong.
      
      Fix this by moving dwc3_ulpi_init() out of dwc3_phy_setup()
      into dwc3_core_ulpi_init(). Use a flag 'ulpi_ready' to ensure that
      dwc3_core_ulpi_init() is called only once from dwc3_core_init().
      
      Use another flag 'phys_ready' to call dwc3_core_get_phy() only once from
      dwc3_core_init().
      
      Fixes: 541768b0 ("usb: dwc3: core: Call dwc3_core_get_phy() before initializing phys")
      Fixes: f54edb53 ("usb: dwc3: core: initialize ULPI before trying to get the PHY")
      Cc: linux-stable <stable@vger.kernel.org> # >= v4.13
      Signed-off-by: NRoger Quadros <rogerq@ti.com>
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      98112041
  9. 12 2月, 2018 7 次提交
  10. 29 12月, 2017 1 次提交
    • V
      phy: exynos5-usbdrd: Calibrate LOS levels for exynos5420/5800 · d8c80bb3
      Vivek Gautam 提交于
      Adding phy calibration sequence for USB 3.0 DRD PHY present on
      Exynos5420/5800 systems.
      This calibration facilitates setting certain PHY parameters viz.
      the Loss-of-Signal (LOS) Detector Threshold Level, as well as
      Tx-Vboost-Level for Super-Speed operations.
      Additionally we also set proper time to wait for RxDetect measurement,
      for desired PHY reference clock, so as to solve issue with enumeration
      of few USB 3.0 devices, like Samsung SUM-TSB16S 3.0 USB drive
      on the controller.
      
      We are using CR_port for this purpose to send required data
      to override the LOS values.
      
      On testing with USB 3.0 devices on USB 3.0 port present on
      SMDK5420, and peach-pit boards should see following message:
      usb 2-1: new SuperSpeed USB device number 2 using xhci-hcd
      
      and without this patch, should see below shown message:
      usb 1-1: new high-speed USB device number 2 using xhci-hcd
      
      [Also removed unnecessary extra lines in the register macro definitions]
      Signed-off-by: NVivek Gautam <gautam.vivek@samsung.com>
      [adapted to use phy_calibrate as entry point]
      Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com>
      Acked-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com>
      Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com>
      d8c80bb3
  11. 11 12月, 2017 5 次提交