From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.208.179 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795980509; b=F9ODBofxxA4RJNNhJytVq2UqrrCRD4t+ND2JhMjXqznJ1y4CGPYOodldor/8mp2zjleA j9iQEGLe3vVtemueJiruGhj5rNC4F1nP3IFYYN14KGR5UyQKY3IAsFcbvn4fKjaUPI8tY eG1VukUfxXYCc2c632+w6mLm6rd7kCG2aK0ngKemnIAvMzMgPues+j8NoUFhKfbDKFW5/ aSQQancxfFL8JhJkjbjqi6SgxhcNTINJufhLkUizwSWHwMHxAbIqH8Ls7WN0kcfiQC3N7 KpQDql98c46KaHVZpsOmE98zg32zo20xPshCve53qNdLsSHq4Ask0PGdiHRfEBCS0yA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795980509; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject: Date:Message-ID:Content-Type:Content-Transfer-Encoding:MIME-Version; bh=2B2WZsTlKYVs1fKMEGT/AHDuxdpoaHfj1b+mtMSiRf0=; b=AzdI9vPrARE0cz/gYWnoQTDJV3CZe+zuO5417quH7TM6TsJg7uV75KR+x49XdpG6TSF5 MJgaaTYARYjGV1my/bASo8y0x7tYmvhiW0JCYj93BP3Ka8OgDpCcTkxvy0H2FDAEraMYy 3QlgCODoNVNDsVxz042huQYQwkOr/BZlx+TAyIS0ttqFYiqSwFo6i669e+ZU5EaOkIXfo p1YcM66hgHjAck0AjN12h2YrtLctPPVTYc4CNDyIKw1glNMj5qG1tXfYXBHkZW+9DDwbD aCVMMpOVhe7CxzF0QYmFhOAdpzrz5xrLgEIDQrXYSN/SmafEx69ZunMd/EO4NFqbOdQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=jM2YKSLH; arc=none smtp.remote-ip=209.85.208.179 Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 87451606A31C for ; Sun, 29 Nov 2026 19:28:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 87451606A31C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=jM2YKSLH Received: by mail-lj1-f179.google.com with SMTP id 38308e7fff4ca-3ae85add512so82861551fa.0 for ; Sun, 29 Nov 2026 11:28:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1795980508; x=1796585308; darn=vger.kernel.org; h=mime-version:content-transfer-encoding:content-type:message-id:date :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to :content-type; bh=2B2WZsTlKYVs1fKMEGT/AHDuxdpoaHfj1b+mtMSiRf0=; b=jM2YKSLHHlI1mO7aOBqI1PpuKDM4r/Dg8D6vqsQ4Bv+uVmtyEv9XzCyajeIh5p6tvh cH++mpRAI3ohpGG+BB7fRE4kOGfRWbpNgHj7P85O172t3QT1RBtTCdoKkR2FU/zEObty re0LUKKpNPHg9RVDD54V3O7VJ8ZXKlUxDYTtUtt8ndr9E6vRWFOTRk8E4wCEUA0hk+qA W9b3Ok/vwKNahMhbFa7qj4gKNbhQ+iSL4NMNMUqvzmIgGGBMxAmPS5phjdBdX2zHqROH t1pYNYerAOjC+fA3iCeq1zixoAhusGNo95sGNo+2jofIuOwOoVFFBwnEAJJ8mMQ5vwKA 0pcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795980508; x=1796585308; h=mime-version:content-transfer-encoding:content-type:message-id:date :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to:content-type; bh=2B2WZsTlKYVs1fKMEGT/AHDuxdpoaHfj1b+mtMSiRf0=; b=MYoSayst1Ywai8qP24S9DSGJnU9YYajXkNnEb7jRzWKVt87Wfh16UOSE5eIgkBcjrh k02HRxmUf5BMTnL9iHpo8IVPl5VHCDTUUzaabF3OuoCOKGKbPCQzDCnQkn6cfttDp8nw pRIlnnXjUb9djBhZvBVb32+ivFJMaFcVr6nZYn1nw5XPR92rnAa4FMHGqKk/sMQxKREZ dt0uKhhhWSGKsGKsWs0SM74/SX6WhYih/+ft2wmbqFdMvEd1bI0mfVDNiP38gEUQKC14 OLpwf4kNgKyxIv9CTdOBkeTkPNHz7xbMpyFGQFbD1sAWpCEma1c1vOL7TZSh3WUeFCwt jQew== X-Gm-Message-State: APuU4Z8TK2msAa7y4TByUg4NKi0Qnn+fLQzCGeQV2eikxYaMEYfUTrgV 84e49LsiNsXXu1AoBX1JKvk3FHPJAhnF5ojlt+D+qp9DhTOgpOW0mEol X-Gm-Gg: AZFdTZddtyOcFXEKlYMECvPHTIq6BzJGCKSBHehn8nC70YVWlqT7dgozANg/AaQE9rw 00MXm0zcp6hJGO3/2nxOfbbP/lQyEEEeTjGOuVMrr9M5uq7LrK3qI4u94AzsZGuDVxjKNJvduFl MeCamxCj/mBWsz7tMdmYiIAjHWwWRDoKEawj36jjTEozWuLhXbxJWrd6kut4uriPRhwx3Iuw6jK nMBYOKh9VELDf4CaGSv30TuVaizqu+j1OpjAST0taUcWm0WCM1lgoBqf6eWTvPWwk9amw/T428E +QKm3ppvjNGqbMuJTxBRfW74Bc0P9BJeeY4BZLPr61ezzvzmeJxoyBUNZVlVx9yIlcw6XtrWLPu F2vrYiOIpQ1Hk9pGoszqyZmBy6k8+8OlGUmjSa8mSVLGq6QVJ/mknJW+rECDsxMZXtMQ8d1iLfc wkzsXDI1G4/2gOOojlESB+MdTwzHQeH3nf9CI//6gMja/XF3gHThwJx0TpXbNMn3CHEFYtpEq9Y YRJSpQkIXme6/ZUatSBs4MC60PLa9qhBK8Bky/IH4HOhLE6xQ2VSebFohA7Ju511JyqtEyhiIBo 3ik5ps1GIZcImvqXcErOzF+EY1P4FA== X-Received: by 2002:a05:6512:61aa:b0:5c1:4dbb:9fbe with SMTP id 2adb3069b0e04-5c1bc806a4emr8600482e87.47.1795980507633; Sun, 29 Nov 2026 11:28:27 -0800 (PST) Received: from [127.0.1.1] ([5.195.0.150]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5c1bd043420sm7561895e87.57.2026.11.29.11.28.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Nov 2026 11:28:27 -0800 (PST) From: Jiawen Liu To: Greg Kroah-Hartman , Jiri Slaby Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Subject: [PATCH] serial: 8250_omap: Abort probe on runtime resume failure Date: Sun, 29 Nov 2026 19:25:33 +0000 Message-ID: <179598033550.2.3869535799399729825.pattern-ext-056.4@gmail.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit 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 On AM335x, a TI sysc module clock timeout can leave the UART's parent suspended and cause pm_runtime_get_sync() to fail during probe. The driver ignores the error and reads UART_OMAP_MVER while the UART is still suspended, which can lead to incorrect revision-dependent setup. Return negative resume errors through the existing unwind, which balances the usage reference acquired by pm_runtime_get_sync(). Disable runtime PM before flushing QoS work so PM callbacks cannot queue more work after the flush. Undo wakeup setup on probe failure. Source review, x86-64 driver object builds with CONFIG_PM enabled and disabled, checkpatch, and git diff --check passed. No runtime or hardware reproduction was performed. Fixes: 61929cf0169d ("tty: serial: Add 8250-core based omap driver") Signed-off-by: Jiawen Liu --- drivers/tty/serial/8250/8250_omap.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c index ed0b8f1253327..53f9cc29c21ee 100644 --- a/drivers/tty/serial/8250/8250_omap.c +++ b/drivers/tty/serial/8250/8250_omap.c @@ -1537,7 +1537,9 @@ static int omap8250_probe(struct platform_device *pdev) if (!of_get_available_child_count(pdev->dev.of_node)) pm_runtime_set_autosuspend_delay(&pdev->dev, -1); - pm_runtime_get_sync(&pdev->dev); + ret = pm_runtime_get_sync(&pdev->dev); + if (ret < 0) + goto err; omap_serial_fill_features_erratas(&up, priv); up.port.handle_irq = omap8250_no_handle_irq; @@ -1610,9 +1612,10 @@ static int omap8250_probe(struct platform_device *pdev) dev_pm_clear_wake_irq(&pdev->dev); pm_runtime_dont_use_autosuspend(&pdev->dev); pm_runtime_put_sync(&pdev->dev); - flush_work(&priv->qos_work); pm_runtime_disable(&pdev->dev); + flush_work(&priv->qos_work); cpu_latency_qos_remove_request(&priv->pm_qos_request); + device_init_wakeup(&pdev->dev, false); return ret; } -- 2.34.1