Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3251680pxj; Mon, 7 Jun 2021 06:17:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7f/v5owzWf6lbOuZlMvQSdthRGh+zJ6SvRkj+AqOa+PVJlHWLKB9aXbqJ8rrfOHRtUNEg X-Received: by 2002:a17:906:5fc3:: with SMTP id k3mr15118256ejv.11.1623071835286; Mon, 07 Jun 2021 06:17:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623071835; cv=none; d=google.com; s=arc-20160816; b=R7ULfITi1DVr4MfY25TJEicUXsVsh97eALpzrz2X3XMHUoc/tNE9LNKn6yYXByoKIO q34SH7mkT3RMfNLgjJu0JT/rFMzwFCG1CT59Ib8TAAijgjwnqt68X0AE7QyDDL7hjK1u SvCK1FDvEpn5sBbNCYBPt5DOFjitxmeSyRjI9lmiKU78t2d3mshFOUKT0OY4hqie6s3u HVgzn7stseyknhdIhxb/NM59ZFbA7xyc4FcYePcvNxFAIznfnLB2GBCi4K1M+lCla6g/ IEaDGhXaogl2zQZoTKt444ON6wpMe9nrCNdzVP1H6O550MQF4VqVh7B1BVfz3JTr8y+z y0PQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=LEt561RtwepLKZ4pNmAiQUTA5Idhmi2HHRPDA/YhIpU=; b=Rm7wQdghTudW5KJfhs8zHhrbtPm1so1ZsQO8Tan/H4HZVy/dwiU5EkzL+5JtJ3hrV4 A4UUCea/4HpizLcsJwcV89cs7K5ZViwwhiGHJJV8rEvaWi0Q4OhZksYuIj+FRqQsNdVu GBLT1ml0HuLatSv4zzk6kBl5teTMNwOaTsie7YPYGk6g7bh1HfFlwTz4f4uZh5fYNI9D HsJmeQ92FhJYnhznZFNyQkSjK4RG3+4GjkJCfWlGZxfUkhBnEyoI0lL0QRwAYVBTCsul ba0LOGD8pgGqcmqDey17ZKeHYauHXzHQiYBUMf3oGHXIC/jGO3oTG/LMb5Y6rKC+X03Y hgtw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id fh1si11546725ejc.91.2021.06.07.06.16.50; Mon, 07 Jun 2021 06:17:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230356AbhFGNQU (ORCPT + 99 others); Mon, 7 Jun 2021 09:16:20 -0400 Received: from mga06.intel.com ([134.134.136.31]:17596 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230333AbhFGNQS (ORCPT ); Mon, 7 Jun 2021 09:16:18 -0400 IronPort-SDR: lc0qqfZUu3xBbHgp+32IZ6hF0BoXBLHEcju3iMBmfe3N3H0/QyA/bA75/s6xZZLCy7VQUKHuYo JcbX/PqazQrg== X-IronPort-AV: E=McAfee;i="6200,9189,10008"; a="265773989" X-IronPort-AV: E=Sophos;i="5.83,255,1616482800"; d="scan'208";a="265773989" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jun 2021 06:14:27 -0700 IronPort-SDR: kPmwXhJBEIz3UawO9j7Cj1wmGv5P/SrYM6YsW+5S5f13lUeuW+20Psm6H6/N9PCutYTYI9jinV 7B6N8ZkeeEZg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,255,1616482800"; d="scan'208";a="551881892" Received: from black.fi.intel.com (HELO black.fi.intel.com.) ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 07 Jun 2021 06:14:25 -0700 From: Heikki Krogerus To: Benjamin Berg Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 4/7] usb: typec: ucsi: acpi: Reduce the command completion timeout Date: Mon, 7 Jun 2021 16:14:39 +0300 Message-Id: <20210607131442.20121-5-heikki.krogerus@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210607131442.20121-1-heikki.krogerus@linux.intel.com> References: <20210607131442.20121-1-heikki.krogerus@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The huge delay was there to workaround a problem where the firmware did not report that if it was busy with the alternate mode commands. Now that the alternate modes are polled, the delay can be dropped. Signed-off-by: Heikki Krogerus --- drivers/usb/typec/ucsi/ucsi_acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/typec/ucsi/ucsi_acpi.c b/drivers/usb/typec/ucsi/ucsi_acpi.c index 04976435ad736..6771f05e32c29 100644 --- a/drivers/usb/typec/ucsi/ucsi_acpi.c +++ b/drivers/usb/typec/ucsi/ucsi_acpi.c @@ -78,7 +78,7 @@ static int ucsi_acpi_sync_write(struct ucsi *ucsi, unsigned int offset, if (ret) goto out_clear_bit; - if (!wait_for_completion_timeout(&ua->complete, 60 * HZ)) + if (!wait_for_completion_timeout(&ua->complete, HZ)) ret = -ETIMEDOUT; out_clear_bit: -- 2.30.2