31 Mar, 2011

1 commit


18 Jan, 2011

1 commit

  • * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx: (63 commits)
    ARM: PL08x: cleanup comments
    Update CONFIG_MD_RAID6_PQ to CONFIG_RAID6_PQ in drivers/dma/iop-adma.c
    ARM: PL08x: fix a warning
    Fix dmaengine_submit() return type
    dmaengine: at_hdmac: fix race while monitoring channel status
    dmaengine: at_hdmac: flags located in first descriptor
    dmaengine: at_hdmac: use subsys_initcall instead of module_init
    dmaengine: at_hdmac: no need set ACK in new descriptor
    dmaengine: at_hdmac: trivial add precision to unmapping comment
    dmaengine: at_hdmac: use dma_address to program DMA hardware
    pch_dma: support new device ML7213 IOH
    ARM: PL08x: prevent dma_set_runtime_config() reconfiguring memcpy channels
    ARM: PL08x: allow dma_set_runtime_config() to return errors
    ARM: PL08x: fix locking between prepare function and submit function
    ARM: PL08x: introduce 'phychan_hold' to hold on to physical channels
    ARM: PL08x: put txd's on the pending list in pl08x_tx_submit()
    ARM: PL08x: rename 'desc_list' as 'pend_list'
    ARM: PL08x: implement unmapping of memcpy buffers
    ARM: PL08x: store prep_* flags in async_tx structure
    ARM: PL08x: shrink srcbus/dstbus in txd structure
    ...

    Linus Torvalds
     

15 Jan, 2011

1 commit


03 Jan, 2011

1 commit


08 Oct, 2010

4 commits

  • The majority of drivers in drivers/dma/ will never establish cross
    channel operation chains and do not need the extra overhead in struct
    dma_async_tx_descriptor. Make channel switching opt-in by default.

    Cc: Anatolij Gustschin
    Cc: Ira Snyder
    Cc: Linus Walleij
    Cc: Saeed Bishara
    Signed-off-by: Dan Williams

    Dan Williams
     
  • Dan Williams
     
  • Now that the generic DMAEngine API has support for scatterlist to
    scatterlist copying, the device_prep_slave_sg() portion of the
    DMA_SLAVE API is no longer necessary and has been removed.

    However, the device_control() portion of the DMA_SLAVE API is still
    useful to control device specific parameters, such as externally
    controlled DMA transfers and maximum burst length.

    A special dma_ctrl_cmd has been added to enable externally controlled
    DMA transfers. This is currently specific to the Freescale DMA
    controller, but can easily be made generic when another user is found.

    Signed-off-by: Ira W. Snyder
    Signed-off-by: Dan Williams

    Ira Snyder
     
  • This adds support for scatterlist to scatterlist DMA transfers. A
    similar interface is exposed by the fsldma driver (through the DMA_SLAVE
    API) and by the ste_dma40 driver (through an exported function).

    This patch paves the way for making this type of copy operation a part
    of the generic DMAEngine API. Futher patches will add support in
    individual drivers.

    Signed-off-by: Ira W. Snyder
    Signed-off-by: Dan Williams

    Ira Snyder
     

06 Oct, 2010

2 commits

  • Add wrapper functions around the dma_device->device_control function
    to bring back type safety. Also, add a wrapper function around
    dma_async_tx_descriptor->tx_submit. This is named dmaengine_submit
    instead of dmaengine_tx_submit to get rid of the confusing 'tx' in the
    function name

    Signed-off-by: Sascha Hauer
    Signed-off-by: Dan Williams

    Sascha Hauer
     
  • Cyclic transfers are useful for audio where a single buffer divided
    in periods has to be transfered endlessly until stopped. After being
    prepared the transfer is started using the dma_async_descriptor->tx_submit
    function. dma_async_descriptor->callback is called after each period.
    The transfer is stopped using the DMA_TERMINATE_ALL callback.
    While being used for cyclic transfers the channel cannot be used
    for other transfer types.

    Signed-off-by: Sascha Hauer
    Cc: Haavard Skinnemoen
    Signed-off-by: Dan Williams

    Sascha Hauer
     

23 Sep, 2010

1 commit


05 Aug, 2010

1 commit

  • This adds an interface to the DMAengine to make it possible to
    reconfigure a slave channel at runtime. We add a few foreseen
    config parameters to the passed struct, with a void * pointer
    for custom per-device or per-platform runtime slave data.

    Signed-off-by: Linus Walleij
    Signed-off-by: Dan Williams

    Linus Walleij
     

