public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ben Pfaff <pfaffben@msu.edu>
To: linux-kernel@vger.kernel.org
Subject: [patch] Bug-fix for Maestro dock/hardware volume control patch
Date: 21 May 2001 19:35:30 -0400	[thread overview]
Message-ID: <87wv7axol9.fsf@msu.edu> (raw)

This patch, to be applied on top of the patch sent to
linux-kernel last week, fixes a bug which caused the driver to
crash on insertion if a hardware volume button had been pushed.

--- linux-2.4.4-ac12.vanilla/drivers/sound/maestro.c	Mon May 21 19:18:49 2001
+++ linux-2.4.5pre1/drivers/sound/maestro.c	Mon May 21 18:27:39 2001
@@ -3226,7 +3359,7 @@
 	outw(w, iobase+0x18);
 
 	w=inw(iobase+0x18);
-	w|=1<<6;		/* Hardware volume control interrupt on. */
+	w&=~(1<<6);		/* Hardware volume control interrupt off... for now. */
 	outw(w, iobase+0x18);
 	
 	w=inw(iobase+0x18);
@@ -3549,6 +3680,15 @@
 		kfree(card);
 		return 0;
 	}
+
+	/* Turn on hardware volume control interrupt.
+	   This has to come after we grab the IRQ above,
+	   or a crash will result on installation if a button has been pressed,
+	   because in that case we'll get an immediate interrupt. */
+	n = inw(iobase+0x18);
+	n|=(1<<6);
+	outw(n, iobase+0x18);
+
 	/* now go to sleep 'till something interesting happens */
 	maestro_power(card,ACPI_D2);
 


-- 
Ben Pfaff <pfaffben@msu.edu> <pfaffben@debian.org> <blp@gnu.org>
MSU Student - Debian GNU/Linux Maintainer - GNU Developer
Personal webpage: http://www.msu.edu/user/pfaffben

                 reply	other threads:[~2001-05-21 23:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=87wv7axol9.fsf@msu.edu \
    --to=pfaffben@msu.edu \
    --cc=linux-kernel@vger.kernel.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