Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4675932iob; Sun, 8 May 2022 21:35:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHQgg3WM0XbjINsPFsRvVs2C223gqoKf5x0VEH5rl9b1NClZxE/VUUFK7kLn0BuP3c9n5y X-Received: by 2002:a17:902:8b88:b0:156:2b14:cb6e with SMTP id ay8-20020a1709028b8800b001562b14cb6emr15147199plb.14.1652070908445; Sun, 08 May 2022 21:35:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652070908; cv=none; d=google.com; s=arc-20160816; b=XEemmCrQcCiF4WJ5qIqfLydkMdasv6uFNMLhZYar3qzasn19+875yP+FTdM3cP0sVl 5w8mMsVQ41JarzBSV6zPxsR4wAR+JgeKTo0QzFE0op4yTCGlJFjk73YNLXbs6wqZiUQN 9tfjS5lbMUlZmnk9d/cVjO3T5E7Plw2L/yXPcBivdYrZlWPLQPkhVsGFxzR8k2vcqAEO EupC10bV7v9Acmfuh4AJ7wMQzaPz/TdAQGscWdO0xscfETBOZD+WNF63fVlP9C5oluwV kRVtt5H8pDwdQLPb3fFsi0SkI7wak2WM7T4PgXOUUGiZRx+2QoCsHh+AEe4vR+iefgV3 PR9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=7LQd7iQdqQi625fScqqUgHbyBnZ+6vFhX41p9tiKGP0=; b=PA0I6eGhJALi4gv1F4pIdVDWb0XoHkLBbA/52WKOV/Lp5sJky6W0i/qFDJ9okLDMuP b+3yKYAV8XaAJriE81XyS4EwHzuXH+Yg6bclk9b+a3sSP0m+LO8RorihqluNV4hZrPAR gTLS3i1SbznSQbN2+slrzKFt51kbX7ybaLYxoIB247m345fME3Ve+EBh/13lzCMefaQR QFOiKIrFVo0z7JiDPubRXJR56fkbw2fMKxlFmWGgCKnko3ny0NejrArQbgDkpQ+ECkQ3 j9sGOFMY33VCM3FNwAmuiEf0nE/z2BPP63zkdmSNq3LHgSMZpA/uEaJiinWc0ID5g8kI 06hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IMscpR8P; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id f3-20020a056a00238300b0050a49c21b85si14695947pfc.50.2022.05.08.21.35.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 21:35:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IMscpR8P; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 541E488F59; Sun, 8 May 2022 21:34:37 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1390271AbiEFIvJ (ORCPT + 99 others); Fri, 6 May 2022 04:51:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1390267AbiEFIvB (ORCPT ); Fri, 6 May 2022 04:51:01 -0400 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EAE9957127 for ; Fri, 6 May 2022 01:47:14 -0700 (PDT) Received: by mail-wr1-x42a.google.com with SMTP id x18so9122911wrc.0 for ; Fri, 06 May 2022 01:47:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=7LQd7iQdqQi625fScqqUgHbyBnZ+6vFhX41p9tiKGP0=; b=IMscpR8PfJpHILzYcvylriVA5ovdlSmxZrGEyN8QyRyGkOIt2J2TgzSLvmKypmI5NW ro/p3Mou7emqGjRj/MS2mserpj9t5GFyhxt3wz6C0usU9tF9ynFSS5gcILBENYBIG4V3 pjukkVG2qOCKx7MLAtwcgew8GJF+xHexsU2B9QRja11CqGmRCiUF+DmN7jljGh0uimSF pDBctRlBEpWvlKE6JDMsbNO+MsSCimMP3nsQVWIe7JzmUHgCgQRf2HA1igkX1zKOprQt j+adMdy+mNLIPOijwOxn6jIgfBDKWIamR7pPW+8iq0vQyh2HQXo959bVD9QDWDMVSSMx i9Hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=7LQd7iQdqQi625fScqqUgHbyBnZ+6vFhX41p9tiKGP0=; b=E2SWAJgvi3vEmWaCsAcY7t7/BX4fdRPVa4i3uHLDzn8MgWP/4Re0JhAPASvUFgiHGs psxfu21KpZC9UDejQrXF733Ja0gf/QctrT9UJ2A91bolo8UOMQyz7KEv5wQnPn3pkggw v27oYCIGWl01/uWrSYRNPLMcLao6dWANoOiYfCyjNnZrGeHs7NEhbJ6fxciCxNYH42Id YW0cN90sZlz+2eQ0I7Utowbb90sZkqo0ml1HzfWMA1h5TzLoqRWkhV6xDp8e0idl06b/ LqNNmEZUm+D9DUSdjzbHqiTDAJm3Mbs/9B/L8G+Jj1g2YqkjAKeKCh2G/eZkLbZllkZB vI4A== X-Gm-Message-State: AOAM533ndzcRssBGkGVmng6Lr9sW4oRKinaSSH4udHUi6S3/kasETX/c Vvkut6TPPjnX5k5prHivhr1wsw== X-Received: by 2002:a5d:6345:0:b0:20a:d69f:8126 with SMTP id b5-20020a5d6345000000b0020ad69f8126mr1775273wrw.276.1651826833431; Fri, 06 May 2022 01:47:13 -0700 (PDT) Received: from srini-hackbox.lan (cpc90716-aztw32-2-0-cust825.18-1.cable.virginm.net. [86.26.103.58]) by smtp.gmail.com with ESMTPSA id o9-20020a5d62c9000000b0020c5253d903sm3071349wrv.79.2022.05.06.01.47.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 May 2022 01:47:12 -0700 (PDT) From: Srinivas Kandagatla To: vkoul@kernel.org Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, pierre-louis.bossart@linux.intel.com, bard.liao@intel.com, Srinivas Kandagatla , Srinivasa Rao Mandadapu Subject: [PATCH v2] soundwire: qcom: adjust autoenumeration timeout Date: Fri, 6 May 2022 09:47:05 +0100 Message-Id: <20220506084705.18525-1-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Currently timeout for autoenumeration during probe and bus reset is set to 2 secs which is really a big value. This can have an adverse effect on boot time if the slave device is not ready/reset. This was the case with wcd938x which was not reset yet but we spent 2 secs waiting in the soundwire controller probe. Reduce this time to 1/10 of Hz which should be good enough time to finish autoenumeration if any slaves are available on the bus. Reported-by: Srinivasa Rao Mandadapu Signed-off-by: Srinivas Kandagatla --- Changes since v1: replaced HZ/10 with 100 as suggested by Pierre drivers/soundwire/qcom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c index 7367aa88b8ac..d6111f69d320 100644 --- a/drivers/soundwire/qcom.c +++ b/drivers/soundwire/qcom.c @@ -105,7 +105,7 @@ #define SWRM_SPECIAL_CMD_ID 0xF #define MAX_FREQ_NUM 1 -#define TIMEOUT_MS (2 * HZ) +#define TIMEOUT_MS 100 #define QCOM_SWRM_MAX_RD_LEN 0x1 #define QCOM_SDW_MAX_PORTS 14 #define DEFAULT_CLK_FREQ 9600000 -- 2.21.0