aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/agp/intel-agp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/agp/intel-agp.c')
-rw-r--r--drivers/char/agp/intel-agp.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
index cd18493c9527..aa5c782bf015 100644
--- a/drivers/char/agp/intel-agp.c
+++ b/drivers/char/agp/intel-agp.c
@@ -927,20 +927,14 @@ static int __devinit agp_intel_probe(struct pci_dev *pdev,
927 dev_info(&pdev->dev, "Intel %s Chipset\n", intel_agp_chipsets[i].name); 927 dev_info(&pdev->dev, "Intel %s Chipset\n", intel_agp_chipsets[i].name);
928 928
929 /* 929 /*
930 * If the device has not been properly setup, the following will catch
931 * the problem and should stop the system from crashing.
932 * 20030610 - hamish@zot.org
933 */
934 if (pci_enable_device(pdev)) {
935 dev_err(&pdev->dev, "can't enable PCI device\n");
936 agp_put_bridge(bridge);
937 return -ENODEV;
938 }
939
940 /*
941 * The following fixes the case where the BIOS has "forgotten" to 930 * The following fixes the case where the BIOS has "forgotten" to
942 * provide an address range for the GART. 931 * provide an address range for the GART.
943 * 20030610 - hamish@zot.org 932 * 20030610 - hamish@zot.org
933 * This happens before pci_enable_device() intentionally;
934 * calling pci_enable_device() before assigning the resource
935 * will result in the GART being disabled on machines with such
936 * BIOSs (the GART ends up with a BAR starting at 0, which
937 * conflicts a lot of other devices).
944 */ 938 */
945 r = &pdev->resource[0]; 939 r = &pdev->resource[0];
946 if (!r->start && r->end) { 940 if (!r->start && r->end) {
@@ -951,6 +945,17 @@ static int __devinit agp_intel_probe(struct pci_dev *pdev,
951 } 945 }
952 } 946 }
953 947
948 /*
949 * If the device has not been properly setup, the following will catch
950 * the problem and should stop the system from crashing.
951 * 20030610 - hamish@zot.org
952 */
953 if (pci_enable_device(pdev)) {
954 dev_err(&pdev->dev, "can't enable PCI device\n");
955 agp_put_bridge(bridge);
956 return -ENODEV;
957 }
958
954 /* Fill in the mode register */ 959 /* Fill in the mode register */
955 if (cap_ptr) { 960 if (cap_ptr) {
956 pci_read_config_dword(pdev, 961 pci_read_config_dword(pdev,
@@ -1049,6 +1054,7 @@ static struct pci_device_id agp_intel_pci_table[] = {
1049 ID(PCI_DEVICE_ID_INTEL_G45_HB), 1054 ID(PCI_DEVICE_ID_INTEL_G45_HB),
1050 ID(PCI_DEVICE_ID_INTEL_G41_HB), 1055 ID(PCI_DEVICE_ID_INTEL_G41_HB),
1051 ID(PCI_DEVICE_ID_INTEL_B43_HB), 1056 ID(PCI_DEVICE_ID_INTEL_B43_HB),
1057 ID(PCI_DEVICE_ID_INTEL_B43_1_HB),
1052 ID(PCI_DEVICE_ID_INTEL_IRONLAKE_D_HB), 1058 ID(PCI_DEVICE_ID_INTEL_IRONLAKE_D_HB),
1053 ID(PCI_DEVICE_ID_INTEL_IRONLAKE_M_HB), 1059 ID(PCI_DEVICE_ID_INTEL_IRONLAKE_M_HB),
1054 ID(PCI_DEVICE_ID_INTEL_IRONLAKE_MA_HB), 1060 ID(PCI_DEVICE_ID_INTEL_IRONLAKE_MA_HB),