]> git.baikalelectronics.ru Git - kernel.git/commit
net: ethernet: mtk-star-emac: fix wrong unmap in RX handling
authorBiao Huang <biao.huang@mediatek.com>
Tue, 2 Mar 2021 03:33:23 +0000 (11:33 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 2 Mar 2021 23:28:07 +0000 (15:28 -0800)
commit9671367d0c1bbb932e0e6940d450b4aeda6ce43b
tree59b213d1b4fdafa3426ed56e1fcfe12aeab58656
parent0c6ccbce77fbf1db2d2c8a60b66470de33d3db38
net: ethernet: mtk-star-emac: fix wrong unmap in RX handling

mtk_star_dma_unmap_rx() should unmap the dma_addr of old skb rather than
that of new skb.
Assign new_dma_addr to desc_data.dma_addr after all handling of old skb
ends to avoid unexpected receive side error.

Fixes: e6d12adefa6c ("net: ethernet: mtk-star-emac: fix error path in RX handling")
Signed-off-by: Biao Huang <biao.huang@mediatek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mediatek/mtk_star_emac.c