diff options
author | Pavel Kubelun <be.dissent@gmail.com> | 2017-12-02 02:26:11 +0300 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2018-01-17 11:02:05 +0100 |
commit | 36a96a449303560395e9566faee58afbfdab745d (patch) | |
tree | 8a4da6d42f07b68e70d5f50579402df35bfad113 /target/linux/ipq806x/patches-4.9/0071-4-PCIE-designware-Fixed-PCI-host-init.patch | |
parent | 3c4df661c0c8d693b5198cbbf61f679c76fdea52 (diff) | |
download | upstream-36a96a449303560395e9566faee58afbfdab745d.tar.gz upstream-36a96a449303560395e9566faee58afbfdab745d.tar.bz2 upstream-36a96a449303560395e9566faee58afbfdab745d.zip |
ipq806x: fix wireless regression
In current state there's huge regression on ipq806x target that causes the device to transmit broken/malformed frames that are not corrected/detected by error control mechanisms and other less severe issues.
https://bugs.lede-project.org/index.php?do=details&task_id=1197
This finally had been narrowed down to patch 0071-pcie-qcom-fixes.patch
Meanwhile QSDK contains a handful of commits that add support for ipq806x to upstream qcom pcie driver
https://source.codeaurora.org/quic/qsdk/oss/kernel/linux-msm/log/drivers/pci/host/pcie-qcom.c?h=eggplant
Unfortunately qca developers do not bother to push it upstream.
Using those commits instead of lede 0071 patch fixes mentioned issue and probably many others as it seems that corrupted data has been originating within pcie misconfiguration.
Fixes: FS#1197 and probably others
Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
Diffstat (limited to 'target/linux/ipq806x/patches-4.9/0071-4-PCIE-designware-Fixed-PCI-host-init.patch')
-rw-r--r-- | target/linux/ipq806x/patches-4.9/0071-4-PCIE-designware-Fixed-PCI-host-init.patch | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/target/linux/ipq806x/patches-4.9/0071-4-PCIE-designware-Fixed-PCI-host-init.patch b/target/linux/ipq806x/patches-4.9/0071-4-PCIE-designware-Fixed-PCI-host-init.patch new file mode 100644 index 0000000000..af9e121f82 --- /dev/null +++ b/target/linux/ipq806x/patches-4.9/0071-4-PCIE-designware-Fixed-PCI-host-init.patch @@ -0,0 +1,68 @@ +From e833cdb5c792912d459773cc23153e5d78875d34 Mon Sep 17 00:00:00 2001 +From: Sham Muthayyan <smuthayy@codeaurora.org> +Date: Tue, 19 Jul 2016 20:05:25 +0530 +Subject: PCIE: designware: Fixed PCI host init + +Change-Id: I949b302d77199fc09342acf26b7bb45a7ec467ee +Signed-off-by: Sham Muthayyan <smuthayy@codeaurora.org> +--- + drivers/pci/host/pcie-designware.c | 9 +++++++-- + drivers/pci/host/pcie-designware.h | 2 +- + drivers/pci/host/pcie-qcom.c | 5 +++-- + 3 files changed, 11 insertions(+), 5 deletions(-) + +--- a/drivers/pci/host/pcie-designware.c ++++ b/drivers/pci/host/pcie-designware.c +@@ -637,8 +637,13 @@ int dw_pcie_host_init(struct pcie_port * + } + } + +- if (pp->ops->host_init) +- pp->ops->host_init(pp); ++ if (pp->ops->host_init) { ++ ret = pp->ops->host_init(pp); ++ if (ret) { ++ dev_err(pp->dev, "hostinit failed\n"); ++ return 0; ++ } ++ } + + pp->root_bus_nr = pp->busn->start; + if (IS_ENABLED(CONFIG_PCI_MSI)) { +--- a/drivers/pci/host/pcie-designware.h ++++ b/drivers/pci/host/pcie-designware.h +@@ -63,7 +63,7 @@ struct pcie_host_ops { + int (*wr_other_conf)(struct pcie_port *pp, struct pci_bus *bus, + unsigned int devfn, int where, int size, u32 val); + int (*link_up)(struct pcie_port *pp); +- void (*host_init)(struct pcie_port *pp); ++ int (*host_init)(struct pcie_port *pp); + void (*msi_set_irq)(struct pcie_port *pp, int irq); + void (*msi_clear_irq)(struct pcie_port *pp, int irq); + phys_addr_t (*get_msi_addr)(struct pcie_port *pp); +--- a/drivers/pci/host/pcie-qcom.c ++++ b/drivers/pci/host/pcie-qcom.c +@@ -515,7 +515,7 @@ static int qcom_pcie_link_up(struct pcie + return !!(val & PCI_EXP_LNKSTA_DLLLA); + } + +-static void qcom_pcie_host_init(struct pcie_port *pp) ++static int qcom_pcie_host_init(struct pcie_port *pp) + { + struct qcom_pcie *pcie = to_qcom_pcie(pp); + int ret; +@@ -541,12 +541,13 @@ static void qcom_pcie_host_init(struct p + if (ret) + goto err; + +- return; ++ return 0; + err: + qcom_ep_reset_assert(pcie); + phy_power_off(pcie->phy); + err_deinit: + pcie->ops->deinit(pcie); ++ return ret; + } + + static int qcom_pcie_rd_own_conf(struct pcie_port *pp, int where, int size, |