From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=205.220.168.131 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796033676; b=wvL9hF24sdvp993R1WeEmmrfGWsjl2lRX6LvKrq4jJkV+oC8DBv13RQByhYhNK0FI2LH nyMfdtMXp7kU3w2uuKzO27HUcBBDybS67Lo4oIO9R4M7wbgBMRejXBRG53i+irwAKynAX c/KKj5VckRUjyxX4sjHo3plTgUM4YAHMN5SmEhQZqIc6d7MCW63nK4XKejJVPsYQTHjB/ QA0I/JFa/xOGaUet1LT8B3r295IHHDByMwV4P7xVg+IUFCOr1EZKmt0WRdswvHmMzHz6O 23Dp15H8Z+YUdCF9pogADpuaVjAmfvSNEEBrRO1xdjareD/VezSr+cVFciRZQ2b9wjQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796033676; h=DMARC-Filter:Received:DKIM-Signature:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg: X-Received:X-Received:Received:Message-ID:Date:MIME-Version: User-Agent:Subject:To:Cc:References:Content-Language:From:In-Reply-To: Content-Type:Content-Transfer-Encoding:X-Authority-Analysis: X-Proofpoint-GUID:X-Proofpoint-ORIG-GUID:X-Proofpoint-Spam-Info: X-Proofpoint-Spam-Details-Enc:X-Proofpoint-Virus-Version: X-Proofpoint-Spam-Details; bh=uhmuFrUnkt3BNBGoPcG7/8D3y3/wmpmbQrXbRvjEPbA=; b=rjEBfPo81aQ4mfjr9YR7Y7IK1nMz85BiYByxHiIQgppPxcG7Is2PrVvFHIVN00jq21MR tp/cIVgNQMuwth6J1704e2o/9R1j8Ks37yPyuajF3V8nUO1KyLHtwIHhwR+EgpKYW6bmK E5x7BpgJ0hOiXzZeKrO6caNYb8vOFX26s5iuTu8iorugAhEe0E/RJdWE9Pf8KKDfMAAG3 /rk6ylLltWMgKTbnMpWkkagGHZib8Xj+uOxUGCYZbF048Tzf7aQ33BF8kOLXXn/8pn1q2 LyVM61DERuhtGqAJzSvaQDjQQ1iyWVKWnyO5+vyBWvX1AIdU216GbQRfTMXdFDZ0QeA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=MqnkfaN7; dkim=pass header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=cgGsAgaY; arc=none smtp.remote-ip=205.220.168.131 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B551A606A32C for ; Mon, 30 Nov 2026 10:14:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B551A606A32C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=MqnkfaN7; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=cgGsAgaY Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6AU9Ux3g2283525 for ; Mon, 30 Nov 2026 10:14:35 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= uhmuFrUnkt3BNBGoPcG7/8D3y3/wmpmbQrXbRvjEPbA=; b=MqnkfaN7AglzHiAD Q2mzzzHireq5B9LYyyM5GukjIKv1u+jGEXErc9Ko0Eki/ShllZ/QiIWlp4Rq1trv jhOyIFz9iZzXp+xLc4/6eGihuWOt1cIZ10xNuprnWFMFxKqCf5W/m5JeXkmv7RKR 51rpm/rDHxqyZpOXX1rbbhgWZWHKWcTtwFERNX0e6J3OQEv/DFLOVK1VCIrQUvsk 9PGDr5xJMWtocj5sCPln2jVw1aKl/m4gsd6K07sw/xEKzwzwycS6vNjNCr689naJ XqxSlbXrSkkpxO4Ofoh0LG+Nd6iwybudGvxIuxn6aXy2vQ33hnOCwFw6zFx2EvY4 jZo0zg== Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4j95ndrf45-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 30 Nov 2026 10:14:34 +0000 (GMT) Received: by mail-qt1-f198.google.com with SMTP id d75a77b69052e-530cd3dff25so24969451cf.0 for ; Mon, 30 Nov 2026 02:14:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1796033674; x=1796638474; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=uhmuFrUnkt3BNBGoPcG7/8D3y3/wmpmbQrXbRvjEPbA=; b=cgGsAgaY7ZLTnV4Jb0tLmKXQDERgeLnrgch7FHx0yu+sD2mDUJsataSCIVAm9OhbuH ULH3ExpZrxOoTrLD69lsI9BafNDoe34hAJ2LIH2XC5IoEIx3wTBqu+qsNFCW6+Ceb37/ ZA1NCe6Oc1LmUWe10L29lO6lpmN5eNwEHCbOEjqW+NkwPjq2QzC8SoeGyMkac1zReSt4 8lDlD0+a6LURzV44p3mONUL59WCfXmE19yVvuCifKbE4EuzpWHCH3lLsP1aJDsse/BPD 02u9AWJUHL8MMsEqfDfmN77pu8ydKkLUeMTuAzaaXyqm8paDqqclVvYZMIsKqTE8Nek7 LsGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796033674; x=1796638474; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=uhmuFrUnkt3BNBGoPcG7/8D3y3/wmpmbQrXbRvjEPbA=; b=ZoCTpi4gTgn/bUd9Fvqil3gdcVjh9dsubivicQu//AbeyYfQ1o1iwNlZmvUqeEpqQI sBFTDT4BD1D6zXX1DWx4uAfr8YDPdV3XK4vBS3ba6qqie32NtdjHSkpZx5Tg/7j0ZwVS VAwF5E1R6M4rOdjecfMGHoI2uL0tbSSTaj7NcFUf/SIimuR3tKyCXZ+CXPunpDAdQnrZ qT6XgvuaiM13iuc0PM/4WZQtkEsd3L5KpYDTWPY/dVuNKaaj1yADPp5j5O445D6HwpbE EuHQc0gFSNBjvV9P/tSxPKIlW9ecS8mfLC42/66+fvEP7/x4+64ydpimNUXz6P50YZE0 HFFg== X-Gm-Message-State: APuU4Z8SHcT/v7UlN48Al3PfGJWJqTMaFsJMpZeMgd2jletozxLb3OJf Sul86n0JUsCwsqmvSfCXBgBeKint4f95eCSRJQN91/Y0EhLJe4wv9h8kZ5rroycP400lYppFQvn 2Zp/AmEYM+DI+wEedbRBnLNYJtHMhLuV/fNWjRv1Qs6A8/09wJDAH8Wma+pAPip2jddu6iPjl/2 o= X-Gm-Gg: AZFdTZfHideHlSRvrbcQWdhKi8BXLMQ31xFT7Ptpc4stoq03XsDnsBoV2gFN7ooIKjr W+6w2/WEYYZ/LYzC5mPxgQzKjqNylrIeGR9hxFc2cuXA1fBUu4uUT57FD0WFmWHmApOm8+zc35g UowymCBbzFXwnWOR5z641TrMl5K2s7ABGF6Ecy2PoW8nYflUDnaElJ7nDOqgBt5Kd5S9nvkDoz4 NnFm9m9nZGBq4uXq0ctZYO1MkcncW6e3uGBrmp+6ZKA9Rem3nusiXEg4rL+MIgYpFxLpw0ir01K 7+vYp1EaSd0Ng8g78EtVya/oURwy3PlvMLWKCZsnHGDPI65ZoskHJJI3NlSxlZ64pAHKUr33/gt cwYb8EXdXM2x3r2ZRrfC1hPR42edJDfd73cKgQwJUX3tgAoGkKbuyrRPGdWoDLhyRN0BZvs4= X-Received: by 2002:a05:620a:a50f:b0:949:a6de:cf5 with SMTP id af79cd13be357-949bab1db0amr6203299985a.5.1796033673819; Mon, 30 Nov 2026 02:14:33 -0800 (PST) X-Received: by 2002:a05:620a:a50f:b0:949:a6de:cf5 with SMTP id af79cd13be357-949bab1db0amr6203294385a.5.1796033673334; Mon, 30 Nov 2026 02:14:33 -0800 (PST) Received: from [192.168.226.72] ([178.235.128.140]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c513ae6872asm1114698066b.13.2026.11.30.02.14.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 30 Nov 2026 02:14:32 -0800 (PST) Message-ID: <421153ed-d665-4907-8900-19d6ccf735d9@oss.qualcomm.com> Date: Mon, 30 Nov 2026 11:14:30 +0100 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] i2c: qup: scale the transfer timeout with the transfer length To: cookys@gmail.com, Andi Shyti Cc: linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, linux-arm-msm@vger.kernel.org References: <20261114-qup-timeout-v1-1-ab3be931d506@gmail.com> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <20261114-qup-timeout-v1-1-ab3be931d506@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Authority-Analysis: v=2.4 cv=BPgmP1QG c=1 sm=1 tr=0 ts=6b0d4c8a cx=c_pps a=mPf7EqFMSY9/WdsSgAYMbA==:117 a=PRfkaYvzSr8QmIIGAkY2Sg==:17 a=IkcTkHD0fZMA:10 a=zJRp6_cAMcgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yOCtJkima9RkubShWh1s:22 a=VwQbUJbxAAAA:8 a=pGLkceISAAAA:8 a=Qq8Bu9NtBfF62FaPkMwA:9 a=QEXdDO2ut3YA:10 a=dawVfQjAaf238kedN5IG:22 X-Proofpoint-GUID: E3BOfO4Xna7V50z1crELfd8vGtWE_nrG X-Proofpoint-ORIG-GUID: E3BOfO4Xna7V50z1crELfd8vGtWE_nrG X-Proofpoint-Spam-Info: AW1haW4tMjYxMTMwMDA0MCBTYWx0ZWRfXwr+BzH9UkGPD Lx211wtYFS7OEUsWJezoJg9fC/tClyIv6wZpNRJvB5J8XZFd4wIi2VXF1TU/MHQcQlhy1DmnaUn mKqIkECA0xFETkE1/jeCUFe2kt6ndSg= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMTMwMDA0MCBTYWx0ZWRfX2LvZIg8ebqUO XZuCdUW3ycin/kRib1r3H72LD2Bz05U2ehf1MpdgMmxrkTKqXBRfTXzzLAMhxUwUqNwNNE7gFMu 6Qmodhy69v3gjQN+x2M99BUa9qrIxX9OZdZE8B6H5jdfK5OlJb7sEmh3ZeA6oBYRzXWCxeJJpb5 m1IE/f2UcWeILQp50mp1UHxjCTfC5LWdNCmXzgHpciGP59Iffdl2ZGP/UGleP7e8Rg89qsqPMnb bgFxZGb6Ir8hgg2up/kx5IompW3gboFNP+oeIFqlsan61Py3dHX4vzACUfl20AiGb42YLCynMx3 Pux7s35S8k7s1kGDHFgtajOChsx14+ykbvyg0txLDMGPnAhvefv4aq8YrEbNvmbuJ0aC9ivUPRU 0raZB4vqtJMVPdj1o6rdAQSP7hESQUwnSgiBes9bLbASV1auYapNjku2oUP7U3GTr14B28NPHyI hdlRLuNfcTkFLs/Ol2g== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-11-30_03,2026-11-27_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 clxscore=1015 impostorscore=0 bulkscore=0 spamscore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2611300040 On 11/14/26 3:02 PM, cookys via B4 Relay wrote: > From: cookys > > 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 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