openwrt-6.x/package/kernel
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
..
ath10k-ct ath10k-ct: select mac80211 debugfs support 2024-10-06 23:19:38 +02:00
bcm27xx-gpu-fw bcm27xx-gpu-fw: update to v1.20241126 2024-12-28 18:50:36 +01:00
bcm63xx-cfe bcm63xx-cfe: update to latest version 2024-06-26 19:26:34 +02:00
bpf-headers bpf-headers: update to version 6.6 2024-09-20 23:17:43 +02:00
button-hotplug
cryptodev-linux cryptodev-linux: change home-page URL 2024-11-12 14:28:36 +01:00
dtc/patches
gpio-button-hotplug treewide: remove THIS_MODULE assignment 2024-11-10 02:16:31 +01:00
gpio-nct5104d treewide: remove THIS_MODULE assignment 2024-11-10 02:16:31 +01:00
lantiq kernel: vrx518_tc: fix RX desc phys to virt mapping 2025-01-23 20:26:39 +01:00
leds-gca230718 kernel: leds-gca230718: remove _remove 2024-12-24 00:23:35 +01:00
leds-ws2812b kernel: ws2812b: use devm for mutex_init 2024-10-06 12:21:51 +02:00
linux kernel: add missing symbols for lxc 2025-01-21 00:10:12 +01:00
mac80211 mac80211: Fix tracing backport 2025-01-19 11:21:19 +01:00
mt76 mt76: update to Git HEAD (2025-01-22) 2025-01-23 11:37:20 +01:00
mt7621-qtn-rgmii treewide: rename ZyXEL to Zyxel 2024-08-25 15:08:25 +02:00
mwlwifi mwlwifi: fix compilation with 6.6 and 64-bit 2024-10-19 18:57:50 +02:00
nat46 treewide: update PKG_MIRROR_HASH to zst 2024-04-06 11:24:18 +02:00
qca-nss-dp kernel: qca-nss-dp: add back printing attached PHY-s 2024-05-21 12:29:33 +02:00
qca-ssdk kernel: qca-ssdk: set OF node for the SFP PHY 2024-07-09 12:33:17 +02:00
r8101 kernel: r8101: print link status when link up 2024-08-18 19:31:55 +02:00
r8125 kernel: r8125: update to v9.014.01 2024-11-06 11:41:20 +01:00
r8126 kernel: r8126: update to v10.014.01 2024-11-05 00:33:02 +01:00
r8168 kernel: r8168: refresh patch 2024-11-05 14:01:06 +01:00
rtc-rv5c386a
rtl8812au-ct rtl8812au-ct: fix build with mac80211 6.9.9 backport 2024-07-13 14:25:36 +02:00
trelay
ubnt-ledbar ubnt-ledbar: fix compilation error 2024-10-08 22:24:54 +02:00
ubootenv-nvram treewide: remove THIS_MODULE assignment 2024-11-10 02:16:31 +01:00