[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4505F670.9020605@garzik.org>
Date: Mon, 11 Sep 2006 19:51:12 -0400
From: Jeff Garzik <jeff@...zik.org>
To: Dan Williams <dan.j.williams@...el.com>
CC: neilb@...e.de, linux-raid@...r.kernel.org, akpm@...l.org,
linux-kernel@...r.kernel.org, christopher.leech@...el.com
Subject: Re: [PATCH 12/19] dmaengine: dma_async_memcpy_err for DMA engines
that do not support memcpy
Dan Williams wrote:
> From: Dan Williams <dan.j.williams@...el.com>
>
> Default virtual function that returns an error if the user attempts a
> memcpy operation. An XOR engine is an example of a DMA engine that does
> not support memcpy.
>
> Signed-off-by: Dan Williams <dan.j.williams@...el.com>
> ---
>
> drivers/dma/dmaengine.c | 13 +++++++++++++
> 1 files changed, 13 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
> index fe62237..33ad690 100644
> --- a/drivers/dma/dmaengine.c
> +++ b/drivers/dma/dmaengine.c
> @@ -593,6 +593,18 @@ void dma_async_device_unregister(struct
> }
>
> /**
> + * dma_async_do_memcpy_err - default function for dma devices that
> + * do not support memcpy
> + */
> +dma_cookie_t dma_async_do_memcpy_err(struct dma_chan *chan,
> + union dmaengine_addr dest, unsigned int dest_off,
> + union dmaengine_addr src, unsigned int src_off,
> + size_t len, unsigned long flags)
> +{
> + return -ENXIO;
> +}
Further illustration of how this API growth is going wrong. You should
create an API such that it is impossible for an XOR transform to ever
call non-XOR-transform hooks.
Jeff
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists