From patchwork Tue Jun 28 23:15:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Jiang X-Patchwork-Id: 9204097 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AE07F60757 for ; Tue, 28 Jun 2016 23:15:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9F54F28628 for ; Tue, 28 Jun 2016 23:15:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9424F2862C; Tue, 28 Jun 2016 23:15:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 04EE32862A for ; Tue, 28 Jun 2016 23:15:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752482AbcF1XPf (ORCPT ); Tue, 28 Jun 2016 19:15:35 -0400 Received: from mga04.intel.com ([192.55.52.120]:20018 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752510AbcF1XPb (ORCPT ); Tue, 28 Jun 2016 19:15:31 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP; 28 Jun 2016 16:15:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,543,1459839600"; d="scan'208";a="1011586885" Received: from djiang5-desk3.ch.intel.com ([143.182.137.38]) by fmsmga002.fm.intel.com with ESMTP; 28 Jun 2016 16:15:30 -0700 Subject: [PATCH v3 1/5] dmaengine: Adding error handling flag From: Dave Jiang To: vinod.koul@intel.com, allen.hubbe@emc.com, jdmason@kudzu.us Cc: dmaengine@vger.kernel.org, linux-ntb@googlegroups.com, dan.j.williams@intel.com Date: Tue, 28 Jun 2016 16:15:11 -0700 Message-ID: <146715571138.208762.7964180099092112652.stgit@djiang5-desk3.ch.intel.com> In-Reply-To: <146715558744.208762.15608813894802261982.stgit@djiang5-desk3.ch.intel.com> References: <146715558744.208762.15608813894802261982.stgit@djiang5-desk3.ch.intel.com> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 0 files changed -- To unsubscribe from this list: send the line "unsubscribe dmaengine" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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;