OSDN Git Service

vmxnet3: Remove useless DMA-32 fallback configuration
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 9 Jan 2022 08:50:22 +0000 (09:50 +0100)
committerJakub Kicinski <kuba@kernel.org>
Mon, 10 Jan 2022 00:52:19 +0000 (16:52 -0800)
commitc38f30683956722b2de31f026e73c8622a2fade3
tree5d3e4759677dc00eeb52397e7ae4a6c2e77a1b9e
parent9aaa82d2e8d5d39472aebef5d3fcf033421b645f
vmxnet3: Remove useless DMA-32 fallback configuration

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

So if dma_set_mask_and_coherent() succeeds, 'dma64' is know to be 'true'.

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>
Link: https://lore.kernel.org/r/43e5dcf1a5e9e9c5d2d86f87810d6e93e3d22e32.1641718188.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/vmxnet3/vmxnet3_drv.c