openwrtv3/target/linux/ipq806x/patches-4.9
Thomas Reifferscheid c75f059b0c ipq8064: Fix dwc3 module unloading
Allow module unloading by fixing a mistake.
qcom_dwc3_phy_write_readback() is expecting (phy, offset, mask, value)
while the mistake was calling it with       (phy, offset, value, mask)

The patch is swapping value and mask.

Without the patch unloading the dwc3 module was showing a
write to QSCRATCH failed and repeated module loading was
failing:

root@LEDE:/# rmmod dwc3
[   19.167998] xhci-hcd xhci-hcd.1.auto: remove, state 1
[   19.168084] usb usb4: USB disconnect, device number 1
[   19.173371] xhci-hcd xhci-hcd.1.auto: USB bus 4 deregistered
[   19.177134] xhci-hcd xhci-hcd.1.auto: remove, state 1
[   19.182960] usb usb3: USB disconnect, device number 1
[   19.189023] xhci-hcd xhci-hcd.1.auto: USB bus 3 deregistered
[   19.192989] qcom-dwc3-usb-phy 110f8830.phy: write: 8000000 to QSCRATCH: 0 FAILED
[   19.199064] xhci-hcd xhci-hcd.0.auto: remove, state 1
[   19.205912] usb usb2: USB disconnect, device number 1
[   19.211611] xhci-hcd xhci-hcd.0.auto: USB bus 2 deregistered
[   19.215905] xhci-hcd xhci-hcd.0.auto: remove, state 1
[   19.221751] usb usb1: USB disconnect, device number 1
[   19.227307] xhci-hcd xhci-hcd.0.auto: USB bus 1 deregistered
[   19.231795] qcom-dwc3-usb-phy 100f8830.phy: write: 8000000 to QSCRATCH: 0 FAILED
root@LEDE:/# modprobe dwc3
[   29.583343] phy phy-100f8830.phy.4: phy init failed --> -110
[   29.583399] dwc3 10000000.dwc3: failed to initialize core
[   29.588169] dwc3: probe of 10000000.dwc3 failed with error -110
[   29.652943] phy phy-110f8830.phy.2: phy init failed --> -110
[   29.652988] dwc3 11000000.dwc3: failed to initialize core
[   29.657735] dwc3: probe of 11000000.dwc3 failed with error -110
root@LEDE:/#

With patch repeated module unloading and loading is working good:
root@LEDE:/# rmmod dwc3
[   22.622214] xhci-hcd xhci-hcd.1.auto: remove, state 1
[   22.622298] usb usb4: USB disconnect, device number 1
[   22.627401] xhci-hcd xhci-hcd.1.auto: USB bus 4 deregistered
[   22.631492] xhci-hcd xhci-hcd.1.auto: remove, state 1
[   22.637054] usb usb3: USB disconnect, device number 1
[   22.643721] xhci-hcd xhci-hcd.1.auto: USB bus 3 deregistered
[   22.647421] xhci-hcd xhci-hcd.0.auto: remove, state 1
[   22.652910] usb usb2: USB disconnect, device number 1
[   22.659219] xhci-hcd xhci-hcd.0.auto: USB bus 2 deregistered
[   22.662768] xhci-hcd xhci-hcd.0.auto: remove, state 1
[   22.668604] usb usb1: USB disconnect, device number 1
[   22.674803] xhci-hcd xhci-hcd.0.auto: USB bus 1 deregistered
root@LEDE:/# modprobe dwc3
[   25.404592] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[   25.404694] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[   25.409444] xhci-hcd xhci-hcd.0.auto: hcc params 0x0228f065 hci version 0x100 quirks 0x00010010
[   25.416589] xhci-hcd xhci-hcd.0.auto: irq 168, io mem 0x10000000
[   25.426509] hub 1-0:1.0: USB hub found
[   25.431626] hub 1-0:1.0: 1 port detected
[   25.435472] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[   25.439206] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[   25.444573] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[   25.452926] hub 2-0:1.0: USB hub found
[   25.460420] hub 2-0:1.0: 1 port detected
[   25.525037] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[   25.525099] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 3
[   25.529750] xhci-hcd xhci-hcd.1.auto: hcc params 0x0228f065 hci version 0x100 quirks 0x00010010
[   25.537002] xhci-hcd xhci-hcd.1.auto: irq 169, io mem 0x11000000
[   25.546583] hub 3-0:1.0: USB hub found
[   25.551997] hub 3-0:1.0: 1 port detected
[   25.555734] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[   25.559621] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 4
[   25.564942] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[   25.573063] hub 4-0:1.0: USB hub found
[   25.580842] hub 4-0:1.0: 1 port detected
root@LEDE:/#

Fixes: dwc3 module unloading

