From patchwork Tue Jun 27 18:04:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 106464 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp63734qge; Tue, 27 Jun 2017 11:05:07 -0700 (PDT) X-Received: by 10.99.23.100 with SMTP id 36mr6605055pgx.118.1498586707510; Tue, 27 Jun 2017 11:05:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498586707; cv=none; d=google.com; s=arc-20160816; b=noRr5AOyw3DfjftJGL58nzbGjsG5E0kHRYUvkLlnggZb3EqPr6a26WwLDI/IJh4GPi MsEy9RfFIkBp3M3qMe5XcrLldn8mmJfZohtaXb8jyY2ZtgxQWADu2JJvVpxGEsBNIIhX bHMwgSGdhM6KFSY58sj3c+PV1cdxVTOeQbRP0IOVaXk1CkkazBuoTyBFN9RVpJn6vONv TZcosoRJFnijq4lTumeS0zyj4oe6lCzQlT5gm4hl4gdLk0EKx3sQOIxDl1Bz0J+nVZKG D0C4RyAAn9K5vyIwGJytDNIjX5Qh+Lg5l/n7+jjJYwlusRiUkISnoQC4Zo8wRHeZ0iGr FOiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=GlQqR6pwWYoBdlU1UZrIBg76vcCkwLwXxKo+RyRZNPg=; b=y2gQ2qNZ6Jg92vD5uNmuepRCdyBsNIeYOQxJGodUkzfCaJii9plYXBLjLNmRDFmbqs Hdb4ri7VDnkVcCWHFIuB4Xd4SwMXwEOMUIN5aWggaTChwDLIGJTDDsbVW07lnY/CZWCR t2vH47O0XbRwhv2QgUR+RVsy1FmJ/tV8RzSfO56/8PiyClMgnAwpL9A1mU2hgFgE7cnS XnwyHHMn4ruvj+nRUswaely1O23tNo4L/oiv0dKu6qbuHaTAUfMvAzPqgFXWaN5g4unf faMrVTWUR2+eWUypYa2kF4d9KRWT/QuhP/cIZRZs9VbE+cbVcwoxqXGc0NhWOqor4eMp +oyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=An8NvLbx; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id l5si2366262pgu.532.2017.06.27.11.05.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Jun 2017 11:05:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=An8NvLbx; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id E846221CB57A3; Tue, 27 Jun 2017 11:03:35 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-wm0-x22c.google.com (mail-wm0-x22c.google.com [IPv6:2a00:1450:400c:c09::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5DDAD21CB57A1 for ; Tue, 27 Jun 2017 11:03:34 -0700 (PDT) Received: by mail-wm0-x22c.google.com with SMTP id i127so34990084wma.0 for ; Tue, 27 Jun 2017 11:05:05 -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; bh=BWDcivPd5fPWmUm+K/G+IldbkEKVmOy7cLrgFhtOezA=; b=An8NvLbxChWanEzxxXP/6Y4OYtiZVpwwj5YZAgSfkCsL+KQ1lZqe1ygSf/Zv+lmvmp KIdeAwZTdDePPrvh949sczB09yPPh1ZA7xmRLOcJAykm4vNsI2kCmNmSbz8QuW53oAfO c7qJsoIDAFkj9McEYcjG7aWK2PMBLyh+ES5qY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=BWDcivPd5fPWmUm+K/G+IldbkEKVmOy7cLrgFhtOezA=; b=XZYU+nKHKBkO4JSjGXLKmi0AnDfeg5X0e8ed2vbal7rhhvMMTciQV7mSzQ0oWk8iIi NPl2codIdFxyyOXe8AWMpI8qRdaDBaQEY+rbVT8pgJW7Ycg7Wp4a/Ehzj4EHE7DTL99r PgiEJ91OyqboaJ9h14NeFuOFizPjBAq/cKlv5UjHZF1AaL8cqsYCmVqdEIk8LLsW7s/Z VPLCnGLwbk3ny4FfoL3+uJiiHyF/Yg0hRvGThzSZo9uAQcwLO0oOtt3rfJkI4jDzSdwS kiXGgBKeyfEb4eKq9gYzHfU/G0bs6bKiyH0Wk5s5xmWJou/zbuVrJz3syyMseQ0xAFVE pRPg== X-Gm-Message-State: AKS2vOxF80IaWEFVkRKVUicfxExHVn+ID/aqRasG62VAgFlnO7ZWI2Qi XwPAkWRpU57llQ1D4TjKQw== X-Received: by 10.28.103.132 with SMTP id b126mr4648147wmc.10.1498586701783; Tue, 27 Jun 2017 11:05:01 -0700 (PDT) Received: from localhost.localdomain ([105.133.250.69]) by smtp.gmail.com with ESMTPSA id m73sm3927487wmi.25.2017.06.27.11.04.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Jun 2017 11:05:00 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, star.zeng@intel.com, eric.dong@intel.com Date: Tue, 27 Jun 2017 18:04:51 +0000 Message-Id: <20170627180451.16094-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.9.3 Subject: [edk2] [PATCH] MdeModulePkg/AtaAtapiPassThru: relax PHY detect timeout X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: feng.tian@intel.com, leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" The SATA spec mandates that link detection by the PHY completes within 10 ms after receiving a reset signal. However, there is no obligation to uphold this requirement at the driver end as strictly as we do, and as it turns out, some combinations of host and device (e.g., Samsung 850 EVO connected to a LeMaker Cello) are only borderline compliant, which means the device is not detected reliably. So let's allow for a bit of margin, and increase the PHY detect timeout value to 15 ms. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.9.3 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Signed-off-by: Ard Biesheuvel diff --git a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.h b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.h index 6401fb2e9fcd..809bcc307fc4 100644 --- a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.h +++ b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.h @@ -41,8 +41,9 @@ typedef union { // // Refer SATA1.0a spec section 5.2, the Phy detection time should be less than 10ms. +// Add a bit of margin for robustness. // -#define EFI_AHCI_BUS_PHY_DETECT_TIMEOUT 10 +#define EFI_AHCI_BUS_PHY_DETECT_TIMEOUT 15 // // Refer SATA1.0a spec, the FIS enable time should be less than 500ms. //