Commit e66e4c8d authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://linux-dj.bkbits.net/agpgart

into home.osdl.org:/home/torvalds/v2.5/linux
parents 3ee1e204 9f2e93ca
......@@ -39,6 +39,9 @@
__u32 *agp_gatt_table;
int agp_memory_reserved;
/* Needed by the Nforce GART driver for the time being. Would be
* nice to do this some other way instead of needing this export. */
EXPORT_SYMBOL_GPL(agp_memory_reserved);
EXPORT_SYMBOL(agp_memory_reserved);
......
......@@ -1237,6 +1237,7 @@ static int __init agp_intel_probe(struct pci_dev *pdev,
struct agp_bridge_data *bridge;
char *name = "(unknown)";
u8 cap_ptr = 0;
struct resource *r;
cap_ptr = pci_find_capability(pdev, PCI_CAP_ID_AGP);
......@@ -1378,6 +1379,29 @@ static int __init agp_intel_probe(struct pci_dev *pdev,
printk(KERN_INFO PFX "Detected an Intel %s Chipset.\n", name);
/*
* The following fixes the case where the BIOS has "forgotten" to
* provide an address range for the GART.
* 20030610 - hamish@zot.org
*/
r = &pdev->resource[0];
if (!r->start && r->end) {
if(pci_assign_resource(pdev, 0)) {
printk(KERN_ERR PFX "could not assign resource 0\n");
return (-ENODEV);
}
}
/*
* 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)) {
printk(KERN_ERR PFX "Unable to Enable PCI device\n");
return (-ENODEV);
}
/* Fill in the mode register */
if (cap_ptr) {
pci_read_config_dword(pdev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment