Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5631075rwl; Tue, 11 Apr 2023 08:01:54 -0700 (PDT) X-Google-Smtp-Source: AKy350ZzAv6JDhamIMFyKxHuFBBY5jmu/xIv/jnMZys2TxbNPRCQfQ3yofdsopiS3UsjuN6rp2GF X-Received: by 2002:a17:906:281b:b0:933:130e:e81a with SMTP id r27-20020a170906281b00b00933130ee81amr8913755ejc.32.1681225314306; Tue, 11 Apr 2023 08:01:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681225314; cv=none; d=google.com; s=arc-20160816; b=uWVwMdfWTiCCO22gawfmhpNNFIO8xrYOOscZAH14CE4555qfMmAs8hKHx139SvsVKc +O2Ur+9ip3t7ZMsAeoqmBrUuXVoS7OaKM0+tw6Zyq2hcOlSsZzsiN82n4jQxj07YRTO7 PoSEfn+t57jqaAsSxuvngjDH0dLc7j0UQdGCpTqgIZXZIVwo8ZzYcAXORaH7pcyqp9gp P6rG1Qzcw2hmk2+ylSNmMLxnHlHPosjq9Di7mVPTsZkWWUo/9W935G43+GvAEw9w5xnF iLvCglYPqqz0BczMCoBtQdezo8q0m3jujNPB4RMpnZKFW6nYNPNdwmsb4sfOYlFFIh5b OWOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Dm8CpejUIij9cla3QhL7phcSAumDHJ9/niFYQzyv26E=; b=uuqGVq1JOes4Y2h41P6aIh0r3GuCBsnNGV4CinxN+jxILM17oGS0XE9OsL87NL30KV /dJtTNx0r/7apo1svx6EXiVaCBVpLnuV3QKuSpX9WumbZp/obTuwAfvGyYBF6N/HwoHN OpzaD4ExNO97BePfNSnpHFEpdAfTZrGUYZEt3BSmgvZ4S3VHAxFqFUMKpnwxhDCDuqaS eE8xrtlIAj99gusrqmieWi0lBg+zGWBo+l67NQBOVgDvudSuw3/MPfrLnzvesuAfHfAi pLSN1REf3WKNKAO5OAaG8SFb6xXu6krcYElGE+VGNrUT3365Y6cQc3HFCbV9BcdNMweE JYvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Q+N8xiyM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s19-20020a170906169300b0094a56c588a8si6209426ejd.478.2023.04.11.08.01.28; Tue, 11 Apr 2023 08:01:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Q+N8xiyM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229728AbjDKOtM (ORCPT + 99 others); Tue, 11 Apr 2023 10:49:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229533AbjDKOtK (ORCPT ); Tue, 11 Apr 2023 10:49:10 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDB8C10FE; Tue, 11 Apr 2023 07:49:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681224549; x=1712760549; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=3yxNieAGJxNArsMRMWGq66uwBJ1qECzGtgiS3YVB784=; b=Q+N8xiyMgxNO0zytvNL9F2utknrAPn2hZ2bySANNMUNSnRZYJSRaqqOs w7otMrZt095VnN26PloU28Jo+CgB0BbqxgUcPgvz5J1QQc7oT9yFtKHC3 IJWjUP2TCxoEOcSSe7D4mfVmCT3/XS9hsJFnM6jABPfDPIpcfwx8bV+zk hn5VzEC4Ry+6c+K5MM6cueaR1ttAztDHU47lHGjR7mgl+HtlzdFpza5XV dSDFrvaWF3gahBVghivJrCuyIqZS37IUiS2gX8ddmx4IysVbmbCUnR4oR eGaCuq8Q754UGIoX+lcuR8mhx1mmsH152QjtrmAChnv9WRst0jAP5XZC2 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10677"; a="327737860" X-IronPort-AV: E=Sophos;i="5.98,336,1673942400"; d="scan'208";a="327737860" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Apr 2023 07:49:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10677"; a="799945367" X-IronPort-AV: E=Sophos;i="5.98,336,1673942400"; d="scan'208";a="799945367" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga002.fm.intel.com with ESMTP; 11 Apr 2023 07:49:07 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1pmFIv-00FKS4-2V; Tue, 11 Apr 2023 17:49:05 +0300 Date: Tue, 11 Apr 2023 17:49:05 +0300 From: Andy Shevchenko To: Serge Semin Cc: Joy Chakraborty , Mark Brown , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, manugautam@google.com, rohitner@google.com Subject: Re: [PATCH v5 2/2] spi: dw: Add dma controller capability checks Message-ID: References: <20230330063450.2289058-1-joychakr@google.com> <20230330063450.2289058-3-joychakr@google.com> <20230411143758.2rpaxux6esiln26q@mobilestation> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230411143758.2rpaxux6esiln26q@mobilestation> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 11, 2023 at 05:37:58PM +0300, Serge Semin wrote: > On Tue, Apr 11, 2023 at 03:18:34PM +0300, Andy Shevchenko wrote: > > On Thu, Mar 30, 2023 at 06:34:50AM +0000, Joy Chakraborty wrote: ... > > > + if (!(tx.directions & BIT(DMA_MEM_TO_DEV) && > > > + rx.directions & BIT(DMA_DEV_TO_MEM))) > > > + return -ENXIO; > > > > > What about simplex transfers where we only care about sending or receiving data > > and using dummy data for the other channel? Doesn't this make a regression for > > that types of transfers? (Or, if we don't support such, this should be explained > > in the commit message at least.) > > I don't think the code above is that much relevant for the half-duplex > transfers. The DW APB SSI-DMA driver requires both Tx and Rx channels > being specified thus supporting the Full-duplex transfers at least in > case of the TxRx and Rx-only SPI-transfers (the later case relies on > having the dummy buffers supplied by the SPI-core). Thus the channels > must support the corresponding DMA-directions. > > Indeed the Tx-only DMA-based SPI-transfers implementation in the > driver implies not using the Rx DMA-channel, but even in that case the > Rx-channel still needs to be specified otherwise the DW APB SSI-DMA > setup methods will halt with error returned. So unless there are cases > with dummy Rx DMA-channels (which I very much doubt there is) I don't > see the suggested update causing a regression. Am I missing something? Okay, so since it's not a problem, can we explain this in the commit message then? A summary of the above, perhaps? ... > Do you still think otherwise? Answered above. -- With Best Regards, Andy Shevchenko