diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c index 30c36ac..0f2afe1 100644 --- a/drivers/char/agp/intel-agp.c +++ b/drivers/char/agp/intel-agp.c @@ -2460,10 +2460,17 @@ static int __devinit agp_intel_probe(struct pci_dev *pdev, &bridge->mode); } - if (bridge->driver->mask_memory == intel_i965_mask_memory) - if (pci_set_dma_mask(intel_private.pcidev, DMA_BIT_MASK(36))) - dev_err(&intel_private.pcidev->dev, - "set gfx device dma mask 36bit failed!\n"); + if (1) { + if (pci_set_dma_mask(intel_private.pcidev, DMA_BIT_MASK(36))) { + printk(KERN_ERR, "set gfx device dma mask 36bit failed!\n"); + if (pci_set_dma_mask(intel_private.pcidev, DMA_BIT_MASK(32))) { + printk(KERN_ERR "set gfx device dma mask 32bit failed!\n"); + agp_put_bridge(bridge); + return -ENODEV; + } + } else + printk(KERN_ERR "set gfx device dma mask 36bit success!\n"); + } pci_set_drvdata(pdev, bridge); return agp_add_bridge(bridge);