Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 275e85d9 authored by Hamad Kadmany's avatar Hamad Kadmany
Browse files

wil6210: Move dma mask setting after platform initialization



Platform specific initialization may initialize SMMU
(if available) which updates dma operations, therefore
setting of DMA mask needs to be done after platform
specific initialization.

Change-Id: I7b0e90e5e3d03816146f2f73a55dc858e03646dd
Signed-off-by: default avatarHamad Kadmany <hkadmany@codeaurora.org>
parent 5a092dc8
Loading
Loading
Loading
Loading
+15 −15
Original line number Diff line number Diff line
@@ -212,6 +212,19 @@ static int wil_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id)
		return rc;
	}

	wil->pdev = pdev;
	pci_set_drvdata(pdev, wil);
	/* rollback to if_free */

	wil->platform_handle =
		wil_platform_init(&pdev->dev, &wil->platform_ops, &rops, wil);
	if (!wil->platform_handle) {
		rc = -ENODEV;
		wil_err(wil, "wil_platform_init failed\n");
		goto if_free;
	}
	/* rollback to err_plat */

	/* device supports 48bit addresses */
	rc = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(48));
	if (rc) {
@@ -221,25 +234,12 @@ static int wil_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id)
			dev_err(dev,
				"dma_set_mask_and_coherent(32) failed: %d\n",
				rc);
			goto if_free;
			goto err_plat;
		}
	} else {
		wil->use_extended_dma_addr = 1;
	}

	wil->pdev = pdev;
	pci_set_drvdata(pdev, wil);
	/* rollback to if_free */

	wil->platform_handle =
		wil_platform_init(&pdev->dev, &wil->platform_ops, &rops, wil);
	if (!wil->platform_handle) {
		rc = -ENODEV;
		wil_err(wil, "wil_platform_init failed\n");
		goto if_free;
	}
	/* rollback to err_plat */

	rc = pci_enable_device(pdev);
	if (rc) {
		wil_err(wil,