[lkml]   [2001]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] spin[un]locks revision on new cmpci driver (5.64)
> The following patch fixes SMP hangs w/ cmpci v5.64 ( k244-ac17 ).

Let me suggest a different approach

> - - spin_lock_irqsave(&s->lock, flags);
> set_spdifout(s, rate);
> + spin_lock_irqsave(&s->lock, flags);

Split the various locked versions stuff stuff like set_adc_rate out as
__set_adc_rate which doesnt take the lock, and set_adc_rate which takes the
lock and calls the other one.

That is how several other drivers were done and avoids messy lock/unlocks
some of which in your changes I think introduce races

Ditto for enable_dac as the old code and a newer __enable_dac, as well
I suspect as __set_spdifout (although is that ever called by anyone not
holding the lock ???)

> init_timer(&s->midi.timer);
> s->midi.timer.expires =3D jiffies+1;
> s-> =3D (unsigned long)s;
> +
> + spin_unlock_irqrestore(&s->lock, flags);
> s->midi.timer.function =3D cm_midi_timer;
> + spin_lock_irqsave(&s->lock, flags);
> +

That one doesnt seem to be needed

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:54    [W:0.695 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site