Re: [RESEND PATCH] soundwire: cadence_master: always set CMD_ACCEPT
From: Vinod Koul
Date: Tue May 11 2021 - 08:22:32 EST
On 11-05-21, 10:52, Bard Liao wrote:
> From: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx>
> The Cadence IP can be configured in two different ways to deal with
> CMD_IGNORED replies to broadcast commands. The CMD_ACCEPT bitfield
> controls whether the command is discarded or if the IP proceeds with
> the change (typically a bank switch or clock stop command).
> The existing code seems to be inconsistent:
> a) For some historical reason, we set this CMD_ACCEPT bitfield during
> the initialization, but we don't during a resume from a clock-stoppped
> b) In addition, the loop used in the clock-stop sequence is quite
> racy, it's possible that a device has lost sync but it's still tagged
> as ATTACHED.
> c) If somehow a Device loses sync and is unable to ack a broadcast
> command, we do not have an error handling mechanism anyways. The IP
> should go ahead and let the Device regain sync at a later time.
> Make sure the CMD_ACCEPT bit is always set.