openwrt/package
Sergey Ryazanov 7bd579689d kernel: vrx518_tc: fix RX desc phys to virt mapping
It looks like VRX518 returns phys addr of data buffer in the 'data_ptr'
field of the RX descriptor and an actual data offset within the buffer
in the 'byte_off' field. In order to map the phys address back to
virtual we need the original phys address of the allocated buffer.

In the same driver applies offset to phys address before the mapping,
what leads to WARN_ON triggering in plat_mem_virt() function with
subsequent kernel panic:

  WARNING: CPU: 0 PID: 0 at .../sw_plat.c:764 0xbf306cd0 [vrx518_tc@8af9f5d0+0x25000]
  ...
  Unable to handle kernel NULL pointer dereference at virtual address 00000000
  pgd = aff5701e
  [00000000] *pgd=00000000
  Internal error: Oops: 5 [#1] SMP ARM

Noticed in ATM mode, when chip always returns byte_off = 4.

In order to fix the issue, pass the phys address to plat_mem_virt() as
is and apply byte_off later for proper DMA syncing and on mapped virtual
address when copying RXed data into the skb.

Run tested with FRITZ!Box 7530 on both ADSL and VDSL (thanks Jan) links.

Fixes: 474bbe23b7 ("kernel: add Intel/Lantiq VRX518 TC driver")
Tested-by: Jan Hoffmann <jan@3e8.eu> # VDSL link
Reported-and-tested-by: nebibigon93@yandex.ru # ADSL link
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Link: https://patchwork.ozlabs.org/project/openwrt/patch/20250122222654.21833-2-ryazanov.s.a@gmail.com/
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-01-23 20:26:39 +01:00
..
base-files base-files: strip space and tab characters from ASCII mac address 2025-01-04 16:20:46 +01:00
boot uboot-envtools: ipq807x: remove number of blocks and code simplification 2025-01-15 11:25:01 +01:00
devel strace: Update to version 6.12 2025-01-02 20:52:14 +01:00
firmware qualcommax: ipq807x: add support for Linksys HomeWRK 2025-01-15 11:25:01 +01:00
kernel kernel: vrx518_tc: fix RX desc phys to virt mapping 2025-01-23 20:26:39 +01:00
libs libbpf: Update to v1.5.0 2024-12-28 15:41:43 +01:00
network ethtool: update to 6.11 2025-01-19 11:58:06 +01:00
system uci: update to Git HEAD (2025-01-20) 2025-01-20 22:17:23 +01:00
utils fritz-tools: increase PKG_RELEASE 2025-01-20 13:08:38 +01:00
Makefile build: fix filtering of non-upgradable packages 2024-11-21 17:55:45 +01:00