|
@@ -364,6 +364,19 @@ int ahci_platform_init_host(struct platform_device *pdev,
|
|
|
ap->ops = &ata_dummy_port_ops;
|
|
|
}
|
|
|
|
|
|
+ if (hpriv->cap & HOST_CAP_64) {
|
|
|
+ rc = dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(64));
|
|
|
+ if (rc) {
|
|
|
+ rc = dma_coerce_mask_and_coherent(dev,
|
|
|
+ DMA_BIT_MASK(32));
|
|
|
+ if (rc) {
|
|
|
+ dev_err(dev, "Failed to enable 64-bit DMA.\n");
|
|
|
+ return rc;
|
|
|
+ }
|
|
|
+ dev_warn(dev, "Enable 32-bit DMA instead of 64-bit.\n");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
rc = ahci_reset_controller(host);
|
|
|
if (rc)
|
|
|
return rc;
|