PCI: altera: Fix TLP completion status
the upstream driver does not use exactly 'Completion Status' value in TLP, these bits should be b15:13 not b14:12.
PATCH 1/1 PCI: altera: Fix TLP completion status
From: "Hu Yadi" <[email protected]>
the driver does not use exactly 'Completion Status' value in TLP, these bits should be b15:13 not b14:12.
--- drivers/pci/host/pcie-altera.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/host/pcie-altera.c +1 -1
@@ -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
Signature · 1 line
2.9.3
Quoted 6 lines · Yadi Hu
From: "Hu Yadi" <[email protected]>
=20
the driver does not use exactly 'Completion Status' value in TLP, these bits should be b15:13 not b14:12.
=20Signed-off-by Hu Yadi<[email protected]>
Thanks for the fix.
Quoted 11 lines
---
=C2=A0drivers/pci/host/pcie-altera.c | 2 +- =C2=A01 file changed, 1 insertion(+), 1 deletion(-) =20drivers/pci/host/pcie- renamed from drivers/pci/host/pcie-altera.c +0
-0
altera.c
index dbac6fb..650862e 100644drivers/pci/host/pcie-altera.c +0
-0@@ -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\
Quoted 1 line
=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) |
Quoted 2 lines
(offset))
=C2=A0#defineTLP_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))
Quoted 1 line
-#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)
Quoted 1 line
+#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)
Quoted 1 line
=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
Quoted 1 line
=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
Quoted 1 line
=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
Quoted 14 lines
--
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.
Quoted 6 lines · Yadi Hu
From: "Hu Yadi" <[email protected]>
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<[email protected]>
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.
Quoted 20 lines
--- drivers/pci/host/pcie-altera.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/pci/host/pcie-altera.c +1
-1@@ -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 0Signature · 1 line
2.9.3