Signed-off-by: Thomas Reifferscheid <thomas@reifferscheid.org>
2017-03-28 09:02:38 +02:00
..
0001-dtbindings-qcom_adm-Fix-channel-specifiers.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0002-dmaengine-Add-ADM-driver.patch ipq806x: do not allocate coherent memory in dma engine hotpath 2017-03-13 13:40:56 +01:00
0003-spi-qup-Make-sure-mode-is-only-determined-once.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0004-spi-qup-Fix-transaction-done-signaling.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0005-spi-qup-Fix-DMA-mode-to-work-correctly.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0006-spi-qup-Fix-block-mode-to-work-correctly.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0007-spi-qup-properly-detect-extra-interrupts.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0008-spi-qup-don-t-re-read-opflags-to-see-if-transaction-.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0009-spi-qup-refactor-spi_qup_io_config-in-two-functions.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0010-spi-qup-call-io_config-in-mode-specific-function.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0011-spi-qup-allow-block-mode-to-generate-multiple-transa.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0012-spi-qup-refactor-spi_qup_prep_sg-to-be-more-take-spe.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0013-spi-qup-allow-mulitple-DMA-transactions-per-spi-xfer.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0014-spi-qup-Fix-sg-nents-calculation.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0015-cpufreq-dt-qcom-ipq4019-Add-compat-for-qcom-ipq4019.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0016-clk-ipq4019-report-accurate-fixed-clock-rates.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0017-qcom-ipq4019-add-cpu-operating-points-for-cpufreq-su.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0018-qcom-ipq4019-turn-on-DMA-for-i2c.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0019-qcom-ipq4019-use-correct-clock-for-i2c-bus-0.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0020-qcom-ipq4019-enable-DMA-for-spi.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0022-dts-ipq4019-support-ARMv7-PMU.patch ipq806x: add ipq4019 support 2017-03-22 09:45:18 +01:00
0026-dts-ipq4019-Add-support-for-IPQ4019-DK04-board.patch ipq806x: add ipq4019 support 2017-03-22 09:45:18 +01:00
0027-clk-qcom-Add-support-for-SMD-RPM-Clocks.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0028-clk-qcom-Add-support-for-RPM-Clocks.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0029-clk-qcom-clk-rpm-Fix-clk_hw-references.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0030-clk-Disable-i2c-device-on-gsbi4.patch ipq806x: add ipq806x specific tsens driver 2017-03-27 08:05:10 +02:00
0031-mtd-add-SMEM-parser-for-QCOM-platforms.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0032-phy-add-qcom-dwc3-phy.patch ipq8064: Fix dwc3 module unloading 2017-03-28 09:02:38 +02:00
0033-ARM-qcom-automatically-select-PCI_DOMAINS-if-PCI-is-.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0034-ARM-Add-Krait-L2-register-accessor-functions.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0035-clk-mux-Split-out-register-accessors-for-reuse.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0036-clk-Avoid-sending-high-rates-to-downstream-clocks-du.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0037-clk-Add-safe-switch-hook.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0038-clk-qcom-Add-support-for-High-Frequency-PLLs-HFPLLs.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0039-clk-qcom-Add-HFPLL-driver.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0040-clk-qcom-Add-IPQ806X-s-HFPLLs.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0041-clk-qcom-Add-support-for-Krait-clocks.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0042-clk-qcom-Add-KPSS-ACC-GCC-driver.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0043-clk-qcom-Add-Krait-clock-controller-driver.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0044-clk-qcom-krait-Remove-CLK_IS_ROOT.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0045-cpufreq-Add-module-to-register-cpufreq-on-Krait-CPUs.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0046-cpufreq-qcom-independent-core-clocks.patch kernel: update kernel 4.9 to 4.9.17 2017-03-26 12:23:19 +02:00
0047-mtd-nand-Create-a-BBT-flag-to-access-bad-block-marke.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0048-PM-OPP-HACK-Allow-to-set-regulator-without-opp_list.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0049-PM-OPP-Support-adjusting-OPP-voltages-at-runtime.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0050-OPP-Allow-notifiers-to-call-dev_pm_opp_get_-voltage-.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0051-PM-OPP-Add-a-helper-to-get-an-opp-regulator-for-devi.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0052-PM-OPP-Update-the-voltage-tolerance-when-adjusting-t.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0053-regulator-add-smb208-support.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0054-cpufreq-dt-Handle-OPP-voltage-adjust-events.patch kernel: update kernel 4.9 to 4.9.17 2017-03-26 12:23:19 +02:00
0055-cpufreq-dt-Add-L2-frequency-scaling-support.patch kernel: update kernel 4.9 to 4.9.17 2017-03-26 12:23:19 +02:00
0056-cpufreq-dt-Add-missing-rcu-locks.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0057-clk-qcom-Add-regmap-mux-div-clocks-support.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0058-clk-qcom-Always-add-factor-clock-for-xo-clocks.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0059-ARM-cpuidle-Add-cpuidle-support-for-QCOM-cpus.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0060-HACK-arch-arm-force-ZRELADDR-on-arch-qcom.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0061-mtd-rootfs-conflicts-with-OpenWrt-auto-mounting.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0062-ipq806x-gcc-Added-the-enable-regs-and-mask-for-PRNG.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0063-1-ipq806x-tsens-driver.patch ipq806x: tsens: convert degrees to millicelsius 2017-03-27 08:05:10 +02:00
0063-2-tsens-support-configurable-interrupts.patch ipq806x: add ipq806x specific tsens driver 2017-03-27 08:05:10 +02:00
0064-clk-clk-rpm-fixes.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0065-arm-override-compiler-flags.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0066-GPIO-add-named-gpio-exports.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0067-generic-Mangle-bootloader-s-kernel-arguments.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0068-spi-add-gpio-cs-support.patch ipq806x: clean up patches, port missing patches from 4.4 2017-03-13 13:40:55 +01:00
0069-arm-boot-add-dts-files.patch ipq806x: add ipq4019 support 2017-03-22 09:45:18 +01:00
0070-qcom-spm-fix-probe-order.patch ipq806x: fix crash on 4.9 if the rpm clock probe happens before cpuidle init 2017-03-13 13:40:56 +01:00
0071-pcie-qcom-fixes.patch ipq806x: fix pcie with linux 4.9 2017-03-13 21:10:31 +01:00
0072-ipq-scm-TZ-don-t-need-clock-to-be-enabled-disabled-for-ipq.patch ipq806x: remove scm firmware clocks 2017-03-20 08:11:29 +01:00
0073-pinctrl-qom-use-scm_call-to-route-GPIO-irq-to-Apps.patch ipq806x: route gpio interrupts to APPS processor through scm firmware 2017-03-20 08:11:29 +01:00
104-mtd-nand-add-Winbond-manufacturer-and-chip.patch ipq806x: add ipq4019 support 2017-03-22 09:45:18 +01:00
105-mtd-nor-add-mx25l25635f.patch ipq806x: add ipq4019 support 2017-03-22 09:45:18 +01:00
130-pinctrl-ipq4019-add-pinctrl.patch ipq806x: add ipq4019 support 2017-03-22 09:45:18 +01:00
305-qcom-ipq4019-use-v2-of-the-kpss-bringup-mechanism.patch ipq806x: add ipq4019 support 2017-03-22 09:45:18 +01:00
306-qcom-ipq4019-add-USB-nodes-to-ipq4019-SoC-device-tre.patch ipq806x: add ipq4019 support 2017-03-22 09:45:18 +01:00
307-ARM-qcom-Add-IPQ4019-SoC-support.patch ipq806x: add ipq4019 support 2017-03-22 09:45:18 +01:00
308-dts-ipq4019-add-both-IPQ4019-wifi-block-definitions.patch ipq806x: add ipq4019 support 2017-03-22 09:45:18 +01:00
309-dts-ipq4019-add-pseudo-random-number-generator.patch ipq806x: add ipq4019 support 2017-03-22 09:45:18 +01:00
310-msm-adhoc-bus-support.patch ipq806x: add ipq4019 support 2017-03-22 09:45:18 +01:00
400-mtd-ubi-add-quirk-to-autoload-ubi-on-rt-ac58u.patch ipq806x: add ipq4019 support 2017-03-22 09:45:18 +01:00
605-net-IPQ4019-needs-rfs-vlan_tag-callbacks-in.patch ipq806x: add ipq4019 support 2017-03-22 09:45:18 +01:00
700-net-add-qualcomm-mdio-and-phy.patch ipq806x: add ipq4019 support 2017-03-22 09:45:18 +01:00
701-dts-ipq4019-add-mdio-node.patch ipq806x: add ipq4019 support 2017-03-22 09:45:18 +01:00
702-dts-ipq4019-add-PHY-switch-nodes.patch ipq806x: add ipq4019 support 2017-03-22 09:45:18 +01:00
710-net-add-qualcomm-essedma-ethernet-driver.patch ipq806x: add ipq4019 support 2017-03-22 09:45:18 +01:00
711-dts-ipq4019-add-ethernet-essedma-node.patch ipq806x: add ipq4019 support 2017-03-22 09:45:18 +01:00
820-qcom-ipq4019-Add-IPQ4019-USB-HS-SS-PHY-drivers.patch ipq806x: add ipq4019 support 2017-03-22 09:45:18 +01:00
830-usb-dwc3-register-qca-ipq4019-dwc3-in-dwc3-of-simple.patch ipq806x: add ipq4019 support 2017-03-22 09:45:18 +01:00
850-soc-add-qualcomm-syscon.patch ipq806x: add ipq4019 support 2017-03-22 09:45:18 +01:00