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

Commit 50cb916f authored by John Garry's avatar John Garry Committed by Martin K. Petersen
Browse files

hisi_sas: Set dev DMA mask

parent 5d74242e
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -311,6 +311,14 @@ int hisi_sas_probe(struct platform_device *pdev,
	sha = SHOST_TO_SAS_HA(shost);
	hisi_hba = shost_priv(shost);
	platform_set_drvdata(pdev, sha);

	if (dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64)) &&
	    dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32))) {
		dev_err(dev, "No usable DMA addressing method\n");
		rc = -EIO;
		goto err_out_ha;
	}

	phy_nr = port_nr = hisi_hba->n_phy;

	arr_phy = devm_kcalloc(dev, phy_nr, sizeof(void *), GFP_KERNEL);