mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: cookys@gmail.com, Andi Shyti <andi.shyti@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org,
	linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH] i2c: qup: scale the transfer timeout with the transfer length
Date: Mon, 30 Nov 2026 11:14:30 +0100	[thread overview]
Message-ID: <421153ed-d665-4907-8900-19d6ccf735d9@oss.qualcomm.com> (raw)
In-Reply-To: <20261114-qup-timeout-v1-1-ab3be931d506@gmail.com>

On 11/14/26 3:02 PM, cookys via B4 Relay wrote:
> From: cookys <cookys@gmail.com>
> 
> qup_i2c_probe() sets one transfer timeout for the adapter, sized for the
> largest DMA transfer: TOUT_MIN (2 s) plus MX_DMA_TX_RX_LEN (128 KiB)
> byte times. At the default 100 kHz that is 2 s + 131072 x 99 us, about
> 15 s, and every wait uses it, even for a one-byte read. A transfer that
> never completes therefore stalls its caller for 15 s before -ETIMEDOUT.
> 
> On the Lenovo ThinkSmart View (APQ8053) the FT8201 touch controller
> sometimes does not complete the first read after power-up (about one
> boot in four). edt_ft5x06 probes asynchronously, so for those 15 s
> every module init waits in async_synchronize_full(), and boot stalls:
> 
>   probe of 2-0038 with driver edt_ft5x06 returned 0 after 15343275 usecs
> 
> Set the timeout before each wait from the bytes that wait covers: the
> message length on the FIFO and block paths (v1 and v2), the total of
> the messages in the batch on the BAM path. The probe-time value is now
> only the initial default. With this change the same failed read returns
> after about 2 s:
> 
>   probe of 2-0038 with driver edt_ft5x06 returned 0 after 2353169 usecs
> 
> Tested on the ThinkSmart View (msm8953-mainline 7.3 with this change),
> 24 boots: touch probe 0.32-0.35 s, and 2.35 s in the one boot where
> the controller missed its first read.
> 
> Assisted-by: Grok:grok-4.6
> Assisted-by: Claude:claude-opus-5-5

These tags are obsolete now

> Signed-off-by: cookys <cookys@gmail.com>

Please use a well-known identity (i.e. your real name)

https://docs.kernel.org/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin

We may also want to use the new i2c_update_timeout()

Konrad

      reply	other threads:[~2026-11-30 10:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-14 14:02 cookys via B4 Relay
2026-11-30 10:14 ` Konrad Dybcio [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=421153ed-d665-4907-8900-19d6ccf735d9@oss.qualcomm.com \
    --to=konrad.dybcio@oss.qualcomm.com \
    --cc=andi.shyti@kernel.org \
    --cc=cookys@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®