All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mtd: nand: raw: qcom_nandc: Don't clear_bam_transaction on READID
@ 2022-01-13 18:44 ` Konrad Dybcio
  0 siblings, 0 replies; 42+ messages in thread
From: Konrad Dybcio @ 2022-01-13 18:44 UTC (permalink / raw)
  To: ~postmarketos/upstreaming
  Cc: martin.botka, angelogioacchino.delregno, marijn.suijten,
	jamipkettunen, Konrad Dybcio, Manivannan Sadhasivam,
	Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
	linux-mtd, linux-arm-msm, linux-kernel

While I have absolutely 0 idea why and how, running clear_bam_transaction
when READID is issued makes the DMA totally clog up and refuse to function
at all on mdm9607. In fact, it is so bad that all the data gets garbled
and after a short while in the nand probe flow, the CPU decides that
sepuku is the only option.

Removing _READID from the if condition makes it work like a charm, I can
read data and mount partitions without a problem.

Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
---
This is totally just an observation which took me an inhumane amount of
debug prints to find.. perhaps there's a better reason behind this, but
I can't seem to find any answers.. Therefore, this is a BIG RFC!


 drivers/mtd/nand/raw/qcom_nandc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/raw/qcom_nandc.c b/drivers/mtd/nand/raw/qcom_nandc.c
index 04e6f7b26706..506006ccdf1a 100644
--- a/drivers/mtd/nand/raw/qcom_nandc.c
+++ b/drivers/mtd/nand/raw/qcom_nandc.c
@@ -1459,8 +1459,7 @@ static void pre_command(struct qcom_nand_host *host, int command)
 
 	clear_read_regs(nandc);
 
-	if (command == NAND_CMD_RESET || command == NAND_CMD_READID ||
-	    command == NAND_CMD_PARAM || command == NAND_CMD_ERASE1)
+	if (command == NAND_CMD_RESET || command == NAND_CMD_PARAM || command == NAND_CMD_ERASE1)
 		clear_bam_transaction(nandc);
 }
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2022-04-08 13:30 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-13 18:44 [PATCH] mtd: nand: raw: qcom_nandc: Don't clear_bam_transaction on READID Konrad Dybcio
2022-01-13 18:44 ` Konrad Dybcio
2022-01-13 18:45 ` Konrad Dybcio
2022-01-13 18:45   ` Konrad Dybcio
2022-01-14  7:27 ` Miquel Raynal
2022-01-14  7:27   ` Miquel Raynal
2022-01-26 10:16   ` Miquel Raynal
2022-01-26 10:16     ` Miquel Raynal
2022-01-26 10:33     ` Manivannan Sadhasivam
2022-01-26 10:33       ` Manivannan Sadhasivam
2022-01-26 10:42       ` Miquel Raynal
2022-01-26 10:42         ` Miquel Raynal
2022-01-26 11:36         ` Manivannan Sadhasivam
2022-01-26 11:36           ` Manivannan Sadhasivam
2022-01-28  4:25         ` Sricharan Ramabadhran
2022-01-28  4:25           ` Sricharan Ramabadhran
2022-01-28 17:50           ` Sricharan Ramabadhran
2022-01-28 17:50             ` Sricharan Ramabadhran
2022-01-31  9:52             ` Miquel Raynal
2022-01-31  9:52               ` Miquel Raynal
2022-01-31 10:09             ` Konrad Dybcio
2022-01-31 10:09               ` Konrad Dybcio
2022-01-31 14:13               ` Sricharan Ramabadhran
2022-01-31 14:13                 ` Sricharan Ramabadhran
2022-01-31 19:54                 ` Konrad Dybcio
2022-01-31 19:54                   ` Konrad Dybcio
2022-02-01 13:52                   ` Miquel Raynal
2022-02-01 13:52                     ` Miquel Raynal
2022-02-01 15:51                     ` Konrad Dybcio
2022-02-01 15:51                       ` Konrad Dybcio
2022-02-02  7:24                       ` Sricharan Ramabadhran
2022-02-02  7:24                         ` Sricharan Ramabadhran
2022-02-04 17:17                         ` Sricharan Ramabadhran
2022-02-04 17:17                           ` Sricharan Ramabadhran
2022-02-08 16:45                           ` Konrad Dybcio
2022-02-08 16:45                             ` Konrad Dybcio
2022-02-24  7:33                             ` Sricharan Ramabadhran
2022-02-24  7:33                               ` Sricharan Ramabadhran
2022-03-11 21:22                               ` Konrad Dybcio
2022-03-11 21:22                                 ` Konrad Dybcio
2022-04-08 13:29                                 ` Manivannan Sadhasivam
2022-04-08 13:29                                   ` Manivannan Sadhasivam

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.