[PATCH] Prevent trident driver from grabbing pcnet32 hardware
authorJon Mason <jdmason@us.ibm.com>
Thu, 19 Jan 2006 01:42:25 +0000 (17:42 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 19 Jan 2006 03:20:16 +0000 (19:20 -0800)
Some pcnet32 hardware erroneously has the Vendor ID for Trident.  The
pcnet32 driver looks for the PCI ethernet class before grabbing the
hardware, but the current trident driver does not check against the PCI
audio class.  This allows the trident driver to claim the pcnet32 hardware.
 This patch prevents that.

This revised version of the OSS Trident patch includes PCI_DEVICE Macro
usage.

Signed-off-by: Jon Mason <jdmason@us.ibm.com>
Signed-off-by: Muli Ben-Yehuda <mulix@mulix.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
sound/oss/trident.c

index 5f0ad6bb43b9f5adc0fbc09bc75b76c9d8a68580..a21c663e7e12564a334b2de16957a99cb95fd21a 100644 (file)
@@ -278,16 +278,14 @@ static char *card_names[] = {
 };
 
 static struct pci_device_id trident_pci_tbl[] = {
-       {PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_TRIDENT_4DWAVE_DX,
-        PCI_ANY_ID, PCI_ANY_ID, 0, 0, TRIDENT_4D_DX},
-       {PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_TRIDENT_4DWAVE_NX,
-        PCI_ANY_ID, PCI_ANY_ID, 0, 0, TRIDENT_4D_NX},
-       {PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_7018,
-        PCI_ANY_ID, PCI_ANY_ID, 0, 0, SIS_7018},
-       {PCI_VENDOR_ID_ALI, PCI_DEVICE_ID_ALI_5451,
-        PCI_ANY_ID, PCI_ANY_ID, 0, 0, ALI_5451},
-       {PCI_VENDOR_ID_INTERG, PCI_DEVICE_ID_INTERG_5050,
-        PCI_ANY_ID, PCI_ANY_ID, 0, 0, CYBER5050},
+       {PCI_DEVICE(PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_TRIDENT_4DWAVE_DX),
+               PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, TRIDENT_4D_DX},
+       {PCI_DEVICE(PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_TRIDENT_4DWAVE_NX),
+               0, 0, TRIDENT_4D_NX},
+       {PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_7018), 0, 0, SIS_7018},
+       {PCI_DEVICE(PCI_VENDOR_ID_ALI, PCI_DEVICE_ID_ALI_5451), 0, 0, ALI_5451},
+       {PCI_DEVICE(PCI_VENDOR_ID_INTERG, PCI_DEVICE_ID_INTERG_5050),
+               0, 0, CYBER5050},
        {0,}
 };