1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-10-19 14:08:17 +02:00
openwrt/target/linux
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
..
adm5120
adm8668
apm821xx kernel: update kernel 4.4 to 4.4.53 2017-03-12 15:46:02 +01:00
ar7 ar7: diag.sh: use common status_led_* functions 2017-03-15 23:14:54 +01:00
ar71xx ar71xx: wpj531: fix GPIOs for LED 2017-03-27 08:36:32 +02:00
arc770 arc770: only calculate entry point address when necessary 2017-02-21 16:10:30 +01:00
archs38 archs38: only calculate entry point address when necessary 2017-02-21 16:10:32 +01:00
arm64
armvirt
at91
ath25
au1000
bcm53xx bcm53xx: put kernel into TRX when building initramfs images 2017-03-27 10:41:36 +02:00
brcm47xx kernel: update kernel 4.4 to 4.4.53 2017-03-12 15:46:02 +01:00
brcm63xx brcm63xx: diag.sh: use common status_led_blink_* functions 2017-03-15 23:15:19 +01:00
brcm2708 kernel: update kernel 4.9 to 4.9.17 2017-03-26 12:23:19 +02:00
cns3xxx kernel: update kernel 4.9 to 4.9.17 2017-03-26 12:23:19 +02:00
gemini
generic kernel: add arm64 erratums into config 2017-03-26 19:20:33 +02:00
imx6 imx6: add DSA driver for MV88E6176 switch 2017-03-12 15:06:52 +01:00
ipq806x ipq8064: Fix dwc3 module unloading 2017-03-28 09:02:38 +02:00
ixp4xx kernel: update kernel 4.4 to 4.4.53 2017-03-12 15:46:02 +01:00
kirkwood kirkwood: fix include in etc/board.d/02_network 2017-02-28 23:46:02 +01:00
lantiq lantiq: update spi driver to upstream version 2017-03-26 15:58:17 +02:00
layerscape kernel: update kernel 4.4 to 4.4.52 2017-03-03 18:17:47 +01:00
malta malta: restore "be" subtarget from being source-only 2017-03-05 16:34:17 +01:00
mcs814x kernel: remove kmod packages for bridge, stp, llc and 8021q 2017-02-09 14:49:34 +01:00
mediatek kernel: update kernel 4.9 to 4.9.17 2017-03-26 12:23:19 +02:00
mpc85xx
mvebu kernel: update kernel 4.9 to 4.9.17 2017-03-26 12:23:19 +02:00
mxs mxs: enable nvmem support 2017-02-10 11:05:57 +01:00
octeon octeon: only copy sysupgrade file if present 2017-02-15 06:36:21 +01:00
omap
omap24xx
orion kernel: split up 980-arm_openwrt_machtypes.patch and move to target folders 2017-01-27 11:18:27 +01:00
oxnas oxnas: put u-boot images into image staging directory 2017-01-27 16:53:31 +01:00
pistachio kernel: update kernel 4.9 to 4.9.17 2017-03-26 12:23:19 +02:00
ppc40x
ppc44x
ramips ramips: fix pcie irq mapping for mt7621 on v4.9 2017-03-28 08:50:13 +02:00
rb532
sunxi build: get rid of host.mk 2017-02-26 13:31:44 +01:00
uml build: get rid of host.mk 2017-02-26 13:31:44 +01:00
x86 x86: enable ACPI support for the Geode subtarget 2017-03-22 11:51:24 +01:00
xburst kernel: remove kmod packages for bridge, stp, llc and 8021q 2017-02-09 14:49:34 +01:00
zynq build: get rid of host.mk 2017-02-26 13:31:44 +01:00
Makefile