linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] i2c: i2c-qcom-geni: More properly fix the DMA race
@ 2020-10-13 21:25 Douglas Anderson
  2020-10-13 21:25 ` [PATCH v2 1/3] soc: qcom: geni: More properly switch to DMA mode Douglas Anderson
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Douglas Anderson @ 2020-10-13 21:25 UTC (permalink / raw)
  To: Bjorn Andersson, Wolfram Sang, Akash Asthana
  Cc: linux-i2c, Roja Rani Yarubandi, Stephen Boyd, Dmitry Baryshkov,
	linux-arm-msm, Douglas Anderson, Andy Gross, Girish Mahadevan,
	Karthikeyan Ramasubramanian, Mukesh Kumar Savaliya, Sagar Dharia,
	linux-kernel

Previously I landed commit 02b9aec59243 ("i2c: i2c-qcom-geni: Fix DMA
transfer race") to fix a race we were seeing.  While that most
definitely fixed the race we were seeing, it looks like it causes
problems in the TX path, which we didn't stress test until we started
trying to update firmware on devices.

Let's revert that patch and try another way: fix the original problem
by disabling the interrupts that aren't relevant to DMA transfers.
Now we can stress both TX and RX cases and see no problems.  I also
can't find any place to put an msleep() that causes problems anymore.

Since this problem only affects i2c, I'm hoping for an Ack from Bjorn
and then all these patches can go through the i2c tree.  However, if
maintainers want to work a different way out to land that's OK too.

NOTE: the 3rd patch in the series could certianly be squashed with
patch #1 or I could re-order / rejigger.  To me it seemed like a good
idea to first fix the probelm (and make the two functions as much of
an inverse as possible) and later try to clean things up.  Yell if you
want something different.

Changes in v2:
- Consistently use "val_old" to keep track of old value.
- Add comments about why UART is special.

Douglas Anderson (3):
  soc: qcom: geni: More properly switch to DMA mode
  Revert "i2c: i2c-qcom-geni: Fix DMA transfer race"
  soc: qcom: geni: Optimize/comment select fifo/dma mode

 drivers/i2c/busses/i2c-qcom-geni.c |  6 ++--
 drivers/soc/qcom/qcom-geni-se.c    | 55 ++++++++++++++++++++++--------
 2 files changed, 43 insertions(+), 18 deletions(-)

-- 
2.28.0.1011.ga647a8990f-goog


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

end of thread, other threads:[~2020-11-03 20:35 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-13 21:25 [PATCH v2 0/3] i2c: i2c-qcom-geni: More properly fix the DMA race Douglas Anderson
2020-10-13 21:25 ` [PATCH v2 1/3] soc: qcom: geni: More properly switch to DMA mode Douglas Anderson
2020-10-13 21:25 ` [PATCH v2 2/3] Revert "i2c: i2c-qcom-geni: Fix DMA transfer race" Douglas Anderson
2020-10-26 15:05   ` Bjorn Andersson
2020-10-26 15:13     ` Wolfram Sang
2020-10-26 21:15       ` Bjorn Andersson
2020-11-03 20:35         ` Wolfram Sang
2020-10-13 21:25 ` [PATCH v2 3/3] soc: qcom: geni: Optimize/comment select fifo/dma mode Douglas Anderson
2020-10-14  9:17   ` Akash Asthana
2020-10-14 23:51   ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).