On Saturday 08 December 2001 11:36, Doug Ledford wrote:
> Andris Pavenis wrote:
> >On Saturday 08 December 2001 10:39, Andris Pavenis wrote:
> >>Sorry, but this patch is still not OK. It still causes system
> >>locking up for me.
> >>
> >>In some cases I have (I added printk in __start_dac):
> >> dmabuf->count = 0
> >> dmabuf->ready = 1
> >> dmabuf->enable = 1
> >> PCM_ENABLE_OUTPUT set in dmabuf->triger
>
> Actually, since the problem is that there are obviously some "just in
> case" type calls if i810_update_lvi(), the best answer is not to even go
> through all those motions when dmabuf->count == 0. So, I would add a
> line to i810_update_lvi() that makes it return without doing anything
> when dmabuf->count == 0. That one line should solve your lockups (and
> finalize the 0.12 version).
>
Why returning non zero from __start_dac() and similar procedures when
something real has been done there is so bad. Using such return code would
ensure we never try to wait for results of __start_dac() if nothing is done
by this procedure. I think such way is also more safe against possible future
modifications as real conditions are only in a single place. Keeping them in
2 places is possible source of bitrot if driver will be updated in future.
Andris
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sat Dec 15 2001 - 21:00:12 EST