sun4i-emac.c: add dma support
authorConley Lee <conleylee@foxmail.com>
Wed, 29 Dec 2021 01:43:51 +0000 (09:43 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 30 Dec 2021 01:51:36 +0000 (17:51 -0800)
commit47869e82c8b86a4b07eb18d92dbfabe5cc1ed587
treefe450fa0ed3af630123951df1898e18582c7660b
parente2dfb94f27f778e18e47b0c7ff8679099981073d
sun4i-emac.c: add dma support

Thanks for your review. Here is the new version for this patch.

This patch adds support for the emac rx dma present on sun4i. The emac
is able to move packets from rx fifo to RAM by using dma.

Change since v4.
  - rename sbk field to skb
  - rename alloc_emac_dma_req to emac_alloc_dma_req
  - using kzalloc(..., GPF_ATOMIC) in interrupt context to avoid
    sleeping
  - retry by using emac_inblk_32bit when emac_dma_inblk_32bit fails
  - fix some code style issues

Change since v5.
  - fix some code style issue

Signed-off-by: Conley Lee <conleylee@foxmail.com>
Link: https://lore.kernel.org/r/tencent_DE05ADA53D5B084D4605BE6CB11E49EF7408@qq.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/allwinner/sun4i-emac.c