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=-6.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no 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 3215DC433FE for ; Mon, 7 Dec 2020 04:44:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E0DBC21734 for ; Mon, 7 Dec 2020 04:44:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728792AbgLGEoT (ORCPT ); Sun, 6 Dec 2020 23:44:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:48352 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726482AbgLGEoT (ORCPT ); Sun, 6 Dec 2020 23:44:19 -0500 Date: Mon, 7 Dec 2020 10:13:34 +0530 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1607316218; bh=qMWn0JbXUrp9SaF1F1XZeFEE50NfhTPxRsyzNxWxLk4=; h=From:To:Cc:Subject:References:In-Reply-To:From; b=GuFnNHRjXlgFURZ9+tIowoiVvL5eT7tpdqInm1mu0CGTCTH3jrtMxnlvno0K/qYh5 U08lebcc8G+fHy1Cooft8+GjB21xPo+KdQOZYNn5M36C1b56DJT6XLrLp32A2DxXlZ FM473Vy0OVcrYWKiDhykpLbgrJTXFtbgaWge8e+GKDAp8bFZ3gBBg5VyRE8cfb6RFU o20jLriO3ha76Nra0tlNhxM+1NaC6jssq90YPur3IBw++x/6ClJ1KWK9x+3xpUhqx3 iMgWO2dU10x3ZYDovI182JCWprt4GHVpZEoE3Wb78dmg8CzwBEMPpuxWH18qfq/iia 9tyTyuJU6q9TQ== From: Vinod Koul To: Pierre-Louis Bossart Cc: Bard Liao , alsa-devel@alsa-project.org, tiwai@suse.de, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, ranjani.sridharan@linux.intel.com, hui.wang@canonical.com, broonie@kernel.org, srinivas.kandagatla@linaro.org, jank@cadence.com, sanyog.r.kale@intel.com, rander.wang@linux.intel.com, bard.liao@intel.com Subject: Re: [PATCH 1/7] soundwire: bus: use sdw_update_no_pm when initializing a device Message-ID: <20201207044334.GA8403@vkoul-mobl> References: <20201202204645.23891-1-yung-chuan.liao@linux.intel.com> <20201202204645.23891-2-yung-chuan.liao@linux.intel.com> <20201205074508.GQ8403@vkoul-mobl> <1db93c2e-3c87-bc5e-ddeb-56424870b897@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1db93c2e-3c87-bc5e-ddeb-56424870b897@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05-12-20, 08:59, Pierre-Louis Bossart wrote: > Thanks for the review Vinod. > > On 12/5/20 1:45 AM, Vinod Koul wrote: > > On 03-12-20, 04:46, Bard Liao wrote: > > > From: Pierre-Louis Bossart > > > > > > When a Slave device is resumed, it may resume the bus and restart the > > > enumeration. During that process, we absolutely don't want to call > > > regular read/write routines which will wait for the resume to > > > complete, otherwise a deadlock occurs. > > > > > > Fixes: 60ee9be25571 ('soundwire: bus: add PM/no-PM versions of read/write functions') > > > > Change looks okay, but not sure why this is a fix for adding no pm > > version? > > when we added the no_pm version, we missed the two cases below where > sdw_update() was used and that creates a deadlock. To me that's a conceptual > bug, we didn't fully use the no_pm versions, hence the Fixes tag. Documentation says: "A Fixes: tag indicates that the patch fixes an issue in a previous commit. It is used to make it easy to determine where a bug originated, which can help review a bug fix. This tag also assists the stable kernel team in determining which stable kernel versions should receive your fix. This is the preferred method for indicating a bug fixed by the patch. See :ref:`describe_changes` for more details." I do not this this helps here as this does not help distros etc I would say this is incremental development which improved a case not done properly earlier, unless you would like this to be backported.. In that case it helps folks... > It's ok to remove the tag if you don't think it's useful/relevant, what > matters is that we agree on the content. -- ~Vinod 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=-4.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 02638C4361B for ; Mon, 7 Dec 2020 04:44:47 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (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 3F18B21734 for ; Mon, 7 Dec 2020 04:44:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3F18B21734 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 0C8241738; Mon, 7 Dec 2020 05:43:53 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0C8241738 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1607316283; bh=qMWn0JbXUrp9SaF1F1XZeFEE50NfhTPxRsyzNxWxLk4=; h=Date:From:To:Subject:References:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=IwVpV4sDaaBd3TH0FK9D0L8vPngV9sCDTiDjOQUbrESn6k8WBW/h6lzSPHKyQTV/E YZfEzMb9qxIMenz8ziFyD4Dp/6htsrhlPL27BrOyWdFW95jpOMSJe4zCNbMijXSrHp oVCE8skDGbnyTwJ76+DV4vOMiYt7gL8iufMtZsuI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 67633F801D8; Mon, 7 Dec 2020 05:43:52 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5FD23F8020D; Mon, 7 Dec 2020 05:43:50 +0100 (CET) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id E72E3F8010A for ; Mon, 7 Dec 2020 05:43:41 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E72E3F8010A Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="GuFnNHRj" Date: Mon, 7 Dec 2020 10:13:34 +0530 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1607316218; bh=qMWn0JbXUrp9SaF1F1XZeFEE50NfhTPxRsyzNxWxLk4=; h=From:To:Cc:Subject:References:In-Reply-To:From; b=GuFnNHRjXlgFURZ9+tIowoiVvL5eT7tpdqInm1mu0CGTCTH3jrtMxnlvno0K/qYh5 U08lebcc8G+fHy1Cooft8+GjB21xPo+KdQOZYNn5M36C1b56DJT6XLrLp32A2DxXlZ FM473Vy0OVcrYWKiDhykpLbgrJTXFtbgaWge8e+GKDAp8bFZ3gBBg5VyRE8cfb6RFU o20jLriO3ha76Nra0tlNhxM+1NaC6jssq90YPur3IBw++x/6ClJ1KWK9x+3xpUhqx3 iMgWO2dU10x3ZYDovI182JCWprt4GHVpZEoE3Wb78dmg8CzwBEMPpuxWH18qfq/iia 9tyTyuJU6q9TQ== From: Vinod Koul To: Pierre-Louis Bossart Subject: Re: [PATCH 1/7] soundwire: bus: use sdw_update_no_pm when initializing a device Message-ID: <20201207044334.GA8403@vkoul-mobl> References: <20201202204645.23891-1-yung-chuan.liao@linux.intel.com> <20201202204645.23891-2-yung-chuan.liao@linux.intel.com> <20201205074508.GQ8403@vkoul-mobl> <1db93c2e-3c87-bc5e-ddeb-56424870b897@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1db93c2e-3c87-bc5e-ddeb-56424870b897@linux.intel.com> Cc: alsa-devel@alsa-project.org, tiwai@suse.de, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, ranjani.sridharan@linux.intel.com, hui.wang@canonical.com, broonie@kernel.org, srinivas.kandagatla@linaro.org, jank@cadence.com, sanyog.r.kale@intel.com, Bard Liao , rander.wang@linux.intel.com, bard.liao@intel.com X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On 05-12-20, 08:59, Pierre-Louis Bossart wrote: > Thanks for the review Vinod. > > On 12/5/20 1:45 AM, Vinod Koul wrote: > > On 03-12-20, 04:46, Bard Liao wrote: > > > From: Pierre-Louis Bossart > > > > > > When a Slave device is resumed, it may resume the bus and restart the > > > enumeration. During that process, we absolutely don't want to call > > > regular read/write routines which will wait for the resume to > > > complete, otherwise a deadlock occurs. > > > > > > Fixes: 60ee9be25571 ('soundwire: bus: add PM/no-PM versions of read/write functions') > > > > Change looks okay, but not sure why this is a fix for adding no pm > > version? > > when we added the no_pm version, we missed the two cases below where > sdw_update() was used and that creates a deadlock. To me that's a conceptual > bug, we didn't fully use the no_pm versions, hence the Fixes tag. Documentation says: "A Fixes: tag indicates that the patch fixes an issue in a previous commit. It is used to make it easy to determine where a bug originated, which can help review a bug fix. This tag also assists the stable kernel team in determining which stable kernel versions should receive your fix. This is the preferred method for indicating a bug fixed by the patch. See :ref:`describe_changes` for more details." I do not this this helps here as this does not help distros etc I would say this is incremental development which improved a case not done properly earlier, unless you would like this to be backported.. In that case it helps folks... > It's ok to remove the tag if you don't think it's useful/relevant, what > matters is that we agree on the content. -- ~Vinod