How to apply patch for FritzBox 7520 properly

I have a FritzBox 7520 and the xDSL modem is not working with OpenWrt 23.05.4, because of the infamous dc_ep_clk_on failed scenario, when even though the modem reaches vrx518_tc:ptm_showtime_enter: Line[0]: show time enter!! but never gets an IP address.

Based on the previous threads like Avm fb 7530 bridge mode help --> patch needed! - #5 by mojifax.

I have applied the patch of @janh from https://patchwork.ozlabs.org/project/openwrt/patch/20230130224020.473703-1-jan@3e8.eu/.

and the git repo has seemingly the correct status:

HEAD detached at v23.05.4
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzbox-7530.dts

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        target/linux/ipq40xx/patches-5.15/997-pcie-qcom-host-magic.patch

no changes added to commit (use "git add" and/or "git commit -a")

After compiling the image, the appropriate .o file also seems to have the needed changes:

./build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/openwrt-sdk-23.05.4-ipq40xx-generic_gcc-12.3.0_musl_eabi.Linux-x86_64/staging_dir/toolchain-arm_cortex-a7+neon-vfpv4_gcc-12.3.0_musl_eabi/arm-openwrt-linux-muslgnueabi/bin/objdump -CD ./build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/linux-5.15.162/drivers/pci/controller/dwc/pcie-qcom.o | grep magic
Disassembly of section .text.unlikely.qcom_pcie_magic_deinit:
00000000 <qcom_pcie_magic_deinit>:
Disassembly of section .ARM.exidx.text.unlikely.qcom_pcie_magic_deinit:
00000000 <.ARM.exidx.text.unlikely.qcom_pcie_magic_deinit>:

Yet after installing the newly built image with sysupgrade -v ...,
there seems to be no change in the observable behaviour.
Most importantly I never see Applying PCIe host magic with logread | grep magic and the dc_ep_clk_on failed remains in dmesg.

My questions so far:

  1. Is it possible that I have not compiled the image correctly? How do I further verify it?
  2. Is it possible that after the sysupgrade I still don't have tha patched changes? How do I further verify it?
  3. Is it possible that the above patch is not for every model?
  4. Any other ideas what could be the issue?

You need to clean the kernel build after adding a kernel patch.

make target/linux/clean 

And then do a make again

Thanks @kirdes !

I have re-built with:

make target/linux/clean
make -j $(($(nproc)+1))

And this time I have flashed from the web GUI, and now I have finally got the Applying PCIe host magic in logread.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.