Skip to contentSkip to conversation

: mtpav driver locks X on 64 bit native system

ALSA - driver 0001203 [email protected] 5 participants 8 messages Jun 27, 2005 – Oct 1, 2005

lore
Share & tools
lore
#0 lore raw

A NOTE has been added to this issue.
======================================================================
<https://bugtrack.alsa-project.org/alsa-bug/view.php?id=1203>
======================================================================
Reported By: sonofzev
Assigned To:
======================================================================

Project:                    ALSA - driver
Issue ID:                   1203
Category:                   GENERIC - mtpav
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     new
Distribution:               Gentoo 2004.3 - 64-bit native
Kernel Version:             2.6.9 or 2.6.11 or 2.6.12
======================================================================
Date Submitted:             06-19-2005 08:51 CEST
Last Modified:              06-27-2005 19:39 CEST

======================================================================
Summary: mtpav driver locks X on 64 bit native system
Description:
Locks system completely when loading X if mtpav module is already loaded.

If loading the module after loading X, the system completely lock when firing up any sequencer app.

This does not happen on my 32-bit Pentium 4

======================================================================

----------------------------------------------------------------------
tiwai - 06-27-05 16:57
----------------------------------------------------------------------
Yes. The driver doesn't probe but just trusts the module option (or uses the default value 7 blindly).

----------------------------------------------------------------------
sonofzev - 06-27-05 19:39
----------------------------------------------------------------------
confirmed that I am using IRQ7 for my printer port.

Issue History
Date Modified Username Field Change
======================================================================
06-19-05 08:51 sonofzev New Issue
06-19-05 08:51 sonofzev Distribution => Gentoo 2004.3 -
64-bit native
06-19-05 08:51 sonofzev Kernel Version => 2.6.9 or 2.6.11 or
2.6.12

06-19-05 16:05 sonofzev       Note Added: 0005089                          
06-19-05 16:24 sonofzev       Note Deleted: 0005089                        
06-20-05 13:47 sonofzev       Note Added: 0005097                          
06-21-05 11:25 tiwai          Note Added: 0005104                          
06-26-05 10:54 sonofzev       Note Added: 0005261                          
06-27-05 16:57 tiwai          Note Added: 0005281                          
06-27-05 19:39 sonofzev       Note Added: 0005286                          

======================================================================

-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click

#1 lore raw

Is any work being done on this...

To my horror and disgust for work purposes I needed to install winblows on the amd64 and the MOTU proprietary 32 bit driver works...

This simply confirms I have all my printer port settings correct in BIOS...

Quoted 72 lines · On Mon, 2005-06-27 at 19:39 +0200, [email protected] wrote:

A NOTE has been added to this issue.
======================================================================
<https://bugtrack.alsa-project.org/alsa-bug/view.php?id=1203>
======================================================================
Reported By: sonofzev
Assigned To:
======================================================================

Project:                    ALSA - driver
Issue ID:                   1203
Category:                   GENERIC - mtpav
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     new
Distribution:               Gentoo 2004.3 - 64-bit native
Kernel Version:             2.6.9 or 2.6.11 or 2.6.12
======================================================================
Date Submitted:             06-19-2005 08:51 CEST
Last Modified:              06-27-2005 19:39 CEST

======================================================================
Summary: mtpav driver locks X on 64 bit native system
Description:
Locks system completely when loading X if mtpav module is already loaded.

If loading the module after loading X, the system completely lock when firing up any sequencer app.

This does not happen on my 32-bit Pentium 4

======================================================================

----------------------------------------------------------------------
tiwai - 06-27-05 16:57
----------------------------------------------------------------------
Yes. The driver doesn't probe but just trusts the module option (or uses the default value 7 blindly).

----------------------------------------------------------------------
sonofzev - 06-27-05 19:39
----------------------------------------------------------------------
confirmed that I am using IRQ7 for my printer port.

Issue History
Date Modified Username Field Change
======================================================================
06-19-05 08:51 sonofzev New Issue
06-19-05 08:51 sonofzev Distribution => Gentoo 2004.3 -
64-bit native
06-19-05 08:51 sonofzev Kernel Version => 2.6.9 or 2.6.11 or
2.6.12

