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

Commit d7709531 authored by Hamad Kadmany's avatar Hamad Kadmany Committed by Maya Erez
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>
[merez@codeaurora.org: fixed trivial conflicts]
Signed-off-by: default avatarMaya Erez <merez@codeaurora.org>
parent 88251df7
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,