From patchwork Thu Oct 24 17:00:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 3092941 X-Patchwork-Delegate: vinod.koul@intel.com Return-Path: X-Original-To: patchwork-dmaengine@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 70DD19F2B7 for ; Thu, 24 Oct 2013 17:54:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 53DDD204AF for ; Thu, 24 Oct 2013 17:54:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4A1AF204A2 for ; Thu, 24 Oct 2013 17:54:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755371Ab3JXRyW (ORCPT ); Thu, 24 Oct 2013 13:54:22 -0400 Received: from mga14.intel.com ([143.182.124.37]:52840 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755338Ab3JXRyW (ORCPT ); Thu, 24 Oct 2013 13:54:22 -0400 Received: from azsmga002.ch.intel.com ([10.2.17.35]) by azsmga102.ch.intel.com with ESMTP; 24 Oct 2013 10:54:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.93,535,1378882800"; d="scan'208";a="312299584" Received: from vkoul-udesk3.iind.intel.com (HELO localhost.localdomain) ([10.223.84.41]) by AZSMGA002.ch.intel.com with ESMTP; 24 Oct 2013 10:54:19 -0700 From: Vinod Koul To: dmaengine@vger.kernel.org Cc: Dan Williams , Guennadi Liakhovetski , Vinod Koul Subject: [PATCH] dmaengine: add error callback for reporting transaction errors Date: Thu, 24 Oct 2013 22:30:27 +0530 Message-Id: <1382634027-22243-1-git-send-email-vinod.koul@intel.com> X-Mailer: git-send-email 1.7.0.4 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP for dma controllers which can inform the client that a transaction resulted in an error Signed-off-by: Vinod Koul Acked-by: Guennadi Liakhovetski --- include/linux/dmaengine.h | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 0bc7275..ed48615 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h @@ -425,6 +425,9 @@ typedef void (*dma_async_tx_callback)(void *dma_async_param); * @tx_submit: set the prepared descriptor(s) to be executed by the engine * @callback: routine to call after this operation is complete * @callback_param: general parameter to pass to the callback routine + * @err_callback: routine to call if dmaengine encounter error during this + * operation + * @err_callback_param: general parameter to pass to the err_callback routine * ---async_tx api specific fields--- * @next: at completion submit this descriptor * @parent: pointer to the next level up in the dependency chain @@ -438,6 +441,8 @@ struct dma_async_tx_descriptor { dma_cookie_t (*tx_submit)(struct dma_async_tx_descriptor *tx); dma_async_tx_callback callback; void *callback_param; + dma_async_tx_callback err_callback; + void *err_callback_param; #ifdef CONFIG_ASYNC_TX_ENABLE_CHANNEL_SWITCH struct dma_async_tx_descriptor *next; struct dma_async_tx_descriptor *parent;