06-19-05 16:05 sonofzev       Note Added: 0005089                          
06-19-05 16:24 sonofzev       Note Deleted: 0005089                        
06-20-05 13:47 sonofzev       Note Added: 0005097                          
06-21-05 11:25 tiwai          Note Added: 0005104                          
06-26-05 10:54 sonofzev       Note Added: 0005261                          
06-27-05 16:57 tiwai          Note Added: 0005281                          
06-27-05 19:39 sonofzev       Note Added: 0005286                          

======================================================================

-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Signature · 9 lines
Allan Klinbail <[email protected]>



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
#2 lore raw
Quoted 7 lines · Allan Klinbail

Is any work being done on this...

To my horror and disgust for work purposes I needed to install winblows on the amd64 and the MOTU proprietary 32 bit driver works...

This simply confirms I have all my printer port settings correct in BIOS...

Um, no, because the ALSA developers almost certainly don't have the hardware. YOU need to work on it.

Lee

-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf

#3 lore raw

At Thu, 08 Sep 2005 12:36:33 -0400,

Quoted 4 lines · Lee Revell
Quoted 2 lines · Allan Klinbail

Is any work being done on this...

Quoted 8 lines
Quoted 5 lines

To my horror and disgust for work purposes I needed to install winblows on the amd64 and the MOTU proprietary 32 bit driver works...

This simply confirms I have all my printer port settings correct in BIOS...

Um, no, because the ALSA developers almost certainly don't have the hardware. YOU need to work on it.

The problem is that we haven't changed the driver so much for a long time. And the driver is quite simple. It's a parallel port. So, I'm wondering what is broken.

You can try the following patch just for testing. It postpones the request_irq() call, in case any wandering irq caused the trouble.

Takashi

Index: alsa-kernel/drivers/mtpav.c
===================================================================
RCS file: /home/iwai/cvs/alsa/alsa-kernel/drivers/mtpav.c,v retrieving revision 1.29

drivers/mtpav.c +11 -2
diff -u -r1.29 mtpav.c
@@ -592,13 +592,18 @@
 /*
  * get ISA resources
  */
