Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp6000346ybi; Tue, 4 Jun 2019 16:38:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqzGaEUr07R82yEfG24+bkncnSIZaI9oPeIHSrY01l6v4YH93ej36t1YcrPn6N63Hx1CWzvF X-Received: by 2002:aa7:919a:: with SMTP id x26mr27681707pfa.134.1559691488376; Tue, 04 Jun 2019 16:38:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559691488; cv=none; d=google.com; s=arc-20160816; b=IdTeUY7tNGw4sLUN/DECwjtQfdpvePkv3+migLETzeR6heyacUdQEvYpabECpGDlP5 XRPKH6m2/oVxfga8ebXOXvjp6XdHAgIORhSas2y4doBZbB07VYzMGAVwGhdBZ37kx3N2 55lAaA6ZEgfMf+iLyIyjv8SZ70nt5E7D6IznrcelUsjQZczeTPBk2ffywkuaXe5uT1sI GjvzLPz3VtyQzkDLNUQWI5G0b6+ID5zrZjOiXZcXZ50qF5qrhFnnsRn2rKiuyBEeAg18 8nUK/H2rs9YweA98UgUomz9YAhdaHTBMPJQRbO7ZfqCZ405BDhDaELHuZ7cJD0uEZZxN 2nJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=WV3sJyKzvv2hglik5laJLi6zk95U7YCGm4MZG0UbbBM=; b=mcVL0PqfsYqCAM6tG0vjaYOXIqljB91QovvIxXWIiK9pks0dkFZKe8tXcTJBcsb9rj ukgM6qQX/Tg1l0S6OsFtsNarFp7UXvR1c2Imu7n3VEsDLqTL7KxvWWD+lDRFjYaD5vNj 79fhogzmbDFh5s1UUBsnLLhIZclao2PgrtA9vpwqNZbjBe7sGBJCZJj/gmzPiQysHkFE 5u7ZjATg2Lb7m1Af0HpQ1WQKkeia+pSw3gflC90waa97BEUr+xMjhA4QsSPCpH2JbZD6 Ili+YTCxe3/QBnVeetJlkTGJmTHv116FsSLxYcBIKB05/7HrrMsMyntUFfWY7UEwiVXP mjdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=doTgsxvd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h7si7759362pgk.379.2019.06.04.16.37.52; Tue, 04 Jun 2019 16:38:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=doTgsxvd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726502AbfFDXgC (ORCPT + 99 others); Tue, 4 Jun 2019 19:36:02 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:43595 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726422AbfFDXgC (ORCPT ); Tue, 4 Jun 2019 19:36:02 -0400 Received: by mail-lf1-f66.google.com with SMTP id j29so3809031lfk.10 for ; Tue, 04 Jun 2019 16:36:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WV3sJyKzvv2hglik5laJLi6zk95U7YCGm4MZG0UbbBM=; b=doTgsxvdZv8uU0x8XW1L0hFFxk7NVRCh4EcK48wmJsmGLsH6XMlLAb/m9hX5yAKfq/ mpAOXL47upaREgDMBi3qMSM8JV9L1dBVgYXWkO08XRJIh04mvW8/RphRVPAe4EgWjIYG dOxwWXAQNwFnvP+7LdEIctpkg0tJPmm6BMtrc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WV3sJyKzvv2hglik5laJLi6zk95U7YCGm4MZG0UbbBM=; b=HTjEwdgmJ7QdIprnQ4XleQTOuIussdhp3PYyjF63FtT46vejxn7L7o2YeD9BbGYocX EAkgvEfhpw3ZsLHZcqktFvJIxL2WzxJKKWktMV1DDPcAwwMbK7TxnKNX6RA/DtKn4Rh9 CiCZrZWouOs1rVNG0JU02wAc6i0VFHWCldKunlH3vSve1gBRWocKTyFZ9m+ig0s7Yx4Y aF3BofwItgc7AccTvt/yu3nmlBVh7itYcnJP1Y4gyj0qElh9UKMrKiy0LOgpYdqo9OVP e1JYcC7MD3xqirxhaNQHEqNzI2dBUgyan+JpFIs5RXZL+apkcc697WKvfYtto7aoyAG/ 4VbA== X-Gm-Message-State: APjAAAWwScxj9gBKsYYjip+O/FfKYqkYqkngHdYzDd17699UeCCd4hhp ljpD7Y2iUyS4bFLIDE8LLbus7izjoEQ= X-Received: by 2002:a19:ab1a:: with SMTP id u26mr10234931lfe.6.1559691359928; Tue, 04 Jun 2019 16:35:59 -0700 (PDT) Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com. [209.85.208.182]) by smtp.gmail.com with ESMTPSA id v17sm2039417ljg.36.2019.06.04.16.35.59 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Tue, 04 Jun 2019 16:35:59 -0700 (PDT) Received: by mail-lj1-f182.google.com with SMTP id m23so3111074lje.12 for ; Tue, 04 Jun 2019 16:35:59 -0700 (PDT) X-Received: by 2002:a2e:5d9c:: with SMTP id v28mr18287829lje.32.1559691358483; Tue, 04 Jun 2019 16:35:58 -0700 (PDT) MIME-Version: 1.0 References: <20190604232443.3417-1-bjorn.andersson@linaro.org> In-Reply-To: <20190604232443.3417-1-bjorn.andersson@linaro.org> From: Evan Green Date: Tue, 4 Jun 2019 16:35:21 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] phy: qcom-qmp: Correct READY_STATUS poll break condition To: Bjorn Andersson Cc: Kishon Vijay Abraham I , linux-arm-msm , LKML , stable@vger.kernel.org, Marc Gonzalez , Vivek Gautam , Stephen Boyd Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 4, 2019 at 4:24 PM Bjorn Andersson wrote: > > After issuing a PHY_START request to the QMP, the hardware documentation > states that the software should wait for the PCS_READY_STATUS to become > 1. > > With the introduction of c9b589791fc1 ("phy: qcom: Utilize UFS reset > controller") an additional 1ms delay was introduced between the start > request and the check of the status bit. This greatly increases the > chances for the hardware to actually becoming ready before the status > bit is read. > > The result can be seen in that UFS PHY enabling is now reported as a > failure in 10% of the boots on SDM845, which is a clear regression from > the previous rare/occasional failure. > > This patch fixes the "break condition" of the poll to check for the > correct state of the status bit. > > Unfortunately PCIe on 8996 and 8998 does not specify the mask_pcs_ready > register, which means that the code checks a bit that's always 0. So the > patch also fixes these, in order to not regress these targets. > > Cc: stable@vger.kernel.org > Cc: Evan Green > Cc: Marc Gonzalez > Cc: Vivek Gautam > Fixes: 73d7ec899bd8 ("phy: qcom-qmp: Add msm8998 PCIe QMP PHY support") > Fixes: e78f3d15e115 ("phy: qcom-qmp: new qmp phy driver for qcom-chipsets") > Signed-off-by: Bjorn Andersson Nice find. Reviewed-by: Evan Green