1. 22 12月, 2014 24 次提交
  2. 09 12月, 2014 5 次提交
    • M
      dmaenegine: Delete a check before free_percpu() · a9507ca3
      Markus Elfring 提交于
      The free_percpu() function tests whether its argument is NULL and then
      returns immediately. Thus the test around the call is not needed.
      
      This issue was detected by using the Coccinelle software.
      Signed-off-by: NMarkus Elfring <elfring@users.sourceforge.net>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      a9507ca3
    • P
      dmaengine: ioatdma: fix dma mapping errors · 4ff2fd83
      Prarit Bhargava 提交于
      Several systems are showing the following stack trace:
      
      WARNING: CPU: 0 PID: 2352 at lib/dma-debug.c:1140 check_unmap+0x4ee/0x9e0()
      ioatdma 0000:00:04.0: DMA-API: device driver failed to check map error[device address=0x0000000465bad000] [size=4096 bytes] [mapped as page]
      Modules linked in: ioatdma(E+) nfsv3 rpcsec_gss_krb5 nfsv4 dns_resolver nfs fscache cfg80211 rfkill x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm crct10dif_pclmul crc32_pclmul crc32c_intel cdc_ether ses ghash_clmulni_intel usbnet mii enclosure aesni_intel lrw gf128mul glue_helper iTCO_wdt shpchp ablk_helper iTCO_vendor_support cryptd pcspkr ipmi_devintf sb_edac lpc_ich edac_core mfd_core ipmi_si i2c_i801 wmi ipmi_msghandler nfsd auth_rpcgss nfs_acl lockd sunrpc xfs libcrc32c sd_mod crc_t10dif crct10dif_common mgag200 syscopyarea sysfillrect sysimgblt drm_kms_helper ttm igb drm ptp pps_core dca i2c_algo_bit i2ccore megaraid_sas dm_mirror dm_region_hash dm_log dm_mod [last unloaded: ioatdma]
      CPU: 0 PID: 2352 Comm: insmod Tainted: G            E  3.17.0-rc4+ #14
      Hardware name: HP ProLiant m300 Server Cartridge/, BIOS H02 01/30/2014
       0000000000000009 ffff88007994b7d8 ffffffff816e7225 ffff88007994b820
       ffff88007994b810 ffffffff8107e51d ffff88045fc56c00 ffff88046643ee90
       ffffffff8338ccd0 0000000000000286 ffffffff81956629 ffff88007994b870
      Call Trace:
       [<ffffffff816e7225>] dump_stack+0x4d/0x66
       [<ffffffff8107e51d>] warn_slowpath_common+0x7d/0xa0
       [<ffffffff8107e58c>] warn_slowpath_fmt+0x4c/0x50
       [<ffffffff81381e6e>] check_unmap+0x4ee/0x9e0
       [<ffffffff813823bf>] debug_dma_unmap_page+0x5f/0x70
       [<ffffffffa04546d8>] ioat_xor_val_self_test+0x498/0xcf0 [ioatdma]
       [<ffffffff81204f0a>] ? kfree+0xda/0x2b0
       [<ffffffffa044d510>] ? ioat_dma_setup_interrupts+0x120/0x2d0 [ioatdma]
       [<ffffffffa0454f4e>] ioat3_dma_self_test+0x1e/0x30 [ioatdma]
       [<ffffffffa044f904>] ioat_probe+0xf4/0x110 [ioatdma]
       [<ffffffffa04550f8>] ioat3_dma_probe+0x198/0x3a0 [ioatdma]
       [<ffffffffa044d18e>] ioat_pci_probe+0x11e/0x1b0 [ioatdma]
       [<ffffffff81393a15>] local_pci_probe+0x45/0xa0
       [<ffffffff81394be5>] ? pci_match_device+0xe5/0x110
       [<ffffffff81394d29>] pci_device_probe+0xd9/0x130
       [<ffffffff81462860>] driver_probe_device+0x90/0x3c0
       [<ffffffff81462c63>] __driver_attach+0x93/0xa0
       [<ffffffff81462bd0>] ? __device_attach+0x40/0x40
       [<ffffffff8146080b>] bus_for_each_dev+0x6b/0xb0
       [<ffffffff814622ce>] driver_attach+0x1e/0x20
       [<ffffffff81461ed8>] bus_add_driver+0x188/0x260
       [<ffffffffa0423000>] ? 0xffffffffa0423000
       [<ffffffff81463734>] driver_register+0x64/0xf0
       [<ffffffff813933a0>] __pci_register_driver+0x60/0x70
       [<ffffffffa0423089>] ioat_init_module+0x89/0x1000 [ioatdma]
       [<ffffffff8100212c>] do_one_initcall+0xbc/0x200
       [<ffffffff811e8b22>] ? __vunmap+0xd2/0x120
       [<ffffffff8111e73c>] load_module+0x14ec/0x1b50
       [<ffffffff81119970>] ? store_uevent+0x40/0x40
       [<ffffffff8111ef36>] SyS_finit_module+0x86/0xb0
       [<ffffffff816f1469>] system_call_fastpath+0x16/0x1b
      ---[ end trace 1052ccbbc3db4d08 ]---
      Mapped at:
       [<ffffffff81380be1>] debug_dma_map_page+0x91/0x140
       [<ffffffffa045440e>] ioat_xor_val_self_test+0x1ce/0xcf0 [ioatdma]
       [<ffffffffa0454f4e>] ioat3_dma_self_test+0x1e/0x30 [ioatdma]
       [<ffffffffa044f904>] ioat_probe+0xf4/0x110 [ioatdma]
       [<ffffffffa04550f8>] ioat3_dma_probe+0x198/0x3a0 [ioatdma]
      
      This happens because the current ioatdma DMA test code does not check the return
      value of dma_map_page() calls with dma_mapping_error().  In addition, it was
      noticed that mapping for the variable dest_dma is free'd before the last use.
      
      This patch fixes these errors by initializing the dma_srcs[] array and checking
      the returns with dma_mapping_error().
      Signed-off-by: NPrarit Bhargava <prarit@redhat.com>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      4ff2fd83
    • S
      dma: cppi41: add a delay while setting the TD bit · 754416e1
      Sebastian Andrzej Siewior 提交于
      The manual says that we need to (repeatedly) set the TearDown-bit for
      the endpoint in order to get the active transfer descriptor released.
      Doing this "real" quick over and over again seems to work but it also
      seems that the hardware might not have enough time to breathe. So I
      though, hey lets add a udelay() between between the individual sets
      of the bit.
      This change with the g_zero testcase resulted in a warning about missing
      transfer descriptor (we got the tear-down one). It seems that if the
      hardware has some time it manages to release the transfer-descriptor on
      the completion queue after the teaddown descriptor.
      With this change, I observe that the transfer descriptor is released
      after 20-30 retry loops.
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      754416e1
    • 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
    • J
      dmaengine: fsl-edma: fixup reg offset and hw S/G support in big-endian model · 1e2dbdef
      Jingchang Lu 提交于
      The offset of all 8-/16-bit registers in big-endian eDMA model are
      swapped in a 32-bit size opposite those in the little-endian model.
      
      The hardware Scatter/Gather requires the subsequent TCDs stored in memory
      in little endian independent of the register endian model, the eDMA engine
      will do the swap if need.
      
      This patch also use regular assignment for tcd variables r/w
      instead of with io function previously that may not always be true.
      Signed-off-by: NJingchang Lu <jingchang.lu@freescale.com>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      1e2dbdef
  3. 08 12月, 2014 1 次提交
  4. 06 12月, 2014 4 次提交
  5. 05 12月, 2014 1 次提交
  6. 04 12月, 2014 1 次提交
  7. 28 11月, 2014 1 次提交
  8. 25 11月, 2014 1 次提交
  9. 18 11月, 2014 1 次提交
  10. 17 11月, 2014 1 次提交