On 20/02/2019 15:35, Varun Prakash wrote:
Use && instead of || in if condition as dma_set_mask_and_coherent() returns 0 on success.
Fixes: c22b332d811b ("scsi: csiostor: switch to generic DMA API") Cc: stable@vger.kernel.org Cc: Christoph Hellwig hch@lst.de Signed-off-by: Varun Prakash varun@chelsio.com
drivers/scsi/csiostor/csio_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/csiostor/csio_init.c b/drivers/scsi/csiostor/csio_init.c index cf629380a981..e7ad7b1a0440 100644 --- a/drivers/scsi/csiostor/csio_init.c +++ b/drivers/scsi/csiostor/csio_init.c @@ -210,7 +210,7 @@ csio_pci_init(struct pci_dev *pdev, int *bars) pci_set_master(pdev); pci_try_set_mwi(pdev);
- if (dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)) ||
- if (dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)) && dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32))) { dev_err(&pdev->dev, "No suitable DMA available.\n"); goto err_release_regions;
I think Hannes already sent a fix for this: https://marc.info/?l=linux-scsi&m=155047528202096&w=2
Thanks