diff options
author | Alexander Lobakin <[email protected]> | 2024-05-09 16:46:16 +0200 |
---|---|---|
committer | Christoph Hellwig <[email protected]> | 2024-05-09 19:00:29 +0200 |
commit | a6016aac5252da9d22a4dc0b98121b0acdf6d2f5 (patch) | |
tree | 3c77ee2d2df0c886af162b6d85f6d562c3d6b1b7 /drivers/net/ethernet/intel/igc/igc_main.c | |
parent | 163943ac00cb31ac1a88ce5f78a7e2ead37329ec (diff) |
dma: fix DMA sync for drivers not calling dma_set_mask*()
There are several reports that the DMA sync shortcut broke non-coherent
devices.
dev->dma_need_sync is false after the &device allocation and if a driver
didn't call dma_set_mask*(), it will still be false even if the device
is not DMA-coherent and thus needs synchronizing. Due to historical
reasons, there's still a lot of drivers not calling it.
Invert the boolean, so that the sync will be performed by default and
the shortcut will be enabled only when calling dma_set_mask*().
Reported-by: Steven Price <[email protected]>
Closes: https://lore.kernel.org/lkml/[email protected]
Reported-by: Marek Szyprowski <[email protected]>
Closes: https://lore.kernel.org/lkml/[email protected]
Fixes: f406c8e4b770. ("dma: avoid redundant calls for sync operations")
Signed-off-by: Alexander Lobakin <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
Tested-by: Steven Price <[email protected]>
Tested-by: Marek Szyprowski <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/igc/igc_main.c')
0 files changed, 0 insertions, 0 deletions