From: sashiko-bot@kernel.org
To: "Weidong Wang" <weidongw@illinois.edu>
Cc: linux-serial@vger.kernel.org
Subject: Re: [PATCH] serial: 8250_pci: don't re-enable an enabled device on resume
Date: Thu, 12 Nov 2026 07:16:55 +0000 [thread overview]
Message-ID: <sashiko-outbox-210581@kernel.org> (raw)
In-Reply-To: <20261112-c3-n108-v1-1-d48f8da5894e@illinois.edu>
> From: Weidong Wang <weidongw@illinois.edu>
>
> pciserial_resume_one() calls pci_enable_device() on every resume. Probe
> already enabled the device with pcim_enable_device() and suspend does
> not disable it, so each suspend/resume cycle adds one to enable_cnt
> that nothing drops. After N cycles, unbinding the driver leaves
> enable_cnt at N and the device enabled.
>
> Only re-enable the device when it is actually disabled.
>
> Found by an AI code review agent (an LLM-based bug-finding tool
> developed by Zijie Zhao and the submitter) and confirmed on an
> unmodified kernel, without error injection, on x86_64 under QEMU with
> the "pci-serial" device (1b36:0002), which 8250_pci drives: after five
> s2idle cycles with pm_test=devices, /sys/bus/pci/devices/.../enable
> read 6, and 5 after unbinding the driver; without the suspend
> cycles it read 1, and 0 after unbinding.
>
> With this patch it stays at 1 across the cycles and drops to 0 on
> unbind.
>
> The reproducer, fix and changelog were drafted with AI assistance
> (Claude), then reviewed and tested by the submitter.
>
> Cc: Zijie Zhao <zijie4@illinois.edu>
> Signed-off-by: Weidong Wang <weidongw@illinois.edu>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261112-c3-n108-v1-1-d48f8da5894e@illinois.edu?part=1
prev parent reply other threads:[~2026-11-12 7:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 7:07 [PATCH] serial: 8250_pci: don't re-enable an enabled device on resume Weidong Wang via B4 Relay
2026-11-12 7:16 ` sashiko-bot [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=sashiko-outbox-210581@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=weidongw@illinois.edu \
/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