1. 24 10月, 2017 3 次提交
  2. 19 10月, 2017 7 次提交
  3. 28 9月, 2017 1 次提交
  4. 18 9月, 2017 1 次提交
  5. 15 8月, 2017 1 次提交
  6. 11 8月, 2017 1 次提交
  7. 09 8月, 2017 3 次提交
  8. 03 8月, 2017 1 次提交
    • M
      usb: dwc3: gadget: Correct ISOC DATA PIDs for short packets · 40d829fb
      Manu Gautam 提交于
      The PIDs for Isochronous data transfers are incorrect
      for high bandwidth IN endpoints when the request length
      is less than EP wMaxPacketSize.
      
      As per spec correct PIDs for ISOC data transfers are:
      
      1) For request length <= maxpacket
      	- DATA0,
      
      2) For maxpacket < length <= (2 * maxpacket)
      	- DATA1, DATA0
      
      3) For (2 * maxpacket) <  length <= (3 * maxpacket)
      	- DATA2, DATA1, DATA0.
      
      But driver always sets PCM fields based on wMaxPacketSize
      due to which DATA2 happens even for small requests.
      
      Fix this by setting the PCM field of trb->size depending
      on request length rather than fixing it to the value
      depending on wMaxPacketSize.
      
      Ideally it shouldn't give any issues as dwc3 will send
      0-length packet for next IN token if host sends (even
      after receiving a short packet). Windows seems to ignore
      this but with MacOS frame loss observed when using f_uvc.
      Signed-off-by: NManu Gautam <mgautam@codeaurora.org>
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      40d829fb
  9. 17 7月, 2017 3 次提交
    • J
      usb: dwc3: gadget: only unmap requests from DMA if mapped · 4a71fcb8
      Jack Pham 提交于
      A recent optimization was made so that a request put on the
      pending_list wouldn't get mapped for DMA until just before
      preparing a TRB for it. However, this poses a problem in case
      the request is dequeued or the endpoint is disabled before the
      mapping is done as that would lead to dwc3_gadget_giveback()
      unconditionally calling usb_gadget_unmap_request_for_dev() with
      an invalid request->dma handle. Depending on the platform's DMA
      implementation the unmap operation could result in a panic.
      
      Since we know a successful mapping is a prerequisite for getting
      a TRB, the unmap can be conditionally called only when req->trb
      is non-NULL.
      
      Fixes: cdb55b39 ("usb: dwc3: gadget: lazily map requests for DMA")
      Signed-off-by: NJack Pham <jackp@codeaurora.org>
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      4a71fcb8
    • V
      usb: dwc3: omap: remove IRQ_NOAUTOEN used with shared irq · ee249b45
      Vignesh R 提交于
      IRQ_NOAUTOEN cannot be used with shared IRQs, since commit 04c848d3
      ("genirq: Warn when IRQ_NOAUTOEN is used with shared interrupts") and
      kernel now throws a warn dump. But OMAP DWC3 driver uses this flag. As
      per commit 12a7f17f ("usb: dwc3: omap: fix race of pm runtime with
      irq handler in probe") that introduced this flag, PM runtime can race
      with IRQ handler when deferred probing happens due to extcon,
      therefore IRQ_NOAUTOEN needs to be set so that irq is not enabled until
      extcon is registered.
      
      Remove setting of IRQ_NOAUTOEN and move the registration of
      shared irq to a point after dwc3_omap_extcon_register() and
      of_platform_populate(). This avoids possibility of probe deferring and
      above said race condition.
      Reviewed-by: NGrygorii Strashko <grygorii.strashko@ti.com>
      Signed-off-by: NVignesh R <vigneshr@ti.com>
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      ee249b45
    • V
      usb: dwc3: core: Call dwc3_core_get_phy() before initializing phys · 541768b0
      Vignesh R 提交于
      commit f54edb53 ("usb: dwc3: core: initialize ULPI before trying to
      get the PHY") moved call to dwc3_core_get_phy() from dwc3_probe() to
      dwc3_core_init() after dwc3_core_soft_reset(). But
      dwc3_core_soft_reset() calls phy_init(), therefore dwc3_core_get_phy()
      needs to be called before dwc3_core_soft_reset().
      
      Fix this by moving call to dwc3_core_get_phy() before
      dwc3_core_soft_reset().
      
      This fixes the following abort seen on DRA7xx platforms
      [   24.769118] usb usb2: SerialNumber: xhci-hcd.1.auto
      [   24.781144] hub 2-0:1.0: USB hub found
      [   24.787836] hub 2-0:1.0: 1 port detected
      [   24.809939] Unhandled fault: imprecise external abort (0x1406) at 0x00000000
      Reported-by: NCarlos Hernandez <ceh@ti.com>
      Signed-off-by: NVignesh R <vigneshr@ti.com>
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      541768b0
  10. 28 6月, 2017 1 次提交
  11. 15 6月, 2017 1 次提交
  12. 13 6月, 2017 6 次提交
  13. 07 6月, 2017 1 次提交
  14. 02 6月, 2017 7 次提交
    • F
      usb: dwc3: trace: decode ctrl request · af32423a
      Felipe Balbi 提交于
      Instead of *always* dumping raw ctrl bytes, let's decode standard
      requests which will make the lives of those debugging DWC3 quite a bit
      easier.
      
      Output will now look like so:
      
      irq/34-dwc3-1594  [000] d..1   107.573081: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18)
      irq/34-dwc3-1594  [000] d..1   107.573694: dwc3_ctrl_req: Set Address(Addr = 01)
      irq/34-dwc3-1594  [000] d..1   107.588319: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18)
      irq/34-dwc3-1594  [000] d..1   107.588816: dwc3_ctrl_req: Get Configuration Descriptor(Index = 0, Length = 9)
      irq/34-dwc3-1594  [000] d..1   107.589191: dwc3_ctrl_req: Set Configuration(Config = 3)
      irq/34-dwc3-1594  [000] d..1   107.589846: dwc3_ctrl_req: Get BOS Descriptor(Index = 0, Length = 5)
      irq/34-dwc3-1594  [000] d..1   107.590146: dwc3_ctrl_req: Get BOS Descriptor(Index = 0, Length = 22)
      irq/34-dwc3-1594  [000] d..1   107.590546: dwc3_ctrl_req: Get Configuration Descriptor(Index = 0, Length = 9)
      irq/34-dwc3-1594  [000] d..1   107.590840: dwc3_ctrl_req: Get Configuration Descriptor(Index = 0, Length = 69)
      irq/34-dwc3-1594  [000] d..1   107.591138: dwc3_ctrl_req: Get Configuration Descriptor(Index = 1, Length = 9)
      irq/34-dwc3-1594  [000] d..1   107.591541: dwc3_ctrl_req: Get Configuration Descriptor(Index = 1, Length = 32)
      irq/34-dwc3-1594  [000] d..1   107.591834: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18)
      irq/34-dwc3-1594  [000] d..1   114.701005: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18)
      irq/34-dwc3-1594  [000] d..1   114.721080: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18)
      irq/34-dwc3-1594  [000] d..1   114.722709: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18)
      irq/34-dwc3-1594  [000] d..1   114.728979: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18)
      irq/34-dwc3-1594  [000] d..1   114.730544: dwc3_ctrl_req: Get Device Qualifier Descriptor(Index = 0, Length = 10)
      irq/34-dwc3-1594  [000] d..1   115.776018: dwc3_ctrl_req: Get Configuration Descriptor(Index = 0, Length = 9)
      irq/34-dwc3-1594  [000] d..1   115.776760: dwc3_ctrl_req: Set Configuration(Config = 0)
      irq/34-dwc3-1594  [000] d..1   115.777676: dwc3_ctrl_req: Get Configuration(Length = 1)
      irq/34-dwc3-1594  [000] d..1   115.924797: dwc3_ctrl_req: Get Device Descriptor(Index = 0, Length = 18)
      irq/34-dwc3-1594  [000] d..1   115.929025: dwc3_ctrl_req: Get String Descriptor(Index = 0, Length = 500)
      irq/34-dwc3-1594  [000] d..1   115.929566: dwc3_ctrl_req: Get String Descriptor(Index = 1, Length = 500)
      irq/34-dwc3-1594  [000] d..1   115.930911: dwc3_ctrl_req: Get String Descriptor(Index = 0, Length = 500)
      irq/34-dwc3-1594  [000] d..1   115.931528: dwc3_ctrl_req: Get String Descriptor(Index = 2, Length = 500)
      irq/34-dwc3-1594  [000] d..1   115.932950: dwc3_ctrl_req: Get String Descriptor(Index = 0, Length = 500)
      irq/34-dwc3-1594  [000] d..1   115.933533: dwc3_ctrl_req: Get String Descriptor(Index = 3, Length = 500)
      
      Note that Class and Vendor requests won't be decoded for obvious
      reasons. Those will be printed as a raw sequence of bytes.
      
      This patch has been tested against a normal host (both Linux and
      Windows) and USB30CV Chapter 9 tests.
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      af32423a
    • F
      usb: dwc3: debug: remove static char buffer from dwc3_decode_event() · 3587f36a
      Felipe Balbi 提交于
      Instead, we can require caller to pass a buffer for the function to
      use. This cleans things quite a bit.
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      3587f36a
    • F
      usb: dwc3: trace: rely on __string() and __assign_str() · e42f09b8
      Felipe Balbi 提交于
      Instead of going for a 512 byte buffer and using snprintf(), let's
      rely on helps __string() and __assign_str() where possible.
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      e42f09b8
    • F
      usb: dwc3: gadget: slight cleanup to dwc3_process_event_entry() · dfc5e805
      Felipe Balbi 提交于
      No functional changes, just a slight readability improvement.
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      dfc5e805
    • F
      usb: dwc3: debugfs: slightly improve output of trb_ring · 436841d5
      Felipe Balbi 提交于
      Instead of printing out enqueue and dequeue pointer value as a header
      to the output, let's mark the TRBs in question with 'E' and 'D'. The
      output looks slightly easier to read.
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      436841d5
    • F
      usb: dwc3: update documentation · bfad65ee
      Felipe Balbi 提交于
      No functional changes, just making sure we can use these for ReST docs
      later.
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      bfad65ee
    • F
      usb: dwc3: replace %p with %pK · 04fb365c
      Felipe Balbi 提交于
      %p will leak kernel pointers, so let's not expose the information on
      dmesg and instead use %pK. %pK will only show the actual addresses if
      explicitly enabled under /proc/sys/kernel/kptr_restrict.
      
      Cc: <stable@vger.kernel.org>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
      04fb365c
  15. 17 5月, 2017 3 次提交