PCI: pciehp: Add quirk for QDF2400 Command Completed erratum
Subsystems (3)
PATCH 1/1 PCI: pciehp: Add quirk for QDF2400 Command Completed erratum
The QDF2400 controller does not set the Command Completed bit unless writes to the Slot Command register change "Control" bits. Command Completed is never set for writes that only change software notification "Enable" bits. This results in timeouts like this:
pciehp 0000:00:00.0:pcie004: Timeout on hotplug command 0x1038
--- drivers/pci/hotplug/pciehp_hpc.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/pci/hotplug/pciehp_hpc.c +6 -0
@@ -914,3 +914,9 @@ static void quirk_cmd_compl(struct pci_dev *pdev) }DECLARE_PCI_FIXUP_CLASS_EARLY (PCI_VENDOR_ID_INTEL ,PCI_ANY_ID ,PCI_CLASS_BRIDGE_PCI ,8 , quirk_cmd_compl); + +DECLARE_PCI_FIXUP_CLASS_EARLY (0x17cb ,0x400 , +PCI_CLASS_BRIDGE_PCI ,8 , quirk_cmd_compl); + +DECLARE_PCI_FIXUP_CLASS_EARLY (0x17cb ,0x401 , +PCI_CLASS_BRIDGE_PCI ,8 , quirk_cmd_compl);
Signature · 1 line
2.7.4
Quoted 9 lines · Sinan Kaya
The QDF2400 controller does not set the Command Completed bit unless writes to the Slot Command register change "Control" bits. Command Completed is never set for writes that only change software notification "Enable" bits. This results in timeouts like this:
pciehp 0000:00:00.0:pcie004: Timeout on hotplug command
0x1038Cc stable at vger.kernel.orgSigned-off-by Sinan Kaya <[email protected]>
Quoted 9 lines · Sinan Kaya
The QDF2400 controller does not set the Command Completed bit unless writes to the Slot Command register change "Control" bits. Command Completed is never set for writes that only change software notification "Enable" bits. This results in timeouts like this:
pciehp 0000:00:00.0:pcie004: Timeout on hotplug command
0x1038Cc stable at vger.kernel.orgSigned-off-by Sinan Kaya <[email protected]>
Since there's no bisection benefit for keeping these separate, I folded this into the original quirk and added Mika's reviewed-by.
I also added the following ID patch and used PCI_VENDOR_ID_QCOM:
commit 333c8c1216c1e7ead6af7b3d667b43eb425b5034
Author: Bjorn Helgaas <[email protected]> Date: Mon May 7 15:52:55 2018 -0500
PCI: Add Qualcomm vendor ID
Add the Qualcomm vendor ID to pci_ids.h and use it in quirks.
drivers/pci/quirks.c +2 -2
@@ -4361,8 +4361,8 @@ static const struct pci_dev_acs_enabled { { PCI_VENDOR_ID_INTEL, 0x15b7, pci_quirk_mf_endpoint_acs }, { PCI_VENDOR_ID_INTEL, 0x15b8, pci_quirk_mf_endpoint_acs },/* QCOM QDF2xxx root ports */ - { 0x17cb, 0x400, pci_quirk_qcom_rp_acs }, - { 0x17cb, 0x401, pci_quirk_qcom_rp_acs }, + { PCI_VENDOR_ID_QCOM, 0x0400, pci_quirk_qcom_rp_acs }, + { PCI_VENDOR_ID_QCOM, 0x0401, pci_quirk_qcom_rp_acs },/* Intel PCH root ports */ { PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_quirk_intel_pch_acs }, { PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_quirk_intel_spt_pch_acs },
include/linux/pci_ids.h +2 -0
@@ -2387,6 +2387,8 @@#define PCI_VENDOR_ID_LENOVO 0x17aa +#define PCI_VENDOR_ID_QCOM 0x17cb +#define PCI_VENDOR_ID_CDNS 0x17cd#define PCI_VENDOR_ID_ARECA 0x17d3
Quoted 26 lines
--- drivers/pci/hotplug/pciehp_hpc.c | 6 ++++++ 1 file changed, 6 insertions(+)drivers/pci/hotplug/pciehp_hpc.c +6
-0@@ -914,3 +914,9 @@ static void quirk_cmd_compl(struct pci_dev *pdev) }DECLARE_PCI_FIXUP_CLASS_EARLY (PCI_VENDOR_ID_INTEL ,PCI_ANY_ID ,PCI_CLASS_BRIDGE_PCI ,8 , quirk_cmd_compl); + +DECLARE_PCI_FIXUP_CLASS_EARLY (0x17cb ,0x400 , +PCI_CLASS_BRIDGE_PCI ,8 , quirk_cmd_compl); + +DECLARE_PCI_FIXUP_CLASS_EARLY (0x17cb ,0x401 , +PCI_CLASS_BRIDGE_PCI ,8 , quirk_cmd_compl);Signature · 7 lines
2.7.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 9 lines · Bjorn Helgaas
Quoted 8 lines · Sinan Kaya
The QDF2400 controller does not set the Command Completed bit unless writes to the Slot Command register change "Control" bits. Command Completed is never set for writes that only change software notification
"Enable" bits. This results in timeouts like this:pciehp 0000:00:00.0:pcie004: Timeout on hotplug command
0x1038
Quoted 7 lines
Quoted 2 lines
Cc stable at vger.kernel.orgSigned-off-by Sinan Kaya <[email protected]>Since there's no bisection benefit for keeping these separate, I folded this into the original quirk and added Mika's reviewed-by.
I also added the following ID patch and used
PCI_VENDOR_ID_QCOM:
Thanks for the clean up.
Quoted 67 lines
commit
333c8c1216c1e7ead6af7b3d667b43eb425b5034Author: Bjorn Helgaas <[email protected]> Date: Mon May 7 15:52:55 2018 -0500PCI: Add Qualcomm vendor ID
Add the Qualcomm vendor ID to
pci_ids.hand use it in quirks.Signed-off-by Bjorn Helgaas <[email protected]>drivers/pci/quirks.c +2
-2@@ -4361,8 +4361,8 @@ static const struct pci_dev_acs_enabled { { PCI_VENDOR_ID_INTEL, 0x15b7, pci_quirk_mf_endpoint_acs }, { PCI_VENDOR_ID_INTEL, 0x15b8, pci_quirk_mf_endpoint_acs },/* QCOM QDF2xxx root ports */ - { 0x17cb, 0x400, pci_quirk_qcom_rp_acs }, - { 0x17cb, 0x401, pci_quirk_qcom_rp_acs }, + { PCI_VENDOR_ID_QCOM, 0x0400, pci_quirk_qcom_rp_acs }, + { PCI_VENDOR_ID_QCOM, 0x0401, pci_quirk_qcom_rp_acs },/* Intel PCH root ports */ { PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_quirk_intel_pch_acs }, { PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_quirk_intel_spt_pch_acs },include/linux/pci_ids.h +2
-0@@ -2387,6 +2387,8 @@#define PCI_VENDOR_ID_LENOVO 0x17aa +#define PCI_VENDOR_ID_QCOM 0x17cb +#define PCI_VENDOR_ID_CDNS 0x17cd#define PCI_VENDOR_ID_ARECA 0x17d3Quoted 28 lines
--- drivers/pci/hotplug/pciehp_hpc.c | 6 ++++++ 1 file changed, 6 insertions(+)drivers/pci/hotplug/pciehp_hpc.c +6
-1@@ -914,3 +914,9 @@ static void quirk_cmd_compl(struct pci_dev *pdev) }DECLARE_PCI_FIXUP_CLASS_EARLY (PCI_VENDOR_ID_INTEL ,PCI_ANY_ID ,PCI_CLASS_BRIDGE_PCI ,8 , quirk_cmd_compl); + +DECLARE_PCI_FIXUP_CLASS_EARLY (0x17cb ,0x400 , +PCI_CLASS_BRIDGE_PCI ,8 , quirk_cmd_compl); + +DECLARE_PCI_FIXUP_CLASS_EARLY (0x17cb ,0x401 , +PCI_CLASS_BRIDGE_PCI ,8 , quirk_cmd_compl); --2.7.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel