--- ./sound/core/seq/seq_fifo.c.orig 2008-11-13 13:04:48.000000000 -0800 +++ ./sound/core/seq/seq_fifo.c 2008-11-13 14:28:11.000000000 -0800 @@ -51,7 +51,9 @@ spin_lock_init(&f->lock); snd_use_lock_init(&f->use_lock); + printk("snd_seq_fifo: before init\n"); init_waitqueue_head(&f->input_sleep); + printk("snd_seq_fifo: after init\n"); atomic_set(&f->overflow, 0); f->head = NULL; @@ -73,8 +75,11 @@ snd_seq_fifo_clear(f); /* wake up clients if any */ - if (waitqueue_active(&f->input_sleep)) + if (waitqueue_active(&f->input_sleep)) { + printk("snd_seq_fifo_delete: before wake_up\n"); wake_up(&f->input_sleep); + printk("snd_seq_fifo_delete: after wake_up\n"); + }; /* release resources...*/ /*....................*/ @@ -138,8 +143,11 @@ spin_unlock_irqrestore(&f->lock, flags); /* wakeup client */ - if (waitqueue_active(&f->input_sleep)) + if (waitqueue_active(&f->input_sleep)) { + printk("snd_seq_fifo_event_in: before wake_up\n"); wake_up(&f->input_sleep); + printk("snd_seq_fifo_event_in: after wake_up\n"); + }; snd_use_lock_free(&f->use_lock); @@ -186,17 +194,25 @@ return -EAGAIN; } set_current_state(TASK_INTERRUPTIBLE); + printk("snd_seq_fifo_cell_out: before add_wait_queue\n"); add_wait_queue(&f->input_sleep, &wait); + printk("snd_seq_fifo_cell_out: after add_wait_queue\n"); spin_unlock_irq(&f->lock); schedule(); spin_lock_irq(&f->lock); + printk("snd_seq_fifo_cell_out: before remove_wait_queue\n"); remove_wait_queue(&f->input_sleep, &wait); + printk("snd_seq_fifo_cell_out: after remove_wait_queue\n"); if (signal_pending(current)) { + printk("snd_seq_fifo_cell_out: before spin_unlock pend\n"); spin_unlock_irqrestore(&f->lock, flags); + printk("snd_seq_fifo_cell_out: after spin_unlock pend\n"); return -ERESTARTSYS; } } + printk("snd_seq_fifo_cell_out: before spin_unlock\n"); spin_unlock_irqrestore(&f->lock, flags); + printk("snd_seq_fifo_cell_out: after spin_unlock\n"); *cellp = cell; return 0; @@ -222,9 +238,9 @@ int snd_seq_fifo_poll_wait(struct snd_seq_fifo *f, struct file *file, poll_table *wait) { - printk(KERN_ERR "seq_fifo: before poll_wait\n"); + printk("snd_seq_fifo_poll_wait: before poll_wait\n"); poll_wait(file, &f->input_sleep, wait); - printk(KERN_ERR "seq_fifo: after poll_wait\n"); + printk("snd_seq_fifo_poll_wait: after poll_wait\n"); return (f->cells > 0); }