From patchwork Thu Apr 13 01:32:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "David E. Box" X-Patchwork-Id: 82729 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp724732vqo; Wed, 12 Apr 2023 18:53:38 -0700 (PDT) X-Google-Smtp-Source: AKy350apuh0LW3r3e1U9CWPCf4a2J7qtjb0hZYvdUI4XtPdMZ+fTtYoMGeU/SgoO+xSGYjjHJ+EJ X-Received: by 2002:a17:902:7c92:b0:1a2:9183:a49c with SMTP id y18-20020a1709027c9200b001a29183a49cmr348260pll.32.1681350817778; Wed, 12 Apr 2023 18:53:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681350817; cv=none; d=google.com; s=arc-20160816; b=vUFhJzOnlfCa6f8gZbTva9c0UAKyxIfMdtL1N7GA8IeegEhWR/8hBXxk7EYAJqJx3s M9UPkKgngMf2mS2TAVOHzGZKWRsSv7gW0rWTMMoktcKDf5n4JIep8mPQLXYxPkLZl+K3 DqZ7bxfYv+nnp8iXtKW5Stq+Dv6c0bEYUD0OlPgl5yIlVRcpOA2VINAKB8Uhiw8P19ey d7GphRh9GEMAzaiiIoTYKJFlkmJIic9xSf2Hiulr6zlayp/hN6DMmU02Hd3chHlsbEYF H3KWJ8wpGTZVkiJrfeX3gqvWbbVBLzda/PshBGL6MAw0gDazlCrhbK1IXAj9wIb4PnhM FsEQ== 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=ji31NXnh8V/Duoyj1z2ZkCY8XoCPPyC0uP/oYeQndl4=; b=PuRCnwrFc6hn+bIxeJ9hgumM1lTVv9jUQykEz09ImGfZOnTPJ0o1hlHgY1UwlVpuwR 3Z9b52lCgzXBtg+HvRMJRC7Ac2gqUkUz31j7DChN+gCOxrp6/KELOjXbeGwbBkkicx6s xsbWNcJ83Cy0mfrqRiXNqTqn6JDCxyL42lrHujAb909lAPL6991Kv0Ny6kFoJAcotnHB BPAtHq7he9QR9CFHclF7mUXIcf46HTlrBBZzWkbbWjlB78O0eFykIiRGz63n299zNOoh GGnglkxfpwUQgWQZGnqS2JQeb+VHdJSSJEW5U8WvLiUeEh9FuKFNxn6ao0x4iEDE5QIh 0vEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QVjHoXWe; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 12-20020a170902ee4c00b001a1a83b02a4si666831plo.258.2023.04.12.18.53.26; Wed, 12 Apr 2023 18:53:37 -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=QVjHoXWe; 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 S229674AbjDMBcd (ORCPT + 99 others); Wed, 12 Apr 2023 21:32:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229503AbjDMBcc (ORCPT ); Wed, 12 Apr 2023 21:32:32 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07B201712; Wed, 12 Apr 2023 18:32:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681349552; x=1712885552; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ILsidFKzCVxsGAABpc4qrhew3cGTXES9pdfYjscYrKQ=; b=QVjHoXWe9fVteOLuw+raqM5FSKu7/+ufAy48/GlvnDCKeCWNj3BVcfl+ ui9vSAEpHWzuLbmtoyICdgV6clhH5GP3AmRAB1yLAVhSQaeBAQaunwJgW 37lf0o84RMcwUwqT9dgsxwjrQOnL/LJzAuiaDfbmYXlY3kJnIVrNFzfy8 x8mS2Oh+CzFnIU0Cxp822+83AjNwZo5s8yzb9U1+UpKwHoOTNp2VuaFwL bQe/O7PoBDMihRMLOizaL25EHCPUKgkmzxUiTiNFVvrZDNXx61qrninNR BgLjQ+E8FQTz8MrBmEWcHL69I1c297qaeMY5R/f+FKv5iAeL8tilRFl0K Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10678"; a="346744380" X-IronPort-AV: E=Sophos;i="5.98,339,1673942400"; d="scan'208";a="346744380" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2023 18:32:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10678"; a="800575177" X-IronPort-AV: E=Sophos;i="5.98,339,1673942400"; d="scan'208";a="800575177" Received: from linux.intel.com ([10.54.29.200]) by fmsmga002.fm.intel.com with ESMTP; 12 Apr 2023 18:32:31 -0700 Received: from debox1-desk4.intel.com (unknown [10.251.6.61]) by linux.intel.com (Postfix) with ESMTP id 02F71580AFF; Wed, 12 Apr 2023 18:32:30 -0700 (PDT) From: "David E. Box" To: david.e.box@linux.intel.com, hdegoede@redhat.com, markgross@kernel.org Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] platform/x86/intel/sdsi: Change mailbox timeout Date: Wed, 12 Apr 2023 18:32:30 -0700 Message-Id: <20230413013230.1521584-1-david.e.box@linux.intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,URIBL_BLOCKED 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763024114843388959?= X-GMAIL-MSGID: =?utf-8?q?1763024114843388959?= On some platforms, it may take up to 400ms for the ready bit to be set in a successful mailbox transaction. Set the timeout to 500ms to cover the worst case. Signed-off-by: David E. Box Reviewed-by: Ilpo Järvinen --- drivers/platform/x86/intel/sdsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) base-commit: 5b309e80f457ebb41770e0122766825a78cfc11b diff --git a/drivers/platform/x86/intel/sdsi.c b/drivers/platform/x86/intel/sdsi.c index 9e0ea2cdd704..556e7c6dbb05 100644 --- a/drivers/platform/x86/intel/sdsi.c +++ b/drivers/platform/x86/intel/sdsi.c @@ -49,7 +49,7 @@ #define SDSI_MBOX_CMD_SUCCESS 0x40 #define SDSI_MBOX_CMD_TIMEOUT 0x80 -#define MBOX_TIMEOUT_US 2000 +#define MBOX_TIMEOUT_US 500000 #define MBOX_TIMEOUT_ACQUIRE_US 1000 #define MBOX_POLLING_PERIOD_US 100 #define MBOX_ACQUIRE_NUM_RETRIES 5