hisi_sas: Set dev DMA mask

Signed-off-by: John Garry <john.garry@huawei.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
John Garry 2015-11-18 00:50:39 +08:00 committed by Martin K. Petersen
parent 5d74242e37
commit 50cb916f43

View file

@ -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);