developer | d0c8945 | 2024-10-11 16:53:27 +0800 | [diff] [blame^] | 1 | From 8509256a66d237ebf813fc1ddd9d2a913465c02b Mon Sep 17 00:00:00 2001 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 2 | From: "sujuan.chen" <sujuan.chen@mediatek.com> |
| 3 | Date: Thu, 20 Jul 2023 10:25:50 +0800 |
developer | d0c8945 | 2024-10-11 16:53:27 +0800 | [diff] [blame^] | 4 | Subject: [PATCH 057/223] mtk: mt76: mt7996: add dma mask limitation |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 5 | |
| 6 | Signed-off-by: sujuan.chen <sujuan.chen@mediatek.com> |
| 7 | --- |
| 8 | dma.c | 4 ++-- |
| 9 | wed.c | 4 ++-- |
| 10 | 2 files changed, 4 insertions(+), 4 deletions(-) |
| 11 | |
| 12 | diff --git a/dma.c b/dma.c |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame] | 13 | index 1021b3e5..da21f641 100644 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 14 | --- a/dma.c |
| 15 | +++ b/dma.c |
| 16 | @@ -488,7 +488,7 @@ mt76_dma_get_buf(struct mt76_dev *dev, struct mt76_queue *q, int idx, |
| 17 | } else { |
| 18 | struct mt76_queue_buf qbuf; |
| 19 | |
| 20 | - buf = page_frag_alloc(&q->rx_page, q->buf_size, GFP_ATOMIC); |
| 21 | + buf = page_frag_alloc(&q->rx_page, q->buf_size, GFP_ATOMIC | GFP_DMA32); |
| 22 | if (!buf) |
| 23 | return NULL; |
| 24 | |
| 25 | @@ -711,7 +711,7 @@ int mt76_dma_rx_fill(struct mt76_dev *dev, struct mt76_queue *q, |
| 26 | if (mt76_queue_is_wed_rro_ind(q)) |
| 27 | goto done; |
| 28 | |
| 29 | - buf = page_frag_alloc(&q->rx_page, q->buf_size, GFP_ATOMIC); |
| 30 | + buf = page_frag_alloc(&q->rx_page, q->buf_size, GFP_ATOMIC | GFP_DMA32); |
| 31 | if (!buf) |
| 32 | break; |
| 33 | |
| 34 | diff --git a/wed.c b/wed.c |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame] | 35 | index 0a0b5c05..1c6d53c8 100644 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 36 | --- a/wed.c |
| 37 | +++ b/wed.c |
| 38 | @@ -65,14 +65,14 @@ u32 mt76_wed_init_rx_buf(struct mtk_wed_device *wed, int size) |
| 39 | for (i = 0; i < size; i++) { |
| 40 | struct mt76_rxwi_cache *r = mt76_get_rxwi(dev); |
| 41 | dma_addr_t addr; |
| 42 | - struct page *page; |
| 43 | int token; |
| 44 | void *ptr; |
| 45 | |
| 46 | if (!r) |
| 47 | goto unmap; |
| 48 | |
| 49 | - ptr = page_frag_alloc(&wed->rx_buf_ring.rx_page, length, GFP_ATOMIC); |
| 50 | + ptr = page_frag_alloc(&wed->rx_buf_ring.rx_page, length, |
| 51 | + GFP_ATOMIC | GFP_DMA32); |
| 52 | if (!ptr) { |
| 53 | mt76_put_rxwi(dev, r); |
| 54 | goto unmap; |
| 55 | -- |
developer | d0c8945 | 2024-10-11 16:53:27 +0800 | [diff] [blame^] | 56 | 2.45.2 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 57 | |