Skip to contentSkip to conversation

spi: mxs: Assign message status after transfer finished

PATCH New Marek Vasut 2 participants 6 messages Oct 14, 2012 – Oct 26, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 spi: mxs: Assign message status after transfer finished

In the current code implementing the MXS SPI driver, every transferred message had assigned status = 0, which is not correct. Properly assign status returned from the I/O functions.

Cc Chris Ball <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Grant Likely <[email protected]>
Cc Mark Brown <[email protected]>
Cc Shawn Guo <[email protected]>
---
 drivers/spi/spi-mxs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi-mxs.c +1 -1
index edf1360..5a63bcd 100644
@@ -480,7 +480,7 @@ static int mxs_spi_transfer_one(struct spi_master *master,
 		first = last = 0;
 	}
 
-	m->status = 0;
+	m->status = status;
 	spi_finalize_current_message(master);
 
 	return status;
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 2/2 spi: mxs: Terminate DMA in case of DMA timeout

In case the SPI DMA times out, the DMA might still be in some kind of inconsistent state. Issue dmaengine_terminate_all() on the particular channel to kill off all operations before continuing.

Cc Chris Ball <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Grant Likely <[email protected]>
Cc Mark Brown <[email protected]>
Cc Shawn Guo <[email protected]>
---
 drivers/spi/spi-mxs.c |    1 +
 1 file changed, 1 insertion(+)
drivers/spi/spi-mxs.c +1 -0
index 5a63bcd..86dd04d 100644
@@ -323,6 +323,7 @@ static int mxs_spi_txrx_dma(struct mxs_spi *spi, int cs,
 	if (!ret) {
 		dev_err(ssp->dev, "DMA transfer timeout\n");
 		ret = -ETIMEDOUT;
+		dmaengine_terminate_all(ssp->dmach);
 		goto err_vmalloc;
 	}
 
Signature · 1 line
1.7.10.4
Applied
#2 lore raw

PATCH 1/2 spi: mxs: Assign message status after transfer finished

In reply to Marek Vasut
Quoted 3 lines · Marek Vasut

In the current code implementing the MXS SPI driver, every transferred message had assigned status = 0, which is not correct. Properly assign status returned from the I/O functions.

Applied both, thanks.

#3 lore raw

PATCH 1/2 spi: mxs: Assign message status after transfer finished

Dear Mark Brown,

Quoted 6 lines · Marek Vasut
Quoted 3 lines

In the current code implementing the MXS SPI driver, every transferred message had assigned status = 0, which is not correct. Properly assign status returned from the I/O functions.

Applied both, thanks.

Will they hit 3.7 please?

Best regards,
Marek Vasut

#4 lore raw

PATCH 1/2 spi: mxs: Assign message status after transfer finished

Quoted 5 lines · Marek Vasut

Dear Mark Brown,

Quoted 1 line

Applied both, thanks.

Will they hit 3.7 please?

I hadn't been going to do that, no - nothing about them seemed
especially urgent?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20121026/f86cf974/attachment.sig>

#5 lore raw

PATCH 1/2 spi: mxs: Assign message status after transfer finished

Dear Mark Brown,

Quoted 9 lines · Marek Vasut
Quoted 5 lines

Dear Mark Brown,

Quoted 1 line

Applied both, thanks.

Will they hit 3.7 please?

I hadn't been going to do that, no - nothing about them seemed especially urgent?

They're fixes, I'd be glad if you could slip them in. They're not urgent, but it'd be nice to have them included. Esp. since 3.7 seems like a really _good_ kernel for MXS, I'd love to have everything nicely polished in it.

Best regards,
Marek Vasut