Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp814290rwn; Thu, 15 Sep 2022 06:55:56 -0700 (PDT) X-Google-Smtp-Source: AA6agR5WmUBWwBb/ZKDv+Fl6b6yPxvzYrT2RkJ7xbT/irsBnqZrmXS44rnzoy8t05fHaWIVxulOm X-Received: by 2002:a65:6693:0:b0:434:a2ca:2330 with SMTP id b19-20020a656693000000b00434a2ca2330mr36212788pgw.227.1663250156675; Thu, 15 Sep 2022 06:55:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663250156; cv=none; d=google.com; s=arc-20160816; b=gtf7J5Zw44LtN+e9PkuvRX+S3IASCKCnSWG2PhjM5rWaWlIu19lwQYNdCyWfDbA4XI T0uXOi9bb8y+4QQClrbzmRELZZGV/0y4mDwc/1kvE3AutX8avDrLl/cBQ3AOLu0rNYQY DLDaZo/98M+/+f18cbJ0CaoqgXA32gEIZxcMQoe6jxV+j3TPtQ7MT7uMTMPrBpN1pxz1 4QQAt2Qjj/YRouMkpGv2Xe9M44F0M6knpf1opwkP7QmiyLAdum/rGLvZvcvHaP6IdjYD CYeOxcQWt5q784L1vn2Bpj/w+LFyiPgJ50xRYnfERuFAs2WKk9sjqTEg5dB4PyeVORBS d0hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=7ji12BmlwfDaNXFmQGCcwNDUmC2ROK2970e0N4ZsTp4=; b=DsTWt4Ddj2KMuBToP+LnBoPaARSeXeq00yhtLr5QvbaXSEjeq1ibin/5oJDW7+Liu6 Op14SV725iHtwTPhmMbF4d8dqfBxoXo1njHh1/JMDyseLywH/9Bl+afOOVbTot6TfVsv dSomF+YHsNQJWNMVIXpz1g3puC+/bCqGjTLjs2NnI4WXfRO8xD5B0FxgxiSQdHPSTcWS BpdWeXLe649mrm8V2K5Gy4y3+oQ1JIhEm6lVNrhrJMS337VKVgBkYUnkRs02V11aImNj TdHS7vnE+HPv4BGc2CMI+wEjQpVYZweECnjimka1iVe8O8/lmlkN8kCOz+3GMdyVIJis oQbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="GDMbYg/7"; 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 p22-20020a170902b09600b001786f5de8f2si1983554plr.95.2022.09.15.06.55.44; Thu, 15 Sep 2022 06:55:56 -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="GDMbYg/7"; 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 S229872AbiIONK1 (ORCPT + 99 others); Thu, 15 Sep 2022 09:10:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229852AbiIONKZ (ORCPT ); Thu, 15 Sep 2022 09:10:25 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2E272E9CC; Thu, 15 Sep 2022 06:10:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663247423; x=1694783423; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=HoCpplRGmLa8NMZ/Auv5ElmwuTYU4eLsbnw+GC1f8LU=; b=GDMbYg/7ty3Pnn48jYjN0+yMkqkSwD7PinOogk+POn/HTD8unqr/uy6d GAj26ots8CjQuvk/PXCCy0czqaA5weVyeKQQzp3t5cdsbwLn7gEOL7lZ+ wuH9ZCnmRXodRdP10T2buzXhaFzu7YRnBTlENk708uUVqxAGHuewLlfSM b1sF/sy0NZvwNSCkj0ttnmgk/Zfi4lARn83uWpIidpC2vGsr3vJhCym5/ 50M7OtmkhdycOtaG1DVsxEHjK6Vod0PgaiCVzPjxngUMS9fre3Q724LnU CJvHOVtYyEeIFKaGq1T50QkJIwQ/hOSOejAAN2IU/7KIzCqhIy1dgxtKx A==; X-IronPort-AV: E=McAfee;i="6500,9779,10470"; a="281737598" X-IronPort-AV: E=Sophos;i="5.93,318,1654585200"; d="scan'208";a="281737598" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Sep 2022 06:10:23 -0700 X-IronPort-AV: E=Sophos;i="5.93,318,1654585200"; d="scan'208";a="617269024" Received: from bhomann-mobl.ger.corp.intel.com (HELO [10.252.61.7]) ([10.252.61.7]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Sep 2022 06:10:21 -0700 Message-ID: <3962348a-33b4-5941-4a0b-cb447a513a41@linux.intel.com> Date: Thu, 15 Sep 2022 15:10:18 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.11.0 Subject: Re: [PATCH] soundwire: qcom: update status from device id 1 Content-Language: en-US To: Srinivas Kandagatla , vkoul@kernel.org Cc: yung-chuan.liao@linux.intel.com, sanyog.r.kale@intel.com, linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, quic_srivasam@quicinc.com References: <20220915124215.13703-1-srinivas.kandagatla@linaro.org> From: Pierre-Louis Bossart In-Reply-To: <20220915124215.13703-1-srinivas.kandagatla@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_NONE autolearn=ham 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 9/15/22 14:42, Srinivas Kandagatla wrote: > By default autoenumeration is enabled on QCom SoundWire controller > which means the core should not be dealing with device 0 w.r.t enumeration. > Currently device 0 status is also shared with SoundWire core which confuses > the core sometimes and we endup adding 0:0:0:0 slave device. The change looks fine, but the description of the issue is surprising. Whether autoenumeration is enabled or not is irrelevant, by spec the device0 cannot be in ALERT status and throw in-band interrupts to the host with this mechanism. > Signed-off-by: Srinivas Kandagatla > --- > drivers/soundwire/qcom.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c > index e21a3306bf01..871e4d8b32c7 100644 > --- a/drivers/soundwire/qcom.c > +++ b/drivers/soundwire/qcom.c > @@ -428,7 +428,7 @@ static int qcom_swrm_get_alert_slave_dev_num(struct qcom_swrm_ctrl *ctrl) > > ctrl->reg_read(ctrl, SWRM_MCP_SLV_STATUS, &val); > > - for (dev_num = 0; dev_num <= SDW_MAX_DEVICES; dev_num++) { > + for (dev_num = 1; dev_num <= SDW_MAX_DEVICES; dev_num++) { > status = (val >> (dev_num * SWRM_MCP_SLV_STATUS_SZ)); > > if ((status & SWRM_MCP_SLV_STATUS_MASK) == SDW_SLAVE_ALERT) { > @@ -448,7 +448,7 @@ static void qcom_swrm_get_device_status(struct qcom_swrm_ctrl *ctrl) > ctrl->reg_read(ctrl, SWRM_MCP_SLV_STATUS, &val); > ctrl->slave_status = val; > > - for (i = 0; i <= SDW_MAX_DEVICES; i++) { > + for (i = 1; i <= SDW_MAX_DEVICES; i++) { > u32 s; > > s = (val >> (i * 2));