Skip to contentSkip to conversation

Fix PCI ID define for ICH6 in intel8x0

PATCH Applied Jean Delvare 2 participants 2 messages Jan 29, 2005 – Jan 31, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix PCI ID define for ICH6 in intel8x0

Hi all,

While searching the Linux 2.6 kernel tree for ICH6 PCI IDs (for something completely unrelated to ALSA) I noticed that the intel8x0 ALSA sound driver is not using the correct PCI ID name for the ICH6 sound device. Namely, it uses PCI_DEVICE_ID_INTEL_ICH6_3 instead of PCI_DEVICE_ID_INTEL_ICH6_18.

Searching through the kernel history, I found that the 8086:266e device actually had been named PCI_DEVICE_ID_INTEL_ICH6_3 for a short time, before all ICH6 device IDs were added, at which time it became PCI_DEVICE_ID_INTEL_ICH6_18 (in both the 2.4 and 2.6 Linux kernel trees). This obviously explains the wrong name being used in the ALSA driver.

This error could actually cause trouble in the 2.6 kernel tree, because include/linux/pci_ids.h says:

#define PCI_DEVICE_ID_INTEL_ICH6_3 0x2651
(...)
#define PCI_DEVICE_ID_INTEL_ICH6_18 0x266e

while the intel8x0 sound driver says:

#ifndef PCI_DEVICE_ID_INTEL_ICH6_3
#define PCI_DEVICE_ID_INTEL_ICH6_3 0x266e
#endif

Obviously PCI_DEVICE_ID_INTEL_ICH6_3 *is* defined, but not to the correct value, causing the driver to use 0x2651 instead.

It doesn't seem to have too big an impact on the code, because 0x266e is hardcoded in the pci_device_id table anyway, but in the "shortname" table it isn't, so I guess the driver isn't currently able to properly display the name of ICH6 devices.

The 2.4 kernel isn't affected because PCI_DEVICE_ID_INTEL_ICH6_3 isn't defined there anymore.

An (untested) patch follows, which fixes the problem as far as I can see.

alsa-kernel/pci/intel8x0.c renamed from alsa-kernel/pci/intel8x0.c.orig +3 -3
@@ -117,8 +117,8 @@
 #ifndef PCI_DEVICE_ID_INTEL_ESB_5
 #define PCI_DEVICE_ID_INTEL_ESB_5	0x25a6
 #endif
-#ifndef PCI_DEVICE_ID_INTEL_ICH6_3
-#define PCI_DEVICE_ID_INTEL_ICH6_3	0x266e
+#ifndef PCI_DEVICE_ID_INTEL_ICH6_18
+#define PCI_DEVICE_ID_INTEL_ICH6_18	0x266e
 #endif
 #ifndef PCI_DEVICE_ID_SI_7012
 #define PCI_DEVICE_ID_SI_7012		0x7012
@@ -2702,7 +2702,7 @@
 	{ PCI_DEVICE_ID_INTEL_ICH4, "Intel 82801DB-ICH4" },
 	{ PCI_DEVICE_ID_INTEL_ICH5, "Intel ICH5" },
 	{ PCI_DEVICE_ID_INTEL_ESB_5, "Intel 6300ESB" },
-	{ PCI_DEVICE_ID_INTEL_ICH6_3, "Intel ICH6" },
+	{ PCI_DEVICE_ID_INTEL_ICH6_18, "Intel ICH6" },
 	{ PCI_DEVICE_ID_SI_7012, "SiS SI7012" },
 	{ PCI_DEVICE_ID_NVIDIA_MCP_AUDIO, "NVidia nForce" },
 	{ PCI_DEVICE_ID_NVIDIA_MCP2_AUDIO, "NVidia nForce2" },
Signature · 9 lines
Jean Delvare
http://khali.linux-fr.org/


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
#1 lore raw
Quoted 2 lines · Jean Delvare

An (untested) patch follows, which fixes the problem as far as I can see.

Applied. Thanks.

Jaroslav

-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, SUSE Labs

-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl