From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758839AbcHDQPv (ORCPT ); Thu, 4 Aug 2016 12:15:51 -0400 Received: from www381.your-server.de ([78.46.137.84]:38595 "EHLO www381.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758815AbcHDQPu (ORCPT ); Thu, 4 Aug 2016 12:15:50 -0400 Subject: Re: [PATCH] dmaengine: qcom_hidma: release the descriptor before the callback To: Sinan Kaya , Russell King - ARM Linux References: <1468465076-27324-1-git-send-email-okaya@codeaurora.org> <20160724062425.GW9681@localhost> <971733d9-fd18-2a1b-07c0-349b47747d49@codeaurora.org> <20160804125525.GF9681@localhost> <71a15611-645f-7523-1c26-14b420aff667@codeaurora.org> <20160804144003.GV1041@n2100.armlinux.org.uk> <20160804153835.GY1041@n2100.armlinux.org.uk> <32e4f4c5-81d1-4a84-69af-e1b05d564bd7@codeaurora.org> Cc: Vinod Koul , linux-arm-msm@vger.kernel.org, timur@codeaurora.org, linux-kernel@vger.kernel.org, Christopher Covington , dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org From: Lars-Peter Clausen Message-ID: <39afe8fb-4356-b6a3-9e17-5b60abf10040@metafoo.de> Date: Thu, 4 Aug 2016 18:15:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.1.0 MIME-Version: 1.0 In-Reply-To: <32e4f4c5-81d1-4a84-69af-e1b05d564bd7@codeaurora.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Authenticated-Sender: lars@metafoo.de Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/04/2016 06:08 PM, Sinan Kaya wrote: [...] > The other way is I can feed this information to what Dave just introduced > as part of the callback mechanism and not touch this. Use the callback mechanism. It is a lot easier to implement correctly than the tx_status() mechanism. > The main discussion here is that > > "tx_status does not indicate whether the final transaction is successful or > not" whether the driver has the capability to determine error or not. tx_status() is supposed to be able to indicate whether a transfer failed or not. But in my opinion this feature is broken by design and implementing it correctly is very difficult without creating memory leaks. Which is probably why so few drivers actually implement it.