-static int snd_mtpav_get_ISA(mtpav_t * mcard)
+static int __init snd_mtpav_get_ISA_port(mtpav_t * mcard)
 {
 	if ((mcard->res_port = request_region(port, 3, "MotuMTPAV MIDI")) == NULL) {
 		snd_printk("MTVAP port 0x%lx is busy\n", port);
 		return -EBUSY;
 	}
 	mcard->port = port;
+	return 0;
+}
+
+static int __init snd_mtpav_get_ISA_irq(mtpav_t * mcard)
+{
 	if (request_irq(irq, snd_mtpav_irqh, SA_INTERRUPT, "MOTU MTPAV", (void *)mcard)) {
 		snd_printk("MTVAP IRQ %d busy\n", irq);
 		return -EBUSY;
@@ -742,7 +747,7 @@
 		return -ENOMEM;
 	}
 
-	err = snd_mtpav_get_ISA(mtp_card);
+	err = snd_mtpav_get_ISA_port(mtp_card);
 	//printk("snd_mtpav_get_ISA returned: %d\n", err);
 	if (err < 0)
 		goto __error;
@@ -769,6 +774,10 @@
 
 	snd_mtpav_portscan(mtp_card);
 
+	err = snd_mtpav_get_ISA_irq(mtp_card);
+	if (err < 0)
+		goto __error;
+
 	printk(KERN_INFO "Motu MidiTimePiece on parallel port irq: %d ioport: 0x%lx\n", irq, port);
 
 	return 0;

-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf

#4 lore raw

Sorry I haven't been on for a little while... how do I apply this patch?

Quoted 74 lines · Takashi Iwai

At Thu, 08 Sep 2005 12:36:33 -0400,

Quoted 4 lines · Lee Revell
Quoted 2 lines · Allan Klinbail

Is any work being done on this...

Quoted 8 lines
Quoted 5 lines

To my horror and disgust for work purposes I needed to install winblows on the amd64 and the MOTU proprietary 32 bit driver works...

This simply confirms I have all my printer port settings correct in BIOS...

Um, no, because the ALSA developers almost certainly don't have the hardware. YOU need to work on it.

The problem is that we haven't changed the driver so much for a long time. And the driver is quite simple. It's a parallel port. So, I'm wondering what is broken.

You can try the following patch just for testing. It postpones the request_irq() call, in case any wandering irq caused the trouble.

Takashi

Index: alsa-kernel/drivers/mtpav.c
===================================================================
RCS file: /home/iwai/cvs/alsa/alsa-kernel/drivers/mtpav.c,v retrieving revision 1.29
diff -u -r1.29 mtpav.c

drivers/mtpav.c +11 -2
@@ -592,13 +592,18 @@
 /*
  * get ISA resources
  */
-static int snd_mtpav_get_ISA(mtpav_t * mcard)
+static int __init snd_mtpav_get_ISA_port(mtpav_t * mcard)
 {
 	if ((mcard->res_port = request_region(port, 3, "MotuMTPAV MIDI")) == NULL) {
 		snd_printk("MTVAP port 0x%lx is busy\n", port);
 		return -EBUSY;
 	}
 	mcard->port = port;
+	return 0;
+}
+
+static int __init snd_mtpav_get_ISA_irq(mtpav_t * mcard)
+{
 	if (request_irq(irq, snd_mtpav_irqh, SA_INTERRUPT, "MOTU MTPAV", (void *)mcard)) {
 		snd_printk("MTVAP IRQ %d busy\n", irq);
 		return -EBUSY;
@@ -742,7 +747,7 @@
 		return -ENOMEM;
 	}
 
-	err = snd_mtpav_get_ISA(mtp_card);
+	err = snd_mtpav_get_ISA_port(mtp_card);
 	//printk("snd_mtpav_get_ISA returned: %d\n", err);
 	if (err < 0)
 		goto __error;
@@ -769,6 +774,10 @@
 
 	snd_mtpav_portscan(mtp_card);
 
+	err = snd_mtpav_get_ISA_irq(mtp_card);
+	if (err < 0)
+		goto __error;
+
 	printk(KERN_INFO "Motu MidiTimePiece on parallel port irq: %d ioport: 0x%lx\n", irq, port);
 
 	return 0;
Signature · 9 lines
Allan Klinbail <[email protected]>



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. 
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
#5 lore raw

At Thu, 22 Sep 2005 02:03:37 +1000,

Quoted 2 lines · Allan Klinbail

Sorry I haven't been on for a little while... how do I apply this patch?

Copy the mail as a text file (as it is), and run the patch on your alsa-kernel tree (with -p1 option).

Takashi

Quoted 70 lines · Takashi Iwai
Quoted 66 lines

At Thu, 08 Sep 2005 12:36:33 -0400,

Quoted 4 lines · Lee Revell
Quoted 2 lines · Allan Klinbail

Is any work being done on this...

Quoted 8 lines
Quoted 5 lines

To my horror and disgust for work purposes I needed to install winblows on the amd64 and the MOTU proprietary 32 bit driver works...

This simply confirms I have all my printer port settings correct in BIOS...

Um, no, because the ALSA developers almost certainly don't have the hardware. YOU need to work on it.

The problem is that we haven't changed the driver so much for a long time. And the driver is quite simple. It's a parallel port. So, I'm wondering what is broken.

You can try the following patch just for testing. It postpones the request_irq() call, in case any wandering irq caused the trouble.

Takashi

Index: alsa-kernel/drivers/mtpav.c
===================================================================
RCS file: /home/iwai/cvs/alsa/alsa-kernel/drivers/mtpav.c,v retrieving revision 1.29
diff -u -r1.29 mtpav.c

drivers/mtpav.c +7 -2
@@ -592,13 +592,18 @@
 /*
  * get ISA resources
  */
-static int snd_mtpav_get_ISA(mtpav_t * mcard)
+static int __init snd_mtpav_get_ISA_port(mtpav_t * mcard)
 {
 	if ((mcard->res_port = request_region(port, 3, "MotuMTPAV MIDI")) == NULL) {
 		snd_printk("MTVAP port 0x%lx is busy\n", port);
 		return -EBUSY;
 	}
 	mcard->port = port;
+	return 0;
+}
+
+static int __init snd_mtpav_get_ISA_irq(mtpav_t * mcard)
+{
 	if (request_irq(irq, snd_mtpav_irqh, SA_INTERRUPT, "MOTU MTPAV", (void *)mcard)) {
 		snd_printk("MTVAP IRQ %d busy\n", irq);
 		return -EBUSY;
@@ -742,7 +747,7 @@
 		return -ENOMEM;
 	}
 
-	err = snd_mtpav_get_ISA(mtp_card);
+	err = snd_mtpav_get_ISA_port(mtp_card);
 	//printk("snd_mtpav_get_ISA returned: %d\n", err);
 	if (err < 0)
 		goto __error;
@@ -769,6 +774,10 @@
 
 	snd_mtpav_portscan(mtp_card);
 
Quoted 23 lines
Quoted 8 lines
drivers/mtpav.c +4 -0
+	err = snd_mtpav_get_ISA_irq(mtp_card);
+	if (err < 0)
+		goto __error;
+
 	printk(KERN_INFO "Motu MidiTimePiece on parallel port irq: %d ioport: 0x%lx\n", irq, port);
 
 	return 0;
Signature · 13 lines
Allan Klinbail <[email protected]>



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. 
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl

#6 lore raw

Hi Takashi,

I tested the patch. I still get a hard lock when activating the driver through any sequencer.

cheers

Allan

Quoted 105 lines · Takashi Iwai

At Thu, 22 Sep 2005 02:03:37 +1000,

Quoted 2 lines · Allan Klinbail

Sorry I haven't been on for a little while... how do I apply this patch?

Copy the mail as a text file (as it is), and run the patch on your alsa-kernel tree (with -p1 option).

Takashi

Quoted 93 lines · Takashi Iwai
Quoted 74 lines

At Thu, 08 Sep 2005 12:36:33 -0400,

Quoted 4 lines · Lee Revell
Quoted 2 lines · Allan Klinbail

Is any work being done on this...

Quoted 8 lines
Quoted 5 lines

To my horror and disgust for work purposes I needed to install winblows on the amd64 and the MOTU proprietary 32 bit driver works...

This simply confirms I have all my printer port settings correct in BIOS...

Um, no, because the ALSA developers almost certainly don't have the hardware. YOU need to work on it.

The problem is that we haven't changed the driver so much for a long time. And the driver is quite simple. It's a parallel port. So, I'm wondering what is broken.

You can try the following patch just for testing. It postpones the request_irq() call, in case any wandering irq caused the trouble.

Takashi

Index: alsa-kernel/drivers/mtpav.c
===================================================================
RCS file: /home/iwai/cvs/alsa/alsa-kernel/drivers/mtpav.c,v retrieving revision 1.29
diff -u -r1.29 mtpav.c

drivers/mtpav.c +11 -2
@@ -592,13 +592,18 @@
 /*
  * get ISA resources
  */
-static int snd_mtpav_get_ISA(mtpav_t * mcard)
+static int __init snd_mtpav_get_ISA_port(mtpav_t * mcard)
 {
 	if ((mcard->res_port = request_region(port, 3, "MotuMTPAV MIDI")) == NULL) {
 		snd_printk("MTVAP port 0x%lx is busy\n", port);
 		return -EBUSY;
 	}
 	mcard->port = port;
+	return 0;
+}
+
+static int __init snd_mtpav_get_ISA_irq(mtpav_t * mcard)
+{
 	if (request_irq(irq, snd_mtpav_irqh, SA_INTERRUPT, "MOTU MTPAV", (void *)mcard)) {
 		snd_printk("MTVAP IRQ %d busy\n", irq);
 		return -EBUSY;
@@ -742,7 +747,7 @@
 		return -ENOMEM;
 	}
 
-	err = snd_mtpav_get_ISA(mtp_card);
+	err = snd_mtpav_get_ISA_port(mtp_card);
 	//printk("snd_mtpav_get_ISA returned: %d\n", err);
 	if (err < 0)
 		goto __error;
@@ -769,6 +774,10 @@
 
 	snd_mtpav_portscan(mtp_card);
 
+	err = snd_mtpav_get_ISA_irq(mtp_card);
+	if (err < 0)
+		goto __error;
+
 	printk(KERN_INFO "Motu MidiTimePiece on parallel port irq: %d ioport: 0x%lx\n", irq, port);
 
 	return 0;
Signature · 13 lines
Allan Klinbail <[email protected]>



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. 
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel
Signature · 8 lines
Allan Klinbail <[email protected]>



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
#7 lore raw

Sorry , it actually looks liek the patch failed .. but no errors were reported but also patch didn't seem to do anything .....

I copied the text beginning with "Index", saved it to alsa-driver/alsa-kernel and then applied patch -p1, is that the correct process?

Quoted 115 lines · Allan Klinbail

Hi Takashi,

I tested the patch. I still get a hard lock when activating the driver through any sequencer.

cheers

Allan

Quoted 105 lines · Takashi Iwai

At Thu, 22 Sep 2005 02:03:37 +1000,

Quoted 2 lines · Allan Klinbail

Sorry I haven't been on for a little while... how do I apply this patch?

Copy the mail as a text file (as it is), and run the patch on your alsa-kernel tree (with -p1 option).

Takashi

Quoted 93 lines · Takashi Iwai
Quoted 74 lines

At Thu, 08 Sep 2005 12:36:33 -0400,

Quoted 4 lines · Lee Revell
Quoted 2 lines · Allan Klinbail

Is any work being done on this...

Quoted 8 lines
Quoted 5 lines

To my horror and disgust for work purposes I needed to install winblows on the amd64 and the MOTU proprietary 32 bit driver works...

This simply confirms I have all my printer port settings correct in BIOS...

Um, no, because the ALSA developers almost certainly don't have the hardware. YOU need to work on it.

The problem is that we haven't changed the driver so much for a long time. And the driver is quite simple. It's a parallel port. So, I'm wondering what is broken.

You can try the following patch just for testing. It postpones the request_irq() call, in case any wandering irq caused the trouble.

Takashi

Index: alsa-kernel/drivers/mtpav.c
===================================================================
RCS file: /home/iwai/cvs/alsa/alsa-kernel/drivers/mtpav.c,v retrieving revision 1.29
diff -u -r1.29 mtpav.c

drivers/mtpav.c +11 -2
@@ -592,13 +592,18 @@
 /*
  * get ISA resources
  */
-static int snd_mtpav_get_ISA(mtpav_t * mcard)
+static int __init snd_mtpav_get_ISA_port(mtpav_t * mcard)
 {
 	if ((mcard->res_port = request_region(port, 3, "MotuMTPAV MIDI")) == NULL) {
 		snd_printk("MTVAP port 0x%lx is busy\n", port);
 		return -EBUSY;
 	}
 	mcard->port = port;
+	return 0;
+}
+
+static int __init snd_mtpav_get_ISA_irq(mtpav_t * mcard)
+{
 	if (request_irq(irq, snd_mtpav_irqh, SA_INTERRUPT, "MOTU MTPAV", (void *)mcard)) {
 		snd_printk("MTVAP IRQ %d busy\n", irq);
 		return -EBUSY;
@@ -742,7 +747,7 @@
 		return -ENOMEM;
 	}
 
-	err = snd_mtpav_get_ISA(mtp_card);
+	err = snd_mtpav_get_ISA_port(mtp_card);
 	//printk("snd_mtpav_get_ISA returned: %d\n", err);
 	if (err < 0)
 		goto __error;
@@ -769,6 +774,10 @@
 
 	snd_mtpav_portscan(mtp_card);
 
+	err = snd_mtpav_get_ISA_irq(mtp_card);
+	if (err < 0)
+		goto __error;
+
 	printk(KERN_INFO "Motu MidiTimePiece on parallel port irq: %d ioport: 0x%lx\n", irq, port);
 
 	return 0;
Signature · 13 lines
Allan Klinbail <[email protected]>



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. 
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel
Signature · 8 lines
Allan Klinbail <[email protected]>



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl