From nobody Mon Jun 8 19:42:34 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 671A43128CC for ; Wed, 27 May 2026 06:15:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779862518; cv=none; b=fCLPCqZCD0Frvf8Cw2DcnvZvTcdakINMQBeP9Zil9UjwQbxUfJf7WXEbAa0nVGOlZKOaE99A7gCJ1kS9x3SNzb1iOgYxHv6u2ySBd8qhe7XJGqaWS6vCYVABWG2/l068B769tgN9SEcqJ184iuDEA2quj0wobVhEsbLt/+T5Aj4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779862518; c=relaxed/simple; bh=t4rKn/9DunglydwT+0zczeYfPXxrVFXk5ITmB3kSUlo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=IYBBesfsI5TP7Eh3MIhp7fephpGHnoXSYOoqFRgH6uX4xCGvTHW3wRsZ1aewdHMR5xmdR3eKViQ5cV8HZTQA3whMuAqc4xQtlaIJwoDE5wGZmGTrjY6hKk8nY4a0dppBrKcNRcMBUZmgK6PiFHrXy10g9QCMsNfHH6V8XwE+LC4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=ZGgT22VV; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ZGgT22VV" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779862515; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=c3SPa8NBOMvLLcOlPDIQftJiCQkpARIAbJt4S7EtAos=; b=ZGgT22VVPlQXt23pvRjO9upBSZZRgBbfj01gjyXOA8+wXT65/LnFbC56cwJIIil7PQcRFB 5MqiV1bILuwQjATKhMQNuTZOhibz3Q/K/nVx8kw+KnqxJEDhxDQAn6Do3ExvXX0qMv/+mA 2KWzOS1KVNvn2kvr4uQLUCrNQBS5PrY= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-623-ww8TTqeJNvetlMHKPLP4jA-1; Wed, 27 May 2026 02:15:11 -0400 X-MC-Unique: ww8TTqeJNvetlMHKPLP4jA-1 X-Mimecast-MFC-AGG-ID: ww8TTqeJNvetlMHKPLP4jA_1779862509 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2E0871956096; Wed, 27 May 2026 06:15:09 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.44.32.75]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1D63B19560A6; Wed, 27 May 2026 06:15:02 +0000 (UTC) From: Jose Ignacio Tornos Martinez To: Chandrashekar Devegowda , Liu Haijun , Ricardo Martinez , Loic Poulain , Sergey Ryazanov , Johannes Berg , Andrew Lunn , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jose Ignacio Tornos Martinez Subject: [PATCH] net: wwan: t7xx: Add delay between MD and SAP suspend Date: Wed, 27 May 2026 08:14:51 +0200 Message-ID: <20260527061451.12710-1-jtornosm@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Content-Type: text/plain; charset="utf-8" SAP (Service Access Point) suspend occasionally times out with error -110 (ETIMEDOUT), followed by modem port errors and complete modem failure requiring a system reboot to recover. Error symptoms: mtk_t7xx 0000:72:00.0: [PM] SAP suspend error: -110 mtk_t7xx 0000:72:00.0: can't suspend (...returned -110) mtk_t7xx 0000:07:00.0: Failed to send skb: -22 mtk_t7xx 0000:07:00.0: Write error on MBIM port, -22 The modem firmware needs time after receiving the MD (modem) suspend request to complete internal operations before it is ready to accept the SAP suspend request. Without this delay, if runtime PM attempts to suspend while the firmware is busy, the SAP suspend command times out, leaving the modem in an unrecoverable state. Root cause and userspace interaction: ModemManager 1.24+ includes changes that reduce the likelihood of this issue by ensuring the modem is in a low-power state before the kernel attempts runtime suspend. However, the kernel driver should not depend on specific userspace behavior or ModemManager versions. Older versions (1.20-1.22) are still widely deployed, and the kernel should be robust regardless of userspace implementation details. There appears to be no hardware status register or other mechanism available to query whether the firmware is ready for SAP suspend. A delay between the two suspend requests is the most reliable solution found through testing. Add a 50ms delay between MD suspend and SAP suspend. This gives the firmware adequate time to complete internal operations without adding significant latency to the suspend path. This makes the driver robust across all ModemManager versions and system conditions. Testing: 96+ hours of continuous operation with ModemManager 1.20.2 and Fibocom FM350-GL modem. Zero SAP suspend timeouts observed across 2000+ successful suspend/resume cycles. Previously failed within 24 hours with 100% reproducibility. Signed-off-by: Jose Ignacio Tornos Martinez Reviewed-by: Loic Poulain --- drivers/net/wwan/t7xx/t7xx_pci.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/wwan/t7xx/t7xx_pci.c b/drivers/net/wwan/t7xx/t7xx_= pci.c index eb137e078423..46613bba1f41 100644 --- a/drivers/net/wwan/t7xx/t7xx_pci.c +++ b/drivers/net/wwan/t7xx/t7xx_pci.c @@ -447,6 +447,9 @@ static int __t7xx_pci_pm_suspend(struct pci_dev *pdev) goto abort_suspend; } =20 + /* Delay to prevent SAP suspend timeout */ + msleep(50); + ret =3D t7xx_send_pm_request(t7xx_dev, H2D_CH_SUSPEND_REQ_AP); if (ret) { t7xx_send_pm_request(t7xx_dev, H2D_CH_RESUME_REQ); --=20 2.54.0