Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2394928lqp; Sun, 24 Mar 2024 17:35:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXq8+KnLtsAvMaBeIWvpy4I8RI2uYPSRsuH/HFv7dkoak1dbmzNYp3U4NmwlDp/v5qYn9ybTKDtsSyCn3f+jx8Fl7zS8wcJ6NV6yS0djg== X-Google-Smtp-Source: AGHT+IF3HT8O6o57BxLbW/SiTO3YKM2TeoelhVDCUbMLy9iLXX/WsGUjQjZxoS/wdOkdh67o56Q4 X-Received: by 2002:a05:6808:2202:b0:3c3:b379:ea1d with SMTP id bd2-20020a056808220200b003c3b379ea1dmr7326300oib.28.1711326920000; Sun, 24 Mar 2024 17:35:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711326919; cv=pass; d=google.com; s=arc-20160816; b=vDnFpORnZ9lbeSrXOAmEHCXLfW18+ZU/g3vq3F9UdqDPI9ptxRj9dW0CYrVlnVh0et I3KEbdaiKQekUN65IB3uNpXZyWwGsJ19rzAOfnGWAnHj9o3KuZcWQ96qE/cnyzfox5Jk tv8I57Kp6M9ppHryx7fuAzr59LsEbNfBRJQcPRLVW+rRTFcQNLOd1XBJQprawm298I5d 2CcfCqlldlDDl+T8XMZ5tgt7qzkAHAqGEsGWmbzuWIWjSkQ9HTF3qP53WlPhiUNhLCpa FXtKHAJYi7Oig2tgDnkFYHpDBXu/WVdeYULBUYm3sZfBsGKYscEyGmEXXp7U6D07W5AG xB/Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=MUrzY0qThGyq6lmIqFfMNPHgyprzrmNqv/vpao4J29w=; fh=Vz5XkQudAm+TPZ3wYCFDI8XDLckqUlKMD9bnWZhJfXE=; b=krAboOURz8YA4x25FbPVN4oOGdwMdFd82ObsNiDqTENQqZL/tZbKBJRsfdPkHxBUzx UctwZnjDyHJvUql7U2FJUS66HkPTQj2pBhskflWvv3UAHgCR56u9dThhScGnb7zmNXg1 o2dFb9Y4SXsMFvX9dTWREhogH6pUDVUghoLzb6pK/mj9yVPfC7mFeSoLP0hk8bHbM0Wo Jq416sa7tUYB+/Tlgvw9XVtBqovulqYw4+HP8ws365FpHlY1QZuxj2AWvrf4KPNOHR0G LTR9Thct0s2ZXShYOqFy3z9v2GolwNM6VgQ5HJi7iaB406QGPhfaSgjN/RVbgBnNqgMz 5LQg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YDDD6gNE; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113427-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113427-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id m2-20020a634c42000000b005dc1004e0b7si4350948pgl.100.2024.03.24.17.35.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 17:35:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113427-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YDDD6gNE; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113427-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113427-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id A848E283EB4 for ; Mon, 25 Mar 2024 00:34:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5337C1A9958; Sun, 24 Mar 2024 22:43:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YDDD6gNE" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 71E171A9938; Sun, 24 Mar 2024 22:43:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320229; cv=none; b=fo2OCfnJHiIPUQGDI8Pgabs1et9UgwC2dCqHmVpAHObLQrzMG4uwsQTcURjC5FZcKYko3nxh+aprk5iNRAuYabsbw+MRxHFeixJ60jIDiGEicajaDJZUsF9Jdw+QNHWR2gFiGV5GS6dw1BCsQocE4QBhPpnpswMQdm1/LNwTGdw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320229; c=relaxed/simple; bh=UG2h6+XvryN6gQ9vdCGtSG/zCgIX9zu7saPtncgrqOM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=q4FvWCrL9FVOvCOdarDcNthCy+PIzu7QZBsajTxkxsMJYdUzdLrOKQ7NZzMsH4ep6ow5H6JQIoRAr/6DO+o+ro7eBpwB2UYlhMYnGqef2D7/UCCN00xJZVjsRZ41WREDATROC5f9zMOmgPOJN0hDkEXCGOZJIS0pB33GEtF8+M0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YDDD6gNE; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 81506C433C7; Sun, 24 Mar 2024 22:43:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711320229; bh=UG2h6+XvryN6gQ9vdCGtSG/zCgIX9zu7saPtncgrqOM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YDDD6gNE1IvR2SFWm/AlFyebtDMaxcb3eQG25fcIhQg8LMORXoPwnJP5pMjJw17tg x1yuikMr6lXaaleoT3ur7i56Vs4NnHAQhGTokJsvp8LzILg/0ZA1z/lBqsGYl56V0+ 8iBOuC60HMKkU+yd9QDJcLRrcWL34a/qyL2tV6nOooyIHeKmSJZbAVCaZxQBSNBo0v mcSLQG5ZKY5vVb7ZxTOOJKNxBycNxU3V/UH7fN4W3o7YcRkT0+64ulNQnUF0hC9/Cp MTEXjkcDqaV0CboVwzn7Yd0IwqREJ1+9d+FrqKfpjTTg8ch/cic8+aEk0z8n9DpOVT OaqbMdskxUT5Q== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jonathan Bell , Stefan Wahren , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Florian Fainelli , Sasha Levin Subject: [PATCH 6.8 536/715] PCI: brcmstb: Fix broken brcm_pcie_mdio_write() polling Date: Sun, 24 Mar 2024 18:31:55 -0400 Message-ID: <20240324223455.1342824-537-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Jonathan Bell [ Upstream commit 039741a8d7c9a01c1bc84a5ac5aa770a5e138a30 ] The MDIO_WT_DONE() macro tests bit 31, which is always 0 (== done) as readw_poll_timeout_atomic() does a 16-bit read. Replace with the readl variant. [kwilczynski: commit log] Fixes: ca5dcc76314d ("PCI: brcmstb: Replace status loops with read_poll_timeout_atomic()") Link: https://lore.kernel.org/linux-pci/20240217133722.14391-1-wahrenst@gmx.net Signed-off-by: Jonathan Bell Signed-off-by: Stefan Wahren Signed-off-by: Krzysztof WilczyƄski Acked-by: Florian Fainelli Signed-off-by: Sasha Levin --- drivers/pci/controller/pcie-brcmstb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c index 5b0730c3891b8..c08683febdd40 100644 --- a/drivers/pci/controller/pcie-brcmstb.c +++ b/drivers/pci/controller/pcie-brcmstb.c @@ -336,7 +336,7 @@ static int brcm_pcie_mdio_write(void __iomem *base, u8 port, readl(base + PCIE_RC_DL_MDIO_ADDR); writel(MDIO_DATA_DONE_MASK | wrdata, base + PCIE_RC_DL_MDIO_WR_DATA); - err = readw_poll_timeout_atomic(base + PCIE_RC_DL_MDIO_WR_DATA, data, + err = readl_poll_timeout_atomic(base + PCIE_RC_DL_MDIO_WR_DATA, data, MDIO_WT_DONE(data), 10, 100); return err; } -- 2.43.0