Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751323Ab2J0KU6 (ORCPT ); Sat, 27 Oct 2012 06:20:58 -0400 Received: from mail-vb0-f46.google.com ([209.85.212.46]:59452 "EHLO mail-vb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750792Ab2J0KU4 (ORCPT ); Sat, 27 Oct 2012 06:20:56 -0400 MIME-Version: 1.0 In-Reply-To: <1351226723.7077.14.camel@vkoul-udesk3> References: <1349432276-22919-1-git-send-email-inderpal.singh@linaro.org> <1349432276-22919-4-git-send-email-inderpal.singh@linaro.org> <1351052091.5263.19.camel@vkoul-udesk3> <1351226723.7077.14.camel@vkoul-udesk3> Date: Sat, 27 Oct 2012 15:50:55 +0530 Message-ID: Subject: Re: [PATCH v2 3/4] DMA: PL330: Balance module remove function with probe From: Inderpal Singh To: Vinod Koul Cc: vinod.koul@intel.com, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, jassisinghbrar@gmail.com, boojin.kim@samsung.com, patches@linaro.org, kgene.kim@samsung.com Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2095 Lines: 60 Hi Vinod, On 26 October 2012 10:15, Vinod Koul wrote: > On Thu, 2012-10-25 at 16:53 +0530, Inderpal Singh wrote: >> >> This code will get executed only in case of force removal of the >> module which was discussed in the first version of the patch at [1]. >> Now, if we do not have to think about force removal then this patch >> will go back to the first version. > But why are you doing force removal of driver even when client is > holding a reference to you. > > What happens when client finally tries to free the channel? Since we return EBUSY so forced removal won't succeed. Client can free the channel eventually. > > What is the problem you are trying to solve? >> There was a long discussion about it in the first version of the patch. Allow me to explain it to you. The existing driver does DMA_TERMINATE_ALL and frees resources for all the channels in the _remove function. The first version of patch removed this flushing and freeing of channel resources because they are not getting allocated in the probe. Jassi pointed out that manual flushing is needed if a force removal happens and some client is queued. Then it was agreed that flushing is not needed, instead we should return EBUSY if client is queued on some channel (this will happen only in force removal case). Hence this additional check in v2 version so that force removal does not succeeds if any client is queued. If you think force removal is not a practical scenario and we should not be bothering about it, this check can be removed and the patch will go back to first version which just removes flushing and freeing of channels beacues they are not getting allocated in probe. Let me know your view. Regards, Inder >> Let me know your view. >> >> [1] https://patchwork.kernel.org/patch/1503171/ >> > > > -- > Vinod Koul > Intel Corp. > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/