18 May, 2010

3 commits


27 Mar, 2010

3 commits

  • Simple conditional struct filler to cut out some duplicated code.

    Signed-off-by: Dan Williams

    Dan Williams
     
  • Convert the device_is_tx_complete() operation on the
    DMA engine to a generic device_tx_status()operation which
    can return three states, DMA_TX_RUNNING, DMA_TX_COMPLETE,
    DMA_TX_PAUSED.

    [dan.j.williams@intel.com: update for timberdale]
    Signed-off-by: Linus Walleij
    Acked-by: Mark Brown
    Cc: Maciej Sosnowski
    Cc: Nicolas Ferre
    Cc: Pavel Machek
    Cc: Li Yang
    Cc: Guennadi Liakhovetski
    Cc: Paul Mundt
    Cc: Ralf Baechle
    Cc: Haavard Skinnemoen
    Cc: Magnus Damm
    Cc: Liam Girdwood
    Cc: Joe Perches
    Cc: Roland Dreier
    Signed-off-by: Dan Williams

    Linus Walleij
     
  • Convert the device_terminate_all() operation on the
    DMA engine to a generic device_control() operation
    which can now optionally support also pausing and
    resuming DMA on a certain channel. Implemented for the
    COH 901 318 DMAC as an example.

    [dan.j.williams@intel.com: update for timberdale]
    Signed-off-by: Linus Walleij
    Acked-by: Mark Brown
    Cc: Maciej Sosnowski
    Cc: Nicolas Ferre
    Cc: Pavel Machek
    Cc: Li Yang
    Cc: Guennadi Liakhovetski
    Cc: Paul Mundt
    Cc: Ralf Baechle
    Cc: Haavard Skinnemoen
    Cc: Magnus Damm
    Cc: Liam Girdwood
    Cc: Joe Perches
    Cc: Roland Dreier
    Signed-off-by: Dan Williams

    Linus Walleij
     

05 Mar, 2010

1 commit

  • * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx: (28 commits)
    ioat: cleanup ->timer_fn() and ->cleanup_fn() prototypes
    ioat3: interrupt coalescing
    ioat: close potential BUG_ON race in the descriptor cleanup path
    ioat2: kill pending flag
    ioat3: use ioat2_quiesce()
    ioat3: cleanup, don't enable DCA completion writes
    DMAENGINE: COH 901 318 lli sg offset fix
    DMAENGINE: COH 901 318 configure channel direction
    DMAENGINE: COH 901 318 remove irq counting
    DMAENGINE: COH 901 318 descriptor pool refactoring
    DMAENGINE: COH 901 318 cleanups
    dma: Add MPC512x DMA driver
    Debugging options for the DMA engine subsystem
    iop-adma: redundant/wrong tests in iop_*_count()?
    dmatest: fix handling of an even number of xor_sources
    dmatest: correct raid6 PQ test
    fsldma: Fix cookie issues
    fsldma: Fix cookie issues
    dma: cases IPU_PIX_FMT_BGRA32, BGR32 and ABGR32 are the same in ipu_ch_param_set_size()
    dma: make Open Firmware device id constant
    ...

    Linus Torvalds
     

01 Mar, 2010

1 commit

  • fsl_dma_update_completed_cookie() appears to calculate the last completed
    cookie incorrectly in the corner case where DMA on cookie 1 is in progress
    just following a cookie wrap.

    Signed-off-by: Steven J. Magnani
    Acked-by: Ira W. Snyder
    [dan.j.williams@intel.com: fix an integer overflow warning with INT_MAX]
    Signed-off-by: Dan Williams

    Steven J. Magnani
     

17 Feb, 2010

1 commit

  • Add __percpu sparse annotations to places which didn't make it in one
    of the previous patches. All converions are trivial.

    These annotations are to make sparse consider percpu variables to be
    in a different address space and warn if accessed without going
    through percpu accessors. This patch doesn't affect normal builds.

    Signed-off-by: Tejun Heo
    Acked-by: Borislav Petkov
    Cc: Dan Williams
    Cc: Huang Ying
    Cc: Len Brown
    Cc: Neil Brown

    Tejun Heo
     

11 Dec, 2009

1 commit


09 Sep, 2009

