]> git.baikalelectronics.ru Git - kernel.git/commit
net: moxa: pass pdev instead of ndev to DMA functions
authorSergei Antonov <saproj@gmail.com>
Fri, 12 Aug 2022 17:13:39 +0000 (20:13 +0300)
committerJakub Kicinski <kuba@kernel.org>
Tue, 16 Aug 2022 02:54:27 +0000 (19:54 -0700)
commit89d2682afbf9a256820c0d46565ad6ba5cef0e62
tree4c814e6f26b82ac863d71db6e86593fad3caecd1
parent6ad92709df3d72b3db944fa86a8f5df1ed9c8a49
net: moxa: pass pdev instead of ndev to DMA functions

dma_map_single() calls fail in moxart_mac_setup_desc_ring() and
moxart_mac_start_xmit() which leads to an incessant output of this:

[   16.043925] moxart-ethernet 92000000.mac eth0: DMA mapping error
[   16.050957] moxart-ethernet 92000000.mac eth0: DMA mapping error
[   16.058229] moxart-ethernet 92000000.mac eth0: DMA mapping error

Passing pdev to DMA is a common approach among net drivers.

Fixes: db202486f4cf ("net: Add MOXA ART SoCs ethernet driver")
Signed-off-by: Sergei Antonov <saproj@gmail.com>
Suggested-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20220812171339.2271788-1-saproj@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/moxa/moxart_ether.c