OpenCloudOS-Kernel/drivers/net/ethernet/sun
Christophe JAILLET 584c61cedb sun/cassini: Use dma_set_mask_and_coherent() and simplify code
Use dma_set_mask_and_coherent() instead of unrolling it with some
dma_set_mask()+dma_set_coherent_mask().

Moreover, as stated in [1], dma_set_mask() with a 64-bit mask will never
fail if dev->dma_mask is non-NULL.
So, if it fails, the 32 bits case will also fail for the same reason.

That said, 'pci_using_dac' can only be 1 after a successful
dma_set_mask_and_coherent().

Simplify code and remove some dead code accordingly.

[1]: https://lkml.org/lkml/2021/6/7/398

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-01-02 16:14:30 +00:00
..
Kconfig net: sun: SUNVNET_COMMON should depend on INET 2021-09-28 13:20:21 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cassini.c sun/cassini: Use dma_set_mask_and_coherent() and simplify code 2022-01-02 16:14:30 +00:00
cassini.h net: sun: cassini: Cleanup license conflict 2019-01-22 11:22:07 -08:00
ldmvsw.c ethernet: sun: add missing semicolon, fix build 2021-10-11 07:34:04 -07:00
niu.c ethernet: sun: remove direct netdev->dev_addr writes 2021-10-09 11:46:57 +01:00
niu.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sunbmac.c ethernet: replace netdev->dev_addr assignment loops 2021-10-14 09:22:25 -07:00
sunbmac.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sungem.c ethernet: sun: remove direct netdev->dev_addr writes 2021-10-09 11:46:57 +01:00
sungem.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sunhme.c ethernet: sun: remove direct netdev->dev_addr writes 2021-10-09 11:46:57 +01:00
sunhme.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sunqe.c ethernet: constify references to netdev->dev_addr in drivers 2021-10-14 09:22:11 -07:00
sunqe.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sunvnet.c ethernet: use eth_hw_addr_set() in unmaintained drivers 2021-10-18 13:20:38 +01:00
sunvnet_common.c skb_copy_and_csum_bits(): don't bother with the last argument 2020-08-20 15:45:13 -04:00
sunvnet_common.h netdev: pass the stuck queue to the timeout handler 2019-12-12 21:38:57 -08:00