Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

misc: genwqe: Fixes DMA mask setting

Commit 505b08777d78 ("misc: genwqe: Use dma_set_mask_and_coherent to simplify code")
changed the logic in the code.

Instead of a ||, a && should have been used to keep the code the same.

Fixes: 505b08777d78 ("misc: genwqe: Use dma_set_mask_and_coherent to simplify code")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/be49835baa8ba6daba5813b399edf6300f7fdbda.1631130862.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Christophe JAILLET and committed by
Greg Kroah-Hartman
8d753db5 212b5d2d

+1 -1
+1 -1
drivers/misc/genwqe/card_base.c
··· 1090 1090 1091 1091 /* check for 64-bit DMA address supported (DAC) */ 1092 1092 /* check for 32-bit DMA address supported (SAC) */ 1093 - if (dma_set_mask_and_coherent(&pci_dev->dev, DMA_BIT_MASK(64)) || 1093 + if (dma_set_mask_and_coherent(&pci_dev->dev, DMA_BIT_MASK(64)) && 1094 1094 dma_set_mask_and_coherent(&pci_dev->dev, DMA_BIT_MASK(32))) { 1095 1095 dev_err(&pci_dev->dev, 1096 1096 "err: neither DMA32 nor DMA64 supported\n");