* PCI: altera: Fix TLP completion status
@ 2017-02-17 0:27 Yadi Hu
2017-02-17 0:27 ` [PATCH] " Yadi Hu
0 siblings, 1 reply; 4+ messages in thread
From: Yadi Hu @ 2017-02-17 0:27 UTC (permalink / raw)
To: yadi.hu, lftan; +Cc: linux-pci, rfi
the upstream driver does not use exactly 'Completion Status' value
in TLP, these bits should be b15:13 not b14:12.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] PCI: altera: Fix TLP completion status
2017-02-17 0:27 PCI: altera: Fix TLP completion status Yadi Hu
@ 2017-02-17 0:27 ` Yadi Hu
2017-02-17 1:32 ` Ley Foon Tan
2017-02-17 20:26 ` Bjorn Helgaas
0 siblings, 2 replies; 4+ messages in thread
From: Yadi Hu @ 2017-02-17 0:27 UTC (permalink / raw)
To: yadi.hu, lftan; +Cc: linux-pci, rfi
From: "Hu Yadi" <yadi.hu@windriver.com>
the driver does not use exactly 'Completion Status' value in TLP,
these bits should be b15:13 not b14:12.
Signed-off-by: Hu Yadi<yadi.hu@windriver.com>
---
drivers/pci/host/pcie-altera.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/host/pcie-altera.c b/drivers/pci/host/pcie-altera.c
index dbac6fb..650862e 100644
--- a/drivers/pci/host/pcie-altera.c
+++ b/drivers/pci/host/pcie-altera.c
@@ -56,7 +56,7 @@
#define TLP_CFG_DW2(bus, devfn, offset) \
(((bus) << 24) | ((devfn) << 16) | (offset))
#define TLP_REQ_ID(bus, devfn) (((bus) << 8) | (devfn))
-#define TLP_COMP_STATUS(s) (((s) >> 12) & 7)
+#define TLP_COMP_STATUS(s) (((s) >> 13) & 7)
#define TLP_HDR_SIZE 3
#define TLP_LOOP 500
#define RP_DEVFN 0
--
2.9.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] PCI: altera: Fix TLP completion status
2017-02-17 0:27 ` [PATCH] " Yadi Hu
@ 2017-02-17 1:32 ` Ley Foon Tan
2017-02-17 20:26 ` Bjorn Helgaas
1 sibling, 0 replies; 4+ messages in thread
From: Ley Foon Tan @ 2017-02-17 1:32 UTC (permalink / raw)
To: Yadi Hu, lftan; +Cc: linux-pci, rfi, Bjorn Helgaas
On Jum, 2017-02-17 at 08:27 +0800, Yadi Hu wrote:
> From: "Hu Yadi" <yadi.hu@windriver.com>
>=20
> the driver does not use exactly 'Completion Status' value in TLP,
> these bits should be b15:13 not b14:12.
>=20
> Signed-off-by: Hu Yadi<yadi.hu@windriver.com>
Thanks for the fix.
Acked-by: Ley Foon Tan <ley.foon.tan@intel.com>
> ---
> =C2=A0drivers/pci/host/pcie-altera.c | 2 +-
> =C2=A01 file changed, 1 insertion(+), 1 deletion(-)
>=20
> diff --git a/drivers/pci/host/pcie-altera.c b/drivers/pci/host/pcie-
> altera.c
> index dbac6fb..650862e 100644
> --- a/drivers/pci/host/pcie-altera.c
> +++ b/drivers/pci/host/pcie-altera.c
> @@ -56,7 +56,7 @@
> =C2=A0#define TLP_CFG_DW2(bus, devfn, offset)=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0\
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0(((bus) << 24) | ((devfn) << 1=
6) |
> (offset))
> =C2=A0#define TLP_REQ_ID(bus, devfn)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0(((bus) << 8) | (devfn))
> -#define TLP_COMP_STATUS(s)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0(((s) >> 12) & 7)
> +#define TLP_COMP_STATUS(s)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0(((s) >> 13) & 7)
> =C2=A0#define TLP_HDR_SIZE=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A03
> =C2=A0#define TLP_LOOP=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0500
> =C2=A0#define RP_DEVFN=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A00
> --
> 2.9.3
>=20
>=20
> ________________________________
>=20
> Confidentiality Notice.
> This message may contain information that is confidential or
> otherwise protected from disclosure. If you are not the intended
> recipient, you are hereby notified that any use, disclosure,
> dissemination, distribution, or copying of this message, or any
> attachments, is strictly prohibited. If you have received this
> message in error, please advise the sender by reply e-mail, and
> delete the message and any attachments. Thank you.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] PCI: altera: Fix TLP completion status
2017-02-17 0:27 ` [PATCH] " Yadi Hu
2017-02-17 1:32 ` Ley Foon Tan
@ 2017-02-17 20:26 ` Bjorn Helgaas
1 sibling, 0 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2017-02-17 20:26 UTC (permalink / raw)
To: Yadi Hu; +Cc: lftan, linux-pci, rfi
On Fri, Feb 17, 2017 at 08:27:10AM +0800, Yadi Hu wrote:
> From: "Hu Yadi" <yadi.hu@windriver.com>
>
> the driver does not use exactly 'Completion Status' value in TLP,
> these bits should be b15:13 not b14:12.
>
> Signed-off-by: Hu Yadi<yadi.hu@windriver.com>
Applied with Ley Foon's ack to pci/host-altera for v4.11, thanks.
BTW, the patch was apparently built against an old kernel (pre-v4.9), so it
didn't apply directly. But I applied it by hand.
> ---
> drivers/pci/host/pcie-altera.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/host/pcie-altera.c b/drivers/pci/host/pcie-altera.c
> index dbac6fb..650862e 100644
> --- a/drivers/pci/host/pcie-altera.c
> +++ b/drivers/pci/host/pcie-altera.c
> @@ -56,7 +56,7 @@
> #define TLP_CFG_DW2(bus, devfn, offset) \
> (((bus) << 24) | ((devfn) << 16) | (offset))
> #define TLP_REQ_ID(bus, devfn) (((bus) << 8) | (devfn))
> -#define TLP_COMP_STATUS(s) (((s) >> 12) & 7)
> +#define TLP_COMP_STATUS(s) (((s) >> 13) & 7)
> #define TLP_HDR_SIZE 3
> #define TLP_LOOP 500
> #define RP_DEVFN 0
> --
> 2.9.3
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-02-17 20:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-17 0:27 PCI: altera: Fix TLP completion status Yadi Hu
2017-02-17 0:27 ` [PATCH] " Yadi Hu
2017-02-17 1:32 ` Ley Foon Tan
2017-02-17 20:26 ` 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).