7 commits

  • Conflicts:
    crypto/async_tx/async_xor.c
    drivers/dma/ioat/dma_v2.h
    drivers/dma/ioat/pci.c
    drivers/md/raid5.c

    Dan Williams
     
  • The tx_list attribute of struct dma_async_tx_descriptor is common to
    most, but not all dma driver implementations. None of the upper level
    code (dmaengine/async_tx) uses it, so allow drivers to implement it
    locally if they need it. This saves sizeof(struct list_head) bytes for
    drivers that do not manage descriptors with a linked list (e.g.: ioatdma
    v2,3).

    Signed-off-by: Dan Williams

    Dan Williams
     
  • Some engines have transfer size and address alignment restrictions. Add
    a per-operation alignment property to struct dma_device that the async
    routines and dmatest can use to check alignment capabilities.

    Signed-off-by: Dan Williams

    Dan Williams
     
  • No drivers currently implement these operation types, so they can be
    deleted.

    Signed-off-by: Dan Williams

    Dan Williams
     
  • Channel switching is problematic for some dmaengine drivers as the
    architecture precludes separating the ->prep from ->submit. In these
    cases the driver can select ASYNC_TX_DISABLE_CHANNEL_SWITCH to modify
    the async_tx allocator to only return channels that support all of the
    required asynchronous operations.

    For example MD_RAID456=y selects support for asynchronous xor, xor
    validate, pq, pq validate, and memcpy. When
    ASYNC_TX_DISABLE_CHANNEL_SWITCH=y any channel with all these
    capabilities is marked DMA_ASYNC_TX allowing async_tx_find_channel() to
    quickly locate compatible channels with the guarantee that dependency
    chains will remain on one channel. When
    ASYNC_TX_DISABLE_CHANNEL_SWITCH=n async_tx_find_channel() may select
    channels that lead to operation chains that need to cross channel
    boundaries using the async_tx channel switch capability.

    Signed-off-by: Dan Williams

    Dan Williams
     
  • Some engines optimize operation by reading ahead in the descriptor chain
    such that descriptor2 may start execution before descriptor1 completes.
    If descriptor2 depends on the result from descriptor1 then a fence is
    required (on descriptor2) to disable this optimization. The async_tx
    api could implicitly identify dependencies via the 'depend_tx'
    parameter, but that would constrain cases where the dependency chain
    only specifies a completion order rather than a data dependency. So,
    provide an ASYNC_TX_FENCE to explicitly identify data dependencies.

    Signed-off-by: Dan Williams

    Dan Williams
     
  • Conflicts:
    include/linux/dmaengine.h

    Dan Williams
     

30 Aug, 2009

2 commits

  • [ Based on an original patch by Yuri Tikhonov ]

    This adds support for doing asynchronous GF multiplication by adding
    two additional functions to the async_tx API:

    async_gen_syndrome() does simultaneous XOR and Galois field
    multiplication of sources.

    async_syndrome_val() validates the given source buffers against known P
    and Q values.

    When a request is made to run async_pq against more than the hardware
    maximum number of supported sources we need to reuse the previous
    generated P and Q values as sources into the next operation. Care must
    be taken to remove Q from P' and P from Q'. For example to perform a 5
    source pq op with hardware that only supports 4 sources at a time the
    following approach is taken:

    p, q = PQ(src0, src1, src2, src3, COEF({01}, {02}, {04}, {08}))
    p', q' = PQ(p, q, q, src4, COEF({00}, {01}, {00}, {10}))

    p' = p + q + q + src4 = p + src4
    q' = {00}*p + {01}*q + {00}*q + {10}*src4 = q + {10}*src4

    Note: 4 is the minimum acceptable maxpq otherwise we punt to
    synchronous-software path.

    The DMA_PREP_CONTINUE flag indicates to the driver to reuse p and q as
    sources (in the above manner) and fill the remaining slots up to maxpq
    with the new sources/coefficients.

    Note1: Some devices have native support for P+Q continuation and can skip
    this extra work. Devices with this capability can advertise it with
    dma_set_maxpq. It is up to each driver how to handle the
    DMA_PREP_CONTINUE flag.

    Note2: The api supports disabling the generation of P when generating Q,
    this is ignored by the synchronous path but is implemented by some dma
    devices to save unnecessary writes. In this case the continuation
    algorithm is simplified to only reuse Q as a source.

    Cc: H. Peter Anvin
    Cc: David Woodhouse
    Signed-off-by: Yuri Tikhonov
    Signed-off-by: Ilya Yanok
    Reviewed-by: Andre Noll
    Acked-by: Maciej Sosnowski
    Signed-off-by: Dan Williams

    Dan Williams
     
  • Replace the flat zero_sum_result with a collection of flags to contain
    the P (xor) zero-sum result, and the soon to be utilized Q (raid6 reed
    solomon syndrome) zero-sum result. Use the SUM_CHECK_ namespace instead
    of DMA_ since these flags will be used on non-dma-zero-sum enabled
    platforms.

    Reviewed-by: Andre Noll
    Acked-by: Maciej Sosnowski
    Signed-off-by: Dan Williams

    Dan Williams
     

