1. 09 12月, 2014 1 次提交
    • S
      dma: cppi41: wait longer for the HW to return the descriptor · 6f9d7056
      Sebastian Andrzej Siewior 提交于
      For a "complete" teardown we have to wait until the teardown descriptor
      is returned by the hardware. The g_zero testcase "testusb -a -t 9" triggers
      the following warning quite reliable:
      
      |------------[ cut here ]------------
      |WARNING: CPU: 0 PID: 0 at drivers/dma/cppi41.c:609 cppi41_dma_control+0x198/0x304()
      |[<c003f84c>] (warn_slowpath_null) from [<c02be8d8>]
      |[<c02be8d8>] (cppi41_dma_control) from [<bf08d25c>]
      |[<bf08d25c>] (cppi41_dma_channel_abort [musb_hdrc])
      |[<bf08bc38>] (nuke.constprop.10 [musb_hdrc])
      |[<bf08bd08>] (musb_gadget_disable [musb_hdrc])
      |[<bf252524>] (disable_endpoints [usb_f_ss_lb])
      |[<bf2525d8>] (disable_source_sink [usb_f_ss_lb])
      |[<bf25260c>] (sourcesink_set_alt [usb_f_ss_lb])
      |[<bf23ad24>] (composite_setup [libcomposite])
      |[<bf08a2f4>] (musb_g_ep0_irq [musb_hdrc])
      |[<bf085ec4>] (musb_interrupt [musb_hdrc])
      |[<bf0aeaf4>] (dsps_interrupt [musb_dsps])
      |[<c0080ea8>] (handle_irq_event_percpu)
      |[<c008112c>] (handle_irq_event)
      |[<c008348c>] (handle_level_irq)
      |[<c00807a8>] (generic_handle_irq)
      |[<c000ee80>] (handle_IRQ)
      |[<c00085f0>] (omap3_intc_handle_irq)
      
      and complains about a TD descriptor which is not returned. I've been
      looking at several things and haven't noticed anything unusual that
      might lead to this.
      The manual says "to try again" until the descriptor comes out. I limited
      the amount of retries to 100 retries in order to avoid an infinite number
      of retries and so a busy-loop. Back then testing revealed that the
      number of retries were around 20-30 so 100 seemed a good upper limit.
      This g_zero test reaches without a problem 98 retries and it jumps
      sometimes to 101 on am335x-evm and so the WARN_ON() triggers. Same test
      run on beaglebone black and the retries start at 122 and my max value so
      far was at 128.
      So lets rise the limit to 500.
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      6f9d7056
  2. 06 11月, 2014 1 次提交
  3. 15 10月, 2014 1 次提交
  4. 01 7月, 2014 1 次提交
    • D
      dma: cppi41: handle 0-length packets · 13bbfb5c
      Daniel Mack 提交于
      When a 0-length packet is received on the bus, desc->pd0 yields 1,
      which confuses the driver's users. This information is clearly wrong
      and not in accordance to the datasheet, but it's been observed on an
      AM335x board, very reproducible.
      
      Fix this by looking at bit 19 in PD2 of the completed packet. This bit
      will tell us if a zero-length packet was received on a queue. If it's
      set, ignore the value in PD0 and report a total length of 0 instead.
      Signed-off-by: NDaniel Mack <zonque@gmail.com>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      13bbfb5c
  5. 11 3月, 2014 1 次提交
  6. 20 1月, 2014 1 次提交
  7. 12 11月, 2013 4 次提交
  8. 25 10月, 2013 1 次提交
  9. 07 10月, 2013 4 次提交
  10. 29 8月, 2013 1 次提交
  11. 28 8月, 2013 2 次提交
  12. 09 8月, 2013 1 次提交
    • S
      usb: musb dma: add cppi41 dma driver · 9b3452d1
      Sebastian Andrzej Siewior 提交于
      This driver is currently used by musb' cppi41 couter part. I may merge
      both dma engine user of musb at some point but not just yet.
      
      The driver seems to work in RX/TX mode in host mode, tested on mass
      storage. I increaed the size of the TX / RX transfers and waited for the
      core code to cancel a transfers and it seems to recover.
      
      v2..3:
      - use mall transfers on RX side and check data toggle.
      - use rndis mode on tx side so we haveon interrupt for 4096 transfers.
      - remove custom "transferred" hack and use dmaengine_tx_status() to
        compute the total amount of data that has been transferred.
      - cancel transfers and reclaim descriptors
      
      v1..v2:
      - RX path added
      - dma mode 0 & 1 is working
      - device tree nodes re-created.
      
      Cc: Vinod Koul <vinod.koul@intel.com>
      Cc: Dan Williams <djbw@fb.com>
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      9b3452d1