mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-17 18:56:24 +00:00
spi: Fixes for v5.19
A couple of fixes that came in during the merge window, a driver fix for spurious timeouts in the fsi driver and an improvement to make the core display error messages for transfer_one_message() to help people debug things. -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmKXHOwACgkQJNaLcl1U h9Cxtgf+KCYOZovyBpvHaGuwUrf5fJ3SEbS5BaEhGjyQfTSeSbZuct0+gREJbBu4 AkEOt1/VXWm3EILFbLJV1xsvIj7xhQMwGRhoKEAZ0wjtV/YK2IMC6ISvrDZL2Prr +A/p5PJu0dHLFlOUfKbkEMa2Ez/Gm/BUR6sfCzswqG6qebRcVF6svctZ/gm+Dqvy cBvJxqIbSdYwzAqkbrTCZiQgbtJrntagaP4WtpReTMpqrLuXD/VBFK8anzhVsREz wCTFBi0tSSe6yXOgtGc1Gzvj2wFZ2LRGPvV7nLSfQ2YaruoSM1rwo/xPxtWxsn85 MK8dp1L5d0j7LKzG2q/gPhih0oA1Bg== =gf5o -----END PGP SIGNATURE----- Merge tag 'spi-fix-v5.19-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A couple of fixes that came in during the merge window: a driver fix for spurious timeouts in the fsi driver and an improvement to make the core display error messages for transfer_one_message() to help people debug things" * tag 'spi-fix-v5.19-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: core: Display return code when failing to transfer message spi: fsi: Fix spurious timeout
This commit is contained in:
commit
129bdb30fb
@ -319,12 +319,12 @@ static int fsi_spi_transfer_data(struct fsi_spi *ctx,
|
||||
|
||||
end = jiffies + msecs_to_jiffies(SPI_FSI_STATUS_TIMEOUT_MS);
|
||||
do {
|
||||
if (time_after(jiffies, end))
|
||||
return -ETIMEDOUT;
|
||||
|
||||
rc = fsi_spi_status(ctx, &status, "TX");
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
if (time_after(jiffies, end))
|
||||
return -ETIMEDOUT;
|
||||
} while (status & SPI_FSI_STATUS_TDR_FULL);
|
||||
|
||||
sent += nb;
|
||||
@ -337,12 +337,12 @@ static int fsi_spi_transfer_data(struct fsi_spi *ctx,
|
||||
while (transfer->len > recv) {
|
||||
end = jiffies + msecs_to_jiffies(SPI_FSI_STATUS_TIMEOUT_MS);
|
||||
do {
|
||||
if (time_after(jiffies, end))
|
||||
return -ETIMEDOUT;
|
||||
|
||||
rc = fsi_spi_status(ctx, &status, "RX");
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
if (time_after(jiffies, end))
|
||||
return -ETIMEDOUT;
|
||||
} while (!(status & SPI_FSI_STATUS_RDR_FULL));
|
||||
|
||||
rc = fsi_spi_read_reg(ctx, SPI_FSI_DATA_RX, &in);
|
||||
|
@ -1672,7 +1672,8 @@ static void __spi_pump_messages(struct spi_controller *ctlr, bool in_kthread)
|
||||
ret = ctlr->transfer_one_message(ctlr, msg);
|
||||
if (ret) {
|
||||
dev_err(&ctlr->dev,
|
||||
"failed to transfer one message from queue\n");
|
||||
"failed to transfer one message from queue: %d\n",
|
||||
ret);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user