intel-agp: skip non-AGP devices

Matt Domsch
2004-06-01T16:11:36Z

[-- Attachment #1: Type: text/plain, Size: 1558 bytes --]

Dave,

On our PowerEdge 2600 system, which has an Intel E7501 Memroy
Controller Hub, the intel-agp probe code is reporting, at KERN_ERR no less:

agpgart: Unsupported Intel chipset (device id 254c)

Now, of course it says this, as this device does not present itself as
AGP-capable:

00:00.0 Host bridge: Intel Corp. E7501 Memory Controller Hub (rev 01)
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 0
Capabilities: [40] #09 [1105]

agp_intel_probe() calls pci_find_capability(PCI_CAP_ID_AGP)
but doesn't check the return value (should be zero in this case) prior
to moving into the switch.

The patch below checks for a valid cap_ptr prior to printing the
message, now at KERN_WARNING level (it's not really an error, is it?)

Thoughts?

Thanks,
Matt

--
Matt Domsch
Sr. Software Engineer, Lead Engineer
Dell Linux Solutions linux.dell.com & www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com

--- intel-agp.c.orig Tue Jun 1 10:45:59 2004
+++ intel-agp.c Tue Jun 1 11:02:56 2004
@@ -1382,8 +1382,9 @@ static int __devinit agp_intel_probe(str
name = "E7205";
break;
default:
- printk(KERN_ERR PFX "Unsupported Intel chipset (device id: %04x)\n",
- pdev->device);
+ if (cap_ptr)
+ printk(KERN_WARNING PFX "Unsupported Intel chipset (device id: %04x)\n",
+ pdev->device);
return -ENODEV;
};

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]