diag: Edit mask update algorithm
DIAG sends mask updates to peripherals over SMD control channel.
Such updates are sent when a peripehral boots up or any mask change
request is sent to target. Several automation failures were seen
with this mechanism. This change edits the mechanism in following
way:
1) Sometimes during automation, such updates are sent at a very high
speed and hence SMD layer cannot process them at the same time. This
change adds a delay in case of SMD write failure and re-tries. Such
re-tries cannot be done indefinitley, as it risks QPST timeout.
2) The SMD channel is written to when any mask update is received and
also if a peripheral comes up. Thus, there could be a race condition.
Adding a spinlock to avoid corruption due to race conditions.
3) Changes the way F3 mask updates are stored in apps table. Earlier these
masks were recorded as they are received. Now QXDM sends masks in an
orderly fashion and thus the masks were recorded in a pre-determined
manner. However, automation sends them in a random manner. This throws
off mask table parsing logic on applications processor. This change
creates the mask table at initialization time and updates them on
receiving further updates. Thus, the mask table is always parsed in
a known manner.
4) Some updates were done on a work queue earlier to avoid QPST timeouts.
This has been re-written to prevent potential race conditions. It has
been tested that QPST still does not timeout. Hence, this change safely
cleans up the work functions as well.
5) Added some debug statements to enable faster debugs in future.
Change-Id: I516e4e30a5a12757615887f5dfedad600245c9a1
CRs-Fixed: 349347
Signed-off-by:
Shalabh Jain <shalabhj@codeaurora.org>
Loading
Please sign in to comment