* [PATCH] PCI: rockchip: correct the use of FTS mask
@ 2016-10-18 23:13 Brian Norris
2016-11-11 22:30 ` Bjorn Helgaas
2016-11-14 20:17 ` Bjorn Helgaas
0 siblings, 2 replies; 4+ messages in thread
From: Brian Norris @ 2016-10-18 23:13 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: linux-kernel, Brian Norris, Shawn Lin, Wenrui Li, Heiko Stuebner,
linux-pci, linux-rockchip, Rajat Jain, Brian Norris
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 <briannorris@chromium.org>
---
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);
--
2.8.0.rc3.226.g39d4020
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] PCI: rockchip: correct the use of FTS mask
2016-10-18 23:13 [PATCH] PCI: rockchip: correct the use of FTS mask Brian Norris
@ 2016-11-11 22:30 ` Bjorn Helgaas
2016-11-12 1:57 ` Shawn Lin
2016-11-14 20:17 ` Bjorn Helgaas
1 sibling, 1 reply; 4+ messages in thread
From: Bjorn Helgaas @ 2016-11-11 22:30 UTC (permalink / raw)
To: Brian Norris
Cc: Bjorn Helgaas, linux-kernel, Brian Norris, Shawn Lin, Wenrui Li,
Heiko Stuebner, linux-pci, linux-rockchip, Rajat Jain
On Tue, Oct 18, 2016 at 04:13:04PM -0700, Brian Norris wrote:
> 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 <briannorris@chromium.org>
I assume this is correct, but I'm waiting for an ack from Shawn.
> ---
> 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);
>
> --
> 2.8.0.rc3.226.g39d4020
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] PCI: rockchip: correct the use of FTS mask
2016-11-11 22:30 ` Bjorn Helgaas
@ 2016-11-12 1:57 ` Shawn Lin
0 siblings, 0 replies; 4+ messages in thread
From: Shawn Lin @ 2016-11-12 1:57 UTC (permalink / raw)
To: Bjorn Helgaas, Brian Norris
Cc: shawn.lin, Bjorn Helgaas, linux-kernel, Brian Norris, Wenrui Li,
Heiko Stuebner, linux-pci, linux-rockchip, Rajat Jain
On 2016/11/12 6:30, Bjorn Helgaas wrote:
> On Tue, Oct 18, 2016 at 04:13:04PM -0700, Brian Norris wrote:
>> 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 <briannorris@chromium.org>
>
> I assume this is correct, but I'm waiting for an ack from Shawn.
Thanks for catching this, and it was missing from my inbox somehow...
Acked-by: Shawn Lin <shawn.lin@rock-chips.com>
>
>> ---
>> 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);
>>
>> --
>> 2.8.0.rc3.226.g39d4020
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
Best Regards
Shawn Lin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] PCI: rockchip: correct the use of FTS mask
2016-10-18 23:13 [PATCH] PCI: rockchip: correct the use of FTS mask Brian Norris
2016-11-11 22:30 ` Bjorn Helgaas
@ 2016-11-14 20:17 ` Bjorn Helgaas
1 sibling, 0 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2016-11-14 20:17 UTC (permalink / raw)
To: Brian Norris
Cc: Bjorn Helgaas, linux-kernel, Brian Norris, Shawn Lin, Wenrui Li,
Heiko Stuebner, linux-pci, linux-rockchip, Rajat Jain
On Tue, Oct 18, 2016 at 04:13:04PM -0700, Brian Norris wrote:
> 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 <briannorris@chromium.org>
Applied with Shawn's ack to pci/host-rockchip, thanks!
> ---
> 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);
>
> --
> 2.8.0.rc3.226.g39d4020
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-11-14 20:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-18 23:13 [PATCH] PCI: rockchip: correct the use of FTS mask Brian Norris
2016-11-11 22:30 ` Bjorn Helgaas
2016-11-12 1:57 ` Shawn Lin
2016-11-14 20:17 ` Bjorn Helgaas
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).