Ivan Vecera
2e7d3b6763
net: atlantic: Fix DMA mapping for PTP hwts ring
Function aq_ring_hwts_rx_alloc() maps extra AQ_CFG_RXDS_DEF bytes
for PTP HWTS ring but then generic aq_ring_free() does not take this
into account.
Create and use a specific function to free HWTS ring to fix this
issue.
Trace:
[ 215.351607] ------------[ cut here ]------------
[ 215.351612] DMA-API: atlantic 0000:4b:00.0: device driver frees DMA memory with different size [device address=0x00000000fbdd0000] [map size=34816 bytes] [unmap size=32768 bytes]
[ 215.351635] WARNING: CPU: 33 PID: 10759 at kernel/dma/debug.c:988 check_unmap+0xa6f/0x2360
...
[ 215.581176] Call Trace:
[ 215.583632] <TASK>
[ 215.585745] ? show_trace_log_lvl+0x1c4/0x2df
[ 215.590114] ? show_trace_log_lvl+0x1c4/0x2df
[ 215.594497] ? debug_dma_free_coherent+0x196/0x210
[ 215.599305] ? check_unmap+0xa6f/0x2360
[ 215.603147] ? __warn+0xca/0x1d0
[ 215.606391] ? check_unmap+0xa6f/0x2360
[ 215.610237] ? report_bug+0x1ef/0x370
[ 215.613921] ? handle_bug+0x3c/0x70
[ 215.617423] ? exc_invalid_op+0x14/0x50
[ 215.621269] ? asm_exc_invalid_op+0x16/0x20
[ 215.625480] ? check_unmap+0xa6f/0x2360
[ 215.629331] ? mark_lock.part.0+0xca/0xa40
[ 215.633445] debug_dma_free_coherent+0x196/0x210
[ 215.638079] ? __pfx_debug_dma_free_coherent+0x10/0x10
[ 215.643242] ? slab_free_freelist_hook+0x11d/0x1d0
[ 215.648060] dma_free_attrs+0x6d/0x130
[ 215.651834] aq_ring_free+0x193/0x290 [atlantic]
[ 215.656487] aq_ptp_ring_free+0x67/0x110 [atlantic]
...
[ 216.127540] ---[ end trace 6467e5964dd2640b ]---
[ 216.132160] DMA-API: Mapped at:
[ 216.132162] debug_dma_alloc_coherent+0x66/0x2f0
[ 216.132165] dma_alloc_attrs+0xf5/0x1b0
[ 216.132168] aq_ring_hwts_rx_alloc+0x150/0x1f0 [atlantic]
[ 216.132193] aq_ptp_ring_alloc+0x1bb/0x540 [atlantic]
[ 216.132213] aq_nic_init+0x4a1/0x760 [atlantic]
Fixes: 94ad94558b ("net: aquantia: add PTP rings infrastructure")
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Link: https://lore.kernel.org/r/20240201094752.883026-1-ivecera@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-02-02 20:47:05 -08:00
..
2024-01-25 10:17:37 +01:00
2024-01-18 16:22:43 -08:00
2024-01-17 16:47:17 -08:00
2024-01-25 16:59:09 +01:00
2024-01-05 08:04:23 -08:00
2024-01-12 11:32:19 -08:00
2024-01-18 17:25:39 -08:00
2024-01-26 15:19:43 -08:00
2024-01-18 11:43:55 -08:00
2024-01-17 16:47:17 -08:00
2024-01-04 17:01:14 +01:00
2024-01-18 11:37:24 -08:00
2024-01-19 08:17:28 -06:00
2023-12-27 15:37:11 +01:00
2024-01-04 18:06:46 -08:00
2024-01-22 20:35:58 +01:00
2023-12-29 18:08:18 +01:00
2024-01-26 16:35:55 +08:00
2024-01-24 21:03:03 -08:00
2024-01-10 08:45:22 -08:00
2024-01-20 15:03:25 -08:00
2024-01-22 11:01:11 +00:00
2024-01-18 09:48:40 -08:00
2024-02-01 20:53:18 +09:00
2024-01-26 13:52:18 -08:00
2024-01-17 16:47:17 -08:00
2024-01-18 11:37:24 -08:00
2024-01-22 11:38:08 +01:00
2024-01-27 04:12:21 +10:00
2024-01-18 11:37:24 -08:00
2024-01-31 10:27:08 +01:00
2024-01-14 07:44:38 -08:00
2024-01-18 17:29:01 -08:00
2024-01-08 00:51:36 +01:00
2024-01-09 16:32:11 -08:00
2024-01-18 11:37:24 -08:00
2024-01-12 13:52:21 -08:00
2024-01-18 17:21:35 -08:00
2024-01-17 16:47:17 -08:00
2024-01-18 15:28:15 -08:00
2024-01-18 11:37:24 -08:00
2024-01-10 16:43:55 -08:00
2024-01-17 15:25:27 -08:00
2024-01-17 15:39:32 -08:00
2024-01-24 22:58:00 -08:00
2024-01-24 17:27:51 +01:00
2024-01-18 15:16:57 -08:00
2024-01-18 11:37:24 -08:00
2024-01-18 17:29:01 -08:00
2024-01-18 11:37:24 -08:00
2024-01-17 10:27:13 -08:00
2024-01-04 17:01:14 +01:00
2024-02-02 20:47:05 -08:00
2024-01-03 13:33:59 +01:00
2024-01-18 16:44:03 -08:00
2024-01-18 18:22:40 -08:00
2024-01-17 16:47:17 -08:00
2024-01-18 15:16:57 -08:00
2024-01-05 15:55:41 +05:30
2024-01-07 22:59:16 +01:00
2024-01-18 16:22:43 -08:00
2024-01-09 16:12:44 -08:00
2024-01-18 17:11:43 -08:00
2024-01-17 15:55:33 -08:00
2024-01-26 20:21:47 +01:00
2024-01-18 09:48:40 -08:00
2024-01-17 14:37:40 -08:00
2024-01-19 01:03:17 +01:00
2024-01-04 18:06:46 -08:00
2024-01-12 18:25:05 +01:00
2024-01-30 15:27:16 +00:00
2024-01-11 11:31:46 -08:00
2024-01-18 01:05:33 +01:00
2024-01-18 14:11:25 -08:00
2024-01-23 21:27:28 -05:00
2024-01-04 14:37:17 +01:00
2024-01-30 11:34:49 -08:00
2024-01-18 17:08:31 -08:00
2024-01-30 15:27:21 +00:00
2024-01-18 17:29:01 -08:00
2024-01-20 09:42:32 -08:00
2024-01-11 19:46:52 -08:00
2024-01-22 11:59:22 +01:00
2024-01-18 11:43:55 -08:00
2024-01-20 11:06:04 -08:00
2024-01-20 09:42:32 -08:00
2024-01-04 17:03:47 +01:00
2024-01-18 11:43:55 -08:00
2024-01-18 16:44:03 -08:00
2024-01-18 15:57:25 -08:00
2024-01-18 16:44:03 -08:00
2024-01-23 09:13:24 +01:00
2024-01-17 16:47:17 -08:00
2024-01-18 16:44:03 -08:00
2024-01-12 13:32:30 -08:00
2024-01-17 13:41:38 -08:00
2024-01-12 12:38:37 +01:00