Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 232824
b: refs/heads/master
c: a70b95c
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Kitt authored and Dave Airlie committed Feb 3, 2011
1 parent ca27538 commit 0538c86
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cecd1455bc9cbd9568036f502ee8ded0a64354a7
refs/heads/master: a70b95c017e8b518e1e069853355e4e497453dbb
27 changes: 16 additions & 11 deletions trunk/drivers/char/agp/intel-agp.c
Original file line number Diff line number Diff line change
Expand Up @@ -773,21 +773,15 @@ static int __devinit agp_intel_probe(struct pci_dev *pdev,

dev_info(&pdev->dev, "Intel %s Chipset\n", intel_agp_chipsets[i].name);

/*
* If the device has not been properly setup, the following will catch
* the problem and should stop the system from crashing.
* 20030610 - hamish@zot.org
*/
if (pci_enable_device(pdev)) {
dev_err(&pdev->dev, "can't enable PCI device\n");
agp_put_bridge(bridge);
return -ENODEV;
}

/*
* The following fixes the case where the BIOS has "forgotten" to
* provide an address range for the GART.
* 20030610 - hamish@zot.org
* This happens before pci_enable_device() intentionally;
* calling pci_enable_device() before assigning the resource
* will result in the GART being disabled on machines with such
* BIOSs (the GART ends up with a BAR starting at 0, which
* conflicts a lot of other devices).
*/
r = &pdev->resource[0];
if (!r->start && r->end) {
Expand All @@ -798,6 +792,17 @@ static int __devinit agp_intel_probe(struct pci_dev *pdev,
}
}

/*
* If the device has not been properly setup, the following will catch
* the problem and should stop the system from crashing.
* 20030610 - hamish@zot.org
*/
if (pci_enable_device(pdev)) {
dev_err(&pdev->dev, "can't enable PCI device\n");
agp_put_bridge(bridge);
return -ENODEV;
}

/* Fill in the mode register */
if (cap_ptr) {
pci_read_config_dword(pdev,
Expand Down

0 comments on commit 0538c86

Please sign in to comment.