From mboxrd@z Thu Jan 1 00:00:00 1970 From: Flavio Suligoi Subject: RE: [PATCH 2/2] spi: pxa2xx: use a module softdep for dw_dmac Date: Wed, 10 Apr 2019 14:05:38 +0000 Message-ID: <6eeaf42f4d3f42c58546c429194213b8@asem.it> References: <1554900696-28858-1-git-send-email-f.suligoi@asem.it> <1554900696-28858-2-git-send-email-f.suligoi@asem.it> <20190410125612.GR6106@sirena.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT Cc: Daniel Mack , Haojian Zhuang , Robert Jarzmik , "linux-arm-kernel@lists.infradead.org" , "linux-spi@vger.kernel.org" , "linux-kernel@vger.kernel.org" To: Mark Brown Return-path: In-Reply-To: <20190410125612.GR6106@sirena.org.uk> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-spi.vger.kernel.org Hi Mark, > On Wed, Apr 10, 2019 at 02:51:36PM +0200, Flavio Suligoi wrote: > > With dw_dmac, sometimes the request of a DMA channel fails because > > the DMA driver is not ready, so an explicit dependency request > > is necessary. > > While this isn't going to hurt anything and might actually help so it's > fine doesn't this also suggest that there's an issue with deferred probe > going on as well? I think that the problem could be related to how the DMA channel is requested. At the moment the function used are: pxa2xx_spi_dma_setup --> dma_request_slave_channel_compat --> --> __dma_request_slave_channel_compat --> dma_request_slave_channel --> --> dma_request_chan Actually the final function "dma_request_chan" return the channel number or "-EPROBE_DEFER" if it's not ready. But this information ("-EPROBE_DEFER") is lost in the penultimate function "dma_request_slave_channel", which return only the chann, if all is ok, or NULL, in case of errors. So the deferral mechanism is not used. Flavio From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CEE7BC10F11 for ; Wed, 10 Apr 2019 14:05:51 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9DA0220818 for ; Wed, 10 Apr 2019 14:05:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="M59aFg38" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9DA0220818 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=asem.it Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PJoNNx2cvWyAMPHDEzkOOnbl4IIP3CjSgdO4xe0LB5c=; b=M59aFg38a/1QLF DCU+Ngvq2+aBupX4zCrDttpsV9uDaFhLkhjtp4i6Mg1+8PGS3mJwBdC/8uV2z+iHbGLgVge+0D1Cw Td1XqX8UjctSmkFbmFsKp5ypwUABDIw+hFNpDl/hGwrfsKWS7ryqkQJz0b2SiRLYYViHthbP8DBd/ 5AUv9eJBzhqavaniPxPi4UV8kn/7W6I+Xf469W6tVgyLNwKEf2CWC56h60hhdHoeAxk2EzpdULb7z cRw20UhodxcxciRemG5B/XsZnJNa7wFLMqyADmHRXzPcu6d0lhrsJ1ALqeZvVJcf/bBZnwtZDqr5S AINSG4vOBe2LsQit0THQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hEDrG-0004YK-3Y; Wed, 10 Apr 2019 14:05:46 +0000 Received: from smtp.asem.it ([151.1.184.197]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hEDrD-0004Xr-3M for linux-arm-kernel@lists.infradead.org; Wed, 10 Apr 2019 14:05:45 +0000 Received: from webmail.asem.it by asem.it (smtp.asem.it) (SecurityGateway 5.5.0) with ESMTP id SG003804831.MSG for ; Wed, 10 Apr 2019 16:05:38 +0200S Received: from ASAS044.asem.intra (172.16.16.44) by ASAS044.asem.intra (172.16.16.44) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Wed, 10 Apr 2019 16:05:38 +0200 Received: from ASAS044.asem.intra ([::1]) by ASAS044.asem.intra ([::1]) with mapi id 15.01.1261.035; Wed, 10 Apr 2019 16:05:38 +0200 From: Flavio Suligoi To: Mark Brown Subject: RE: [PATCH 2/2] spi: pxa2xx: use a module softdep for dw_dmac Thread-Topic: [PATCH 2/2] spi: pxa2xx: use a module softdep for dw_dmac Thread-Index: AQHU75yQbkDNn+rZPkCFgi0S9cPL1qY1OMwAgAAnBxA= Date: Wed, 10 Apr 2019 14:05:38 +0000 Message-ID: <6eeaf42f4d3f42c58546c429194213b8@asem.it> References: <1554900696-28858-1-git-send-email-f.suligoi@asem.it> <1554900696-28858-2-git-send-email-f.suligoi@asem.it> <20190410125612.GR6106@sirena.org.uk> In-Reply-To: <20190410125612.GR6106@sirena.org.uk> Accept-Language: it-IT, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.16.17.208] MIME-Version: 1.0 X-SGHeloLookup-Result: pass smtp.helo=webmail.asem.it (ip=172.16.16.44) X-SGSPF-Result: none (smtp.asem.it) X-SGOP-RefID: str=0001.0A0B0204.5CADF833.004A, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 (_st=1 _vt=0 _iwf=0) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190410_070543_337715_56A68A23 X-CRM114-Status: GOOD ( 10.57 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "linux-kernel@vger.kernel.org" , Haojian Zhuang , "linux-spi@vger.kernel.org" , Daniel Mack , Robert Jarzmik , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Mark, > On Wed, Apr 10, 2019 at 02:51:36PM +0200, Flavio Suligoi wrote: > > With dw_dmac, sometimes the request of a DMA channel fails because > > the DMA driver is not ready, so an explicit dependency request > > is necessary. > > While this isn't going to hurt anything and might actually help so it's > fine doesn't this also suggest that there's an issue with deferred probe > going on as well? I think that the problem could be related to how the DMA channel is requested. At the moment the function used are: pxa2xx_spi_dma_setup --> dma_request_slave_channel_compat --> --> __dma_request_slave_channel_compat --> dma_request_slave_channel --> --> dma_request_chan Actually the final function "dma_request_chan" return the channel number or "-EPROBE_DEFER" if it's not ready. But this information ("-EPROBE_DEFER") is lost in the penultimate function "dma_request_slave_channel", which return only the chann, if all is ok, or NULL, in case of errors. So the deferral mechanism is not used. Flavio _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel