Hello,
The attachement is the fix for mpu to prevent lockups/freezes. Added mutexes with down_trylock() calls, to prevent blocking. Midi in/out not tested - I don't have no midi devices at the moment.
My soundcard is ESI Juli@. MB integrated midi is disabled in bios.
Last system messages after system freeze when running wine/jackd:
kernel: cmd: 0xff failed at 0xac0c (status = 0xb, data = 0x0) ... kernel: BUG: soft lockup detected on CPU#0! kernel: kernel: Call Trace: kernel: <IRQ> [<ffffffff802b0bdb>] softlockup_tick+0xdb/0xf6 kernel: [<ffffffff8028f5d0>] update_process_times+0x42/0x68 kernel: [<ffffffff80271f0c>] smp_local_timer_interrupt+0x34/0x55 kernel: [<ffffffff802725e8>] smp_apic_timer_interrupt+0x51/0x69 kernel: [<ffffffff8025ace6>] apic_timer_interrupt+0x66/0x70 kernel: [<ffffffff889c600d>] :snd_mpu401_uart:mpu401_read_port+0x4/0x8 kernel: [<ffffffff889c62f0>] :snd_mpu401_uart:_snd_mpu401_uart_interrupt+0x4c/0x70 kernel: [<ffffffff889c6391>] :snd_mpu401_uart:snd_mpu401_uart_interrupt+0x13/0x1a kernel: [<ffffffff88a1f34b>] :snd_ice1724:snd_vt1724_interrupt+0x4e/0x13a kernel: [<ffffffff80210b93>] handle_IRQ_event+0x25/0x53 kernel: [<ffffffff802b202a>] handle_fasteoi_irq+0x92/0xd1 kernel: [<ffffffff8026862a>] do_IRQ+0xff/0x16d kernel: [<ffffffff8025a631>] ret_from_intr+0x0/0xa kernel: <EOI> [<ffffffff802f5df7>] proc_info_read+0x0/0xb9 kernel: [<ffffffff802f5df9>] proc_info_read+0x2/0xb9 kernel: [<ffffffff8020b14e>] vfs_read+0xcb/0x173 kernel: [<ffffffff80211847>] sys_read+0x45/0x6e kernel: [<ffffffff8025a11e>] system_call+0x7e/0x83