From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: Bjorn Helgaas <bhelgaas@google.com>, linux-pci@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org,
"Nadav Haklai" <nadavh@marvell.com>,
"Victor Gu" <xigu@marvell.com>,
"Gregory Clement" <gregory.clement@bootlin.com>,
"Miquèl Raynal" <miquel.raynal@bootlin.com>,
"Maxime Chevallier" <maxime.chevallier@bootlin.com>,
"Antoine Tenart" <antoine.tenart@bootlin.com>,
"Evan Wang" <xswang@marvell.com>,
stable@vger.kernel.org,
"Thomas Petazzoni" <thomas.petazzoni@free-electrons.com>
Subject: [PATCH v3 5/6] PCI: aardvark: fix PCIe max read request size setting
Date: Tue, 27 Mar 2018 16:08:18 +0200 [thread overview]
Message-ID: <20180327140819.23501-13-thomas.petazzoni@bootlin.com> (raw)
In-Reply-To: <20180327140819.23501-1-thomas.petazzoni@bootlin.com>
From: Evan Wang <xswang@marvell.com>
There is an obvious typo issue in the definition of the PCIe maximum
read request size: a bit shift is directly used as a value, while it
should be used to shift the correct value.
Fixes: 8c39d710363c1 ("PCI: aardvark: Add Aardvark PCI host controller driver")
Cc: <stable@vger.kernel.org>
Signed-off-by: Evan Wang <xswang@marvell.com>
Reviewed-by: Victor Gu <xigu@marvell.com>
Reviewed-by: Nadav Haklai <nadavh@marvell.com>
[Thomas: tweak commit log.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
drivers/pci/host/pci-aardvark.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/pci/host/pci-aardvark.c b/drivers/pci/host/pci-aardvark.c
index c6cd7b17868f..d0688dc6b6d9 100644
--- a/drivers/pci/host/pci-aardvark.c
+++ b/drivers/pci/host/pci-aardvark.c
@@ -29,6 +29,7 @@
#define PCIE_CORE_DEV_CTRL_STATS_MAX_PAYLOAD_SZ_SHIFT 5
#define PCIE_CORE_DEV_CTRL_STATS_SNOOP_DISABLE (0 << 11)
#define PCIE_CORE_DEV_CTRL_STATS_MAX_RD_REQ_SIZE_SHIFT 12
+#define PCIE_CORE_DEV_CTRL_STATS_MAX_RD_REQ_SZ 0x2
#define PCIE_CORE_LINK_CTRL_STAT_REG 0xd0
#define PCIE_CORE_LINK_L0S_ENTRY BIT(0)
#define PCIE_CORE_LINK_TRAINING BIT(5)
@@ -295,7 +296,8 @@ static void advk_pcie_setup_hw(struct advk_pcie *pcie)
reg = PCIE_CORE_DEV_CTRL_STATS_RELAX_ORDER_DISABLE |
(7 << PCIE_CORE_DEV_CTRL_STATS_MAX_PAYLOAD_SZ_SHIFT) |
PCIE_CORE_DEV_CTRL_STATS_SNOOP_DISABLE |
- PCIE_CORE_DEV_CTRL_STATS_MAX_RD_REQ_SIZE_SHIFT;
+ (PCIE_CORE_DEV_CTRL_STATS_MAX_RD_REQ_SZ <<
+ PCIE_CORE_DEV_CTRL_STATS_MAX_RD_REQ_SIZE_SHIFT);
advk_writel(pcie, reg, PCIE_CORE_DEV_CTRL_STATS_REG);
/* Program PCIe Control 2 to disable strict ordering */
--
2.14.3
next prev parent reply other threads:[~2018-03-27 14:09 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-27 14:08 [PATCH v3 0/6] PCI: aardvark: misc fixes and improvements Thomas Petazzoni
2018-03-27 14:08 ` [PATCH v3 1/6] PCI: aardvark: introduce an advk_pcie_valid_device() helper Thomas Petazzoni
2018-03-27 14:08 ` [PATCH v3 2/6] PCI: aardvark: fix logic in advk_pcie_valid_device() Thomas Petazzoni
2018-03-27 14:08 ` [PATCH v3 3/6] PCI: aardvark: set PIO_ADDR_LS correctly in advk_pcie_rd_conf() Thomas Petazzoni
2018-03-27 14:08 ` [PATCH v3 4/6] PCI: aardvark: use isr1 instead of isr0 interrupt in legacy irq mode Thomas Petazzoni
2018-03-27 14:08 ` [PATCH v3 5/6] PCI: aardvark: fix PCIe max read request size setting Thomas Petazzoni
2018-03-27 14:08 ` [PATCH v3 6/6] PCI: aardvark: remove PCIe outbound window configuration Thomas Petazzoni
2018-03-27 14:08 ` [PATCH v3 0/6] PCI: aardvark: misc fixes and improvements Thomas Petazzoni
2018-03-27 19:50 ` Bjorn Helgaas
2018-03-27 14:08 ` [PATCH v3 1/6] PCI: aardvark: introduce an advk_pcie_valid_device() helper Thomas Petazzoni
2018-03-27 19:53 ` Bjorn Helgaas
2018-03-27 14:08 ` [PATCH v3 2/6] PCI: aardvark: fix logic in advk_pcie_valid_device() Thomas Petazzoni
2018-03-27 14:08 ` [PATCH v3 3/6] PCI: aardvark: set PIO_ADDR_LS correctly in advk_pcie_rd_conf() Thomas Petazzoni
2018-03-27 14:08 ` [PATCH v3 4/6] PCI: aardvark: use isr1 instead of isr0 interrupt in legacy irq mode Thomas Petazzoni
2018-03-27 14:08 ` Thomas Petazzoni [this message]
2018-03-27 14:08 ` [PATCH v3 6/6] PCI: aardvark: remove PCIe outbound window configuration Thomas Petazzoni
2018-03-27 14:20 ` [PATCH v3 0/6] PCI: aardvark: misc fixes and improvements Thomas Petazzoni
2018-03-27 19:57 ` Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180327140819.23501-13-thomas.petazzoni@bootlin.com \
--to=thomas.petazzoni@bootlin.com \
--cc=antoine.tenart@bootlin.com \
--cc=bhelgaas@google.com \
--cc=gregory.clement@bootlin.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=maxime.chevallier@bootlin.com \
--cc=miquel.raynal@bootlin.com \
--cc=nadavh@marvell.com \
--cc=stable@vger.kernel.org \
--cc=thomas.petazzoni@free-electrons.com \
--cc=xigu@marvell.com \
--cc=xswang@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).