All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: Dave Jiang <dave.jiang@intel.com>
Cc: allen.hubbe@emc.com, jdmason@kudzu.us, dmaengine@vger.kernel.org,
	linux-ntb@googlegroups.com, dan.j.williams@intel.com
Subject: Re: [PATCH v3 1/5] dmaengine: Adding error handling flag
Date: Fri, 8 Jul 2016 10:59:22 +0530	[thread overview]
Message-ID: <20160708052922.GN12591@localhost> (raw)
In-Reply-To: <146715571138.208762.7964180099092112652.stgit@djiang5-desk3.ch.intel.com>

On Tue, Jun 28, 2016 at 04:15:11PM -0700, Dave Jiang wrote:
> Adding error flag for the call back descriptor to notify upper layer that
> an error has occurred with this particular DMA op.
> 
> Signed-off-by: Dave Jiang <dave.jiang@intel.com>
> ---
>  0 files changed
> 
> diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
> index 0174337..6524881 100644
> --- a/include/linux/dmaengine.h
> +++ b/include/linux/dmaengine.h
> @@ -453,6 +453,20 @@ struct dmaengine_unmap_data {
>  };
>  
>  /**
> + * enum err_result_flags - result of DMA operations
> + * @ERR_DMA_NONE - no errors
> + * @ERR_DMA_READ - DMA read error
> + * @ERR_DMA_WRITE - DMA write error
> + * @ERR_DMA_ABORT - Operation aborted
> + */
> +enum err_result_flags {
> +	ERR_DMA_NONE = 0,
> +	ERR_DMA_READ,
> +	ERR_DMA_WRITE,
> +	ERR_DMA_ABORT,
> +};
> +
> +/**
>   * struct dma_async_tx_descriptor - async transaction descriptor
>   * ---dma generic offload fields---
>   * @cookie: tracking cookie for this transaction, set to -EBUSY if
> @@ -480,6 +494,7 @@ struct dma_async_tx_descriptor {
>  	dma_async_tx_callback callback;
>  	void *callback_param;
>  	struct dmaengine_unmap_data *unmap;
> +	enum err_result_flags result;
>  #ifdef CONFIG_ASYNC_TX_ENABLE_CHANNEL_SWITCH
>  	struct dma_async_tx_descriptor *next;
>  	struct dma_async_tx_descriptor *parent;

Okay this needs more thoughts IMHO. The only issue with this approach is
that it violates one of the base fundamentals of dmaengine descriptor
submission.

Client do not touch or use a descriptor after it has been submitted. Looking
at the results inside descriptor is not right.

Perhaps we can add a query of results in the cookie or add this in
tx_status, am not sure.

FWIW, we definitely need some kind of error reporting

Thanks
-- 
~Vinod

  reply	other threads:[~2016-07-08  5:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-28 23:15 [PATCH v3 0/5] dmaengine: ioatdma: DMA error reporting Dave Jiang
2016-06-28 23:15 ` [PATCH v3 1/5] dmaengine: Adding error handling flag Dave Jiang
2016-07-08  5:29   ` Vinod Koul [this message]
2016-07-08 16:00     ` Jiang, Dave
2016-06-28 23:15 ` [PATCH v3 2/5] dmaengine: ioatdma: Add error handling to ioat driver Dave Jiang
2016-06-28 23:15 ` [PATCH v3 3/5] dmaengine: ioatdma: add error strings to chanerr output Dave Jiang
2016-06-28 23:15 ` [PATCH v3 4/5] ntb: add DMA error handling for TX DMA Dave Jiang
2016-06-28 23:15 ` [PATCH v3 5/5] ntb: add DMA error handling for RX DMA Dave Jiang
2016-06-29 13:24 ` [PATCH v3 0/5] dmaengine: ioatdma: DMA error reporting Allen Hubbe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160708052922.GN12591@localhost \
    --to=vinod.koul@intel.com \
    --cc=allen.hubbe@emc.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=jdmason@kudzu.us \
    --cc=linux-ntb@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.