diff options
author | Tiago Brusamarello <tiago.brusamarello@datacom.ind.br> | 2018-07-26 11:12:11 -0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-07-26 15:43:09 +0100 |
commit | 516ddd79068dc02b9101bf9551a9ef7dce217b5b (patch) | |
tree | 04ab6d8c0a7e74d65a96d76f678107206a4e4edd /drivers | |
parent | 2ca300ac6e7b5143e0c03cfc91bb064dcad376f4 (diff) | |
download | linux-516ddd79068dc02b9101bf9551a9ef7dce217b5b.tar.gz linux-516ddd79068dc02b9101bf9551a9ef7dce217b5b.tar.bz2 linux-516ddd79068dc02b9101bf9551a9ef7dce217b5b.zip |
spi: spi-fsl-espi: Log fifo counters on error
Log RX and TX fifo counters when a transfer is done and these are not
zero.
Signed-off-by: Tiago Brusamarello <tiago.brusamarello@datacom.ind.br>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/spi/spi-fsl-espi.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/spi/spi-fsl-espi.c b/drivers/spi/spi-fsl-espi.c index 1d332e23f6ed..1e8ff6256079 100644 --- a/drivers/spi/spi-fsl-espi.c +++ b/drivers/spi/spi-fsl-espi.c @@ -547,8 +547,11 @@ static void fsl_espi_cpu_irq(struct fsl_espi *espi, u32 events) dev_err(espi->dev, "Transfer done but SPIE_DON isn't set!\n"); - if (SPIE_RXCNT(events) || SPIE_TXCNT(events) != FSL_ESPI_FIFO_SIZE) + if (SPIE_RXCNT(events) || SPIE_TXCNT(events) != FSL_ESPI_FIFO_SIZE) { dev_err(espi->dev, "Transfer done but rx/tx fifo's aren't empty!\n"); + dev_err(espi->dev, "SPIE_RXCNT = %d, SPIE_TXCNT = %d\n", + SPIE_RXCNT(events), SPIE_TXCNT(events)); + } complete(&espi->done); } |