diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2020-09-08 21:45:18 +0800 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2020-09-10 11:21:04 +0530 |
commit | 4724f12c1315efa79a0cbf74dfb0c9b98b1a4bff (patch) | |
tree | 9e49625eb556d9fb651e7665ad398f297e0d2acd /drivers/soundwire | |
parent | c2819e196b3cc1901a4612f72e66da4821966a5e (diff) | |
download | linux-4724f12c1315efa79a0cbf74dfb0c9b98b1a4bff.tar.gz linux-4724f12c1315efa79a0cbf74dfb0c9b98b1a4bff.tar.bz2 linux-4724f12c1315efa79a0cbf74dfb0c9b98b1a4bff.zip |
soundwire: bus: use quirk to filter out invalid parity errors
If a Slave device reports with a quirk that its initial parity check
may be incorrect, filter it but keep the parity checks active in
steady state.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Link: https://lore.kernel.org/r/20200908134521.6781-5-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/soundwire')
-rw-r--r-- | drivers/soundwire/bus.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index 30b0bed16630..09185e5cfd70 100644 --- a/drivers/soundwire/bus.c +++ b/drivers/soundwire/bus.c @@ -1362,6 +1362,8 @@ static int sdw_handle_slave_alerts(struct sdw_slave *slave) unsigned long port; bool slave_notify = false; u8 buf, buf2[2], _buf, _buf2[2]; + bool parity_check; + bool parity_quirk; sdw_modify_slave_status(slave, SDW_SLAVE_ALERT); @@ -1394,7 +1396,11 @@ static int sdw_handle_slave_alerts(struct sdw_slave *slave) * interrupt */ if (buf & SDW_SCP_INT1_PARITY) { - if (slave->prop.scp_int1_mask & SDW_SCP_INT1_PARITY) + parity_check = slave->prop.scp_int1_mask & SDW_SCP_INT1_PARITY; + parity_quirk = !slave->first_interrupt_done && + (slave->prop.quirks & SDW_SLAVE_QUIRKS_INVALID_INITIAL_PARITY); + + if (parity_check && !parity_quirk) dev_err(&slave->dev, "Parity error detected\n"); clear |= SDW_SCP_INT1_PARITY; } |