public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jon Mason <jdmason@us.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: Jiri Slaby <slaby@liberouter.org>,
	mulix@mulix.org, Jaroslav Kysela <perex@suse.cz>,
	audio@tridentmicro.com
Subject: [PATCH] Prevent ALSA trident driver from grabbing pcnet32 hardware
Date: Thu, 12 Jan 2006 16:05:30 -0600	[thread overview]
Message-ID: <20060112220530.GF17539@us.ibm.com> (raw)

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.

Per Jiri Slaby's request, I changed the trident driver to use
PCI_DEVICE macro and PCI ID #defines.

This patch is untested on Trident 4DWAVE_DX hardware, but has been
tested on pcnet32 hardware.

Thanks,
Jon

Signed-off-by: Jon Mason <jdmason@us.ibm.com>


diff -r 4a7597b41d25 sound/pci/trident/trident.c
--- a/sound/pci/trident/trident.c	Wed Jan 11 19:14:08 2006
+++ b/sound/pci/trident/trident.c	Thu Jan 12 15:52:34 2006
@@ -64,9 +64,11 @@
 MODULE_PARM_DESC(wavetable_size, "Maximum memory size in kB for wavetable synth.");
 
 static struct pci_device_id snd_trident_ids[] = {
-	{ 0x1023, 0x2000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },	/* Trident 4DWave DX PCI Audio */
-	{ 0x1023, 0x2001, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },	/* Trident 4DWave NX PCI Audio */
-	{ 0x1039, 0x7018, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },	/* SiS SI7018 PCI Audio */
+	{PCI_DEVICE(PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_TRIDENT_4DWAVE_DX), 
+		PCI_CLASS_MULTIMEDIA_AUDIO << 8, 0xffff00, 0},
+	{PCI_DEVICE(PCI_VENDOR_ID_TRIDENT, PCI_DEVICE_ID_TRIDENT_4DWAVE_NX), 
+		0, 0, 0},
+	{PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_7018), 0, 0, 0},
 	{ 0, }
 };
 

             reply	other threads:[~2006-01-12 22:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-12 22:05 Jon Mason [this message]
2006-01-13 13:21 ` [PATCH] Prevent ALSA trident driver from grabbing pcnet32 hardware Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060112220530.GF17539@us.ibm.com \
    --to=jdmason@us.ibm.com \
    --cc=audio@tridentmicro.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mulix@mulix.org \
    --cc=perex@suse.cz \
    --cc=slaby@liberouter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox