PCI: dwc: Fix inverted condition of DMA mask setup warning
[linux-2.6-microblaze.git] / drivers / pci / controller / dwc / pcie-designware-host.c
index 99ef808..8a84c00 100644 (file)
@@ -396,6 +396,10 @@ int dw_pcie_host_init(struct pcie_port *pp)
                                                            dw_chained_msi_isr,
                                                            pp);
 
                                                            dw_chained_msi_isr,
                                                            pp);
 
+                       ret = dma_set_mask(pci->dev, DMA_BIT_MASK(32));
+                       if (ret)
+                               dev_warn(pci->dev, "Failed to set DMA mask to 32-bit. Devices with only 32-bit MSI support may not work properly\n");
+
                        pp->msi_data = dma_map_single_attrs(pci->dev, &pp->msi_msg,
                                                      sizeof(pp->msi_msg),
                                                      DMA_FROM_DEVICE,
                        pp->msi_data = dma_map_single_attrs(pci->dev, &pp->msi_msg,
                                                      sizeof(pp->msi_msg),
                                                      DMA_FROM_DEVICE,