[alsa-devel] [PATCH] alsa/soc: add locking to mpc5200-psc-ac97 driver

Grant Likely grant.likely at secretlab.ca
Tue Jun 30 21:08:30 CEST 2009


On Tue, Jun 30, 2009 at 12:33 PM, Jon Smirl<jonsmirl at gmail.com> wrote:
> On Tue, Jun 30, 2009 at 12:50 PM, Grant Likely<grant.likely at secretlab.ca> wrote:
>> On Tue, Jun 30, 2009 at 12:18 AM, Wolfram Sang<w.sang at pengutronix.de> wrote:
>>>> +
>>>> +     /* Force clear the data valid bit */
>>>> +     in_be32(&psc_dma->psc_regs->ac97_data);
>>>> +
>>>
>>> No mutex involved here. I think this is either a separate patch or it needs at
>>> least to be mentioned in the patch description.
>>
>> Oops, that was sloppy.  Yes, I'll put this into a separate patch.  Thanks.
>
> Now that you have added the mutexes, do you ever need to force clear
> the valid bit?
> Maybe log an error if this happens so that we can track down why.

I know exactly why it happened.  spin_event_timeout() had a bug that
would cause it to report a false positive timeout.  The bug is fixed
and queued for merging.

However, I still think this explicit clear should be applied.  It is
just a cheap register read and it prevents the driver from getting
wedged after a timeout does event, for whatever reason.

g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.


More information about the Alsa-devel mailing list