crypto: qat - set DMA mask to 48 bits for Gen2
authorGiovanni Cabiddu <giovanni.cabiddu@intel.com>
Thu, 12 Aug 2021 08:18:14 +0000 (09:18 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 21 Aug 2021 07:44:54 +0000 (15:44 +0800)
Change the DMA mask from 64 to 48 for Gen2 devices as they cannot handle
addresses greater than 48 bits.

Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/qat/qat_c3xxx/adf_drv.c
drivers/crypto/qat/qat_c3xxxvf/adf_drv.c
drivers/crypto/qat/qat_c62x/adf_drv.c
drivers/crypto/qat/qat_c62xvf/adf_drv.c
drivers/crypto/qat/qat_dh895xcc/adf_drv.c
drivers/crypto/qat/qat_dh895xccvf/adf_drv.c

index b561851..2df2664 100644 (file)
@@ -159,7 +159,7 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        }
 
        /* set dma identifier */
-       ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
+       ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(48));
        if (ret) {
                dev_err(&pdev->dev, "No usable DMA configuration\n");
                goto out_err_disable;
index 5095ee3..7ef5a51 100644 (file)
@@ -141,7 +141,7 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        }
 
        /* set dma identifier */
-       ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
+       ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(48));
        if (ret) {
                dev_err(&pdev->dev, "No usable DMA configuration\n");
                goto out_err_disable;
index f3ac4cd..efdba84 100644 (file)
@@ -159,7 +159,7 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        }
 
        /* set dma identifier */
-       ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
+       ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(48));
        if (ret) {
                dev_err(&pdev->dev, "No usable DMA configuration\n");
                goto out_err_disable;
index 7bd2343..c91beed 100644 (file)
@@ -141,7 +141,7 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        }
 
        /* set dma identifier */
-       ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
+       ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(48));
        if (ret) {
                dev_err(&pdev->dev, "No usable DMA configuration\n");
                goto out_err_disable;
index cc300a2..e1c1675 100644 (file)
@@ -159,7 +159,7 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        }
 
        /* set dma identifier */
-       ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
+       ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(48));
        if (ret) {
                dev_err(&pdev->dev, "No usable DMA configuration\n");
                goto out_err_disable;
index da9c743..d332b68 100644 (file)
@@ -141,7 +141,7 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        }
 
        /* set dma identifier */
-       ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
+       ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(48));
        if (ret) {
                dev_err(&pdev->dev, "No usable DMA configuration\n");
                goto out_err_disable;