From patchwork Tue Oct 18 23:13:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 9383299 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8437A600CA for ; Tue, 18 Oct 2016 23:13:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7023929883 for ; Tue, 18 Oct 2016 23:13:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 64B2A2988E; Tue, 18 Oct 2016 23:13:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 147CC29883 for ; Tue, 18 Oct 2016 23:13:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756554AbcJRXNP (ORCPT ); Tue, 18 Oct 2016 19:13:15 -0400 Received: from mail-pf0-f174.google.com ([209.85.192.174]:36093 "EHLO mail-pf0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756491AbcJRXNN (ORCPT ); Tue, 18 Oct 2016 19:13:13 -0400 Received: by mail-pf0-f174.google.com with SMTP id e6so4126693pfk.3 for ; Tue, 18 Oct 2016 16:13:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=a3O8S2iuygLKWTz+ISGOPnWP7EpXnbO+P0V0uqB86hI=; b=SUfabib7FWf9MJjUzBaY4oe0CPxb4S05e4op3HHPMdepeHvE+T/wFWX8IOCbEr+cOK zEzERDi4Zs6gMKLmVqiTCt1RvYHIGN66mv9B7bcUoxyD02bTrFXnhxtrFzWLXLMFXZWL Yr5ecyfKr/K85tC8XrtuFkEB1AR/BuuTWEBO4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=a3O8S2iuygLKWTz+ISGOPnWP7EpXnbO+P0V0uqB86hI=; b=hlfTS//kOC1lOMgxHYhD6YjGLVLqhmKtsF6azodndNPGgaEVeuu445XlpKzPlet8qr Z0Cddk3seuG9rrVp8wcjhKDilpOn3lldEQdUwF+9EbEsexiDEDkZkRBgayCVfna6grXB HJiAXLaZCn0Td/+F0PRF484V4dg34cpRO3/5/L2QYn/V88s7wIA/FaM8nbizoPM7CbBg FCB1dJkV2qs8aafle+dcz8Xg2qMT2xRdIkPwMJSgypAoQWAW+vaMefULDUD6RH2vaBV9 vokSq2dH3duhNMj4TlZ96ymWv5PxVmZPWjC2usT+ByaXzLtw2LgzhwgzANgYAPCCeV1y ALGA== X-Gm-Message-State: AA6/9RldnYKdjqiMKKYzUQE+vAJCZnXCtduMwbae8Gn7xKQHA5P+Yd1a72IEFZC4vSI0FL1Y X-Received: by 10.99.102.69 with SMTP id a66mr3981620pgc.71.1476832392956; Tue, 18 Oct 2016 16:13:12 -0700 (PDT) Received: from ban.mtv.corp.google.com ([172.22.64.120]) by smtp.gmail.com with ESMTPSA id b88sm58337084pfe.72.2016.10.18.16.13.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 18 Oct 2016 16:13:12 -0700 (PDT) From: Brian Norris To: Bjorn Helgaas Cc: , Brian Norris , Shawn Lin , Wenrui Li , Heiko Stuebner , linux-pci@vger.kernel.org, linux-rockchip@lists.infradead.org, Rajat Jain , Brian Norris Subject: [PATCH] PCI: rockchip: correct the use of FTS mask Date: Tue, 18 Oct 2016 16:13:04 -0700 Message-Id: <1476832384-10215-1-git-send-email-briannorris@chromium.org> X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We're trying to mask out bits[23:8] while retaining [32:24, 7:0], but we're doing the inverse. That doesn't have too much effect, since we're setting all the [23:8] bits to 1, and the other bits are only relevant for modes we're currently not using. But we should get this right. Fixes: ca1989084054 ("PCI: rockchip: Fix wrong transmitted FTS count") Signed-off-by: Brian Norris Acked-by: Shawn Lin --- drivers/pci/host/pcie-rockchip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/host/pcie-rockchip.c b/drivers/pci/host/pcie-rockchip.c index e0b22dab9b7a..5c2e3297a3ff 100644 --- a/drivers/pci/host/pcie-rockchip.c +++ b/drivers/pci/host/pcie-rockchip.c @@ -492,7 +492,7 @@ static int rockchip_pcie_init_port(struct rockchip_pcie *rockchip) /* Fix the transmitted FTS count desired to exit from L0s. */ status = rockchip_pcie_read(rockchip, PCIE_CORE_CTRL_PLC1); - status = (status & PCIE_CORE_CTRL_PLC1_FTS_MASK) | + status = (status & ~PCIE_CORE_CTRL_PLC1_FTS_MASK) | (PCIE_CORE_CTRL_PLC1_FTS_CNT << PCIE_CORE_CTRL_PLC1_FTS_SHIFT); rockchip_pcie_write(rockchip, status, PCIE_CORE_CTRL_PLC1);