13 May, 2009

1 commit

  • as reported by Alexander Beregalov

    ioatdma 0000:00:08.0: DMA-API: device driver frees DMA memory with
    wrong function [device address=0x000000007f76f800] [size=2000 bytes]
    [map
    ped as single] [unmapped as page]

    The ioatdma driver was unmapping all regions
    (either allocated as page or single) using unmap_page.
    This patch lets dma driver recognize if unmap_single or unmap_page should be used.
    It introduces two new dma control flags:
    DMA_COMPL_SRC_UNMAP_SINGLE and DMA_COMPL_DEST_UNMAP_SINGLE.
    They should be set to indicate dma driver to do dma-unmapping as single
    (first one for the source, tha latter for the destination).
    If respective flag is not set, the driver assumes dma-unmapping as page.

    Signed-off-by: Maciej Sosnowski
    Reported-by: Alexander Beregalov
    Tested-by: Alexander Beregalov
    Signed-off-by: Dan Williams

    Maciej Sosnowski
     

09 Apr, 2009

1 commit

  • 'zero_sum' does not properly describe the operation of generating parity
    and checking that it validates against an existing buffer. Change the
    name of the operation to 'val' (for 'validate'). This is in
    anticipation of the p+q case where it is a requirement to identify the
    target parity buffers separately from the source buffers, because the
    target parity buffers will not have corresponding pq coefficients.

    Reviewed-by: Andre Noll
    Acked-by: Maciej Sosnowski
    Signed-off-by: Dan Williams

    Dan Williams
     

27 Mar, 2009

1 commit

  • Currently dma_request_channel() set DMA_PRIVATE capability but never
    clear it. So if a public channel was once grabbed by
    dma_request_channel(), the device stay PRIVATE forever. Add
    privatecnt member to dma_device to correctly revert it.

    [lg@denx.de: fix bad usage of 'chan' in dma_async_device_register]
    Signed-off-by: Atsushi Nemoto
    Acked-by: Maciej Sosnowski
    Signed-off-by: Dan Williams

    Atsushi Nemoto
     

26 Mar, 2009

2 commits


09 Mar, 2009

1 commit

  • * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx:
    dmatest: fix use after free in dmatest_exit
    ipu_idmac: fix spinlock type
    iop-adma, mv_xor: fix mem leak on self-test setup failure
    fsldma: fix off by one in dma_halt
    I/OAT: fail self-test if callback test reaches timeout
    I/OAT: update driver version and copyright dates
    I/OAT: list usage cleanup
    I/OAT: set tcp_dma_copybreak to 256k for I/OAT ver.3
    I/OAT: cancel watchdog before dma remove
    I/OAT: fail initialization on zero channels detection
    I/OAT: do not set DCACTRL_CMPL_WRITE_ENABLE for I/OAT ver.3
    I/OAT: add verification for proper APICID_TAG_MAP setting by BIOS
    dmaengine: update kerneldoc

    Linus Torvalds
     

19 Feb, 2009

1 commit

  • The conversion of atmel-mci to dma_request_channel missed the
    initialization of the channel dma_slave information. The filter_fn passed
    to dma_request_channel is responsible for initializing the channel's
    private data. This implementation has the additional benefit of enabling
    a generic client-channel data passing mechanism.

    Reviewed-by: Atsushi Nemoto
    Signed-off-by: Dan Williams
    Acked-by: Haavard Skinnemoen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dan Williams
     

12 Feb, 2009

1 commit

  • Some of the kerneldoc comments in the dmaengine header describe
    already removed structure members. Remove them.

    Also add a short description for dma_device->device_is_tx_complete.

    Signed-off-by: Johannes Weiner
    Signed-off-by: Dan Williams

    Johannes Weiner
     

07 Feb, 2009

1 commit

  • Based upon a patch from Atsushi Nemoto

    --------------------
    The commit 649274d993212e7c23c0cb734572c2311c200872 ("net_dma:
    acquire/release dma channels on ifup/ifdown") added unconditional call
    of dmaengine_get() to net_dma. The API should be called only if
    NET_DMA was enabled.
    --------------------

    Signed-off-by: David S. Miller
    Acked-by: Dan Williams

    David S. Miller