summaryrefslogtreecommitdiff
path: root/include/linux/i8253.h
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2022-04-20 10:30:39 +0800
committerVinod Koul <vkoul@kernel.org>2022-05-09 12:00:20 +0530
commit3db50a99f97765be7a3cd0bff4e3f26581920515 (patch)
tree597136ae756e0b94c984c2ecab88a4acad50c073 /include/linux/i8253.h
parent60657fb9b19d4ff310bdebfd1fd5a075678c29fb (diff)
soundwire: cadence: recheck device0 attachment after status change
This patch adds a status check after device0 attachment to solve race conditions observed during attachment with multiple devices per link The sequence is the following 1) deviceA attaches as device0 2) the hardware detects a device0 status change and throws an interrupt. 3) the interrupt handler schedules the work function 4) the workqueue starts, we read the status slave0 = cdns_readl(cdns, CDNS_MCP_SLAVE_INTSTAT0); slave1 = cdns_readl(cdns, CDNS_MCP_SLAVE_INTSTAT1); we deal with the status change and program deviceA device number to a non-zero value. 5) deviceB attaches as device0, the device0 status seen by the hardware does not change. 6) we clear the CDNS_MCP_SLAVE_INTSTAT0/1 registers -> we will never detect deviceB! This patch suggest re-checking in a loop the device0 status with a PING frame, i.e. using the real device0 status instead of information on status changes. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20220420023039.14144-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'include/linux/i8253.h')
0 files changed, 0 insertions, 0 deletions