Messages in this thread | | | From | Frank Wunderlich <> | Subject | helping with remapping vmem for dma | Date | Wed, 15 Jun 2022 14:11:01 +0200 |
| |
Hi,
i have upported a wifi-driver (mt6625l for armhf) for some time and fall now (at least 5.18) in the "rejecting DMA map of vmalloc memory" error [1].
maybe anybody here can guide me on how to nail it down and maybe fix it.
as far as i have debugged it, it uses dma_map_single [2] to get dma memory from a previous allocated memory region.
this function "kalDevPortRead" in [2] is used via macro HAL_PORT_RD [3] (used in HAL_READ_RX_PORT and HAL_READ_INTR_STATUS in same hal.h file)
HAL_READ_INTR_STATUS is always called with an empty int array as buf which i guess is not the problem. I think the issue is using the use with an preallocated prSDIOCtrl struct (have not completely traced it back where it is allocated).
calls of HAL_PORT_RD/HAL_READ_RX_PORT are in nic{,_rx}.c (with sdio-struct) ([4] as example)
maybe there is a simple way to get an address in preallocated memory as replacement for the dma_map_simple call (and the unmap of course).
regards Frank
[1] https://elixir.bootlin.com/linux/latest/source/include/linux/dma-mapping.h#L327 [2] https://github.com/frank-w/BPI-R2-4.14/blob/5.18-main/drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/hif/ahb/ahb.c#L940 [3] https://github.com/frank-w/BPI-R2-4.14/blob/5.18-main/drivers/misc/mediatek/connectivity/wlan/gen2/include/nic/hal.h#L176 [4] https://github.com/frank-w/BPI-R2-4.14/blob/5.18-main/drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic_rx.c#L3604
| |