Update of /cvsroot/linux-vax/kernel-2.4/drivers/char/agp
In directory sc8-pr-cvs1:/tmp/cvs-serv7538/drivers/char/agp
Modified Files:
agpgart_be.c
Log Message:
DA: sync with Marcelo 2.4.17
Index: agpgart_be.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/char/agp/agpgart_be.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- agpgart_be.c 11 Apr 2002 13:30:59 -0000 1.2
+++ agpgart_be.c 10 Jun 2003 01:13:27 -0000 1.3
@@ -409,8 +409,18 @@
* AGP devices and collect their data.
*/
- while ((device = pci_find_class(PCI_CLASS_DISPLAY_VGA << 8,
- device)) != NULL) {
+
+ pci_for_each_dev(device)
+ {
+ /*
+ * Enable AGP devices. Most will be VGA display but
+ * some may be coprocessors on non VGA devices too
+ */
+
+ if((((device->class >> 16) & 0xFF) != PCI_BASE_CLASS_DISPLAY) &&
+ (device->class != (PCI_CLASS_PROCESSOR_CO << 8)))
+ continue;
+
pci_read_config_dword(device, 0x04, &scratch);
if (!(scratch & 0x00100000))
@@ -3242,8 +3252,18 @@
* AGP devices and collect their data.
*/
- while ((device = pci_find_class(PCI_CLASS_DISPLAY_VGA << 8,
- device)) != NULL) {
+
+ pci_for_each_dev(device)
+ {
+ /*
+ * Enable AGP devices. Most will be VGA display but
+ * some may be coprocessors on non VGA devices too
+ */
+
+ if((((device->class >> 16) & 0xFF) != PCI_BASE_CLASS_DISPLAY) &&
+ (device->class != (PCI_CLASS_PROCESSOR_CO << 8)))
+ continue;
+
pci_read_config_dword(device, 0x04, &scratch);
if (!(scratch & 0x00100000))
@@ -3877,12 +3897,10 @@
case PCI_DEVICE_ID_INTEL_830_M_0:
i810_dev = pci_find_device(PCI_VENDOR_ID_INTEL,
- PCI_DEVICE_ID_INTEL_830_M_1,
- NULL);
- if(PCI_FUNC(i810_dev->devfn) != 0) {
+ PCI_DEVICE_ID_INTEL_830_M_1, NULL);
+ if(i810_dev && PCI_FUNC(i810_dev->devfn) != 0) {
i810_dev = pci_find_device(PCI_VENDOR_ID_INTEL,
- PCI_DEVICE_ID_INTEL_830_M_1,
- i810_dev);
+ PCI_DEVICE_ID_INTEL_830_M_1, i810_dev);
}
if (i810_dev == NULL) {
|