Re: tpci: refactor kernel module
[email protected] Wed, 5 Aug 2026 10:38:21 +0000
| Newsgroups | gmane.linux.ltp |
|---|---|
| Message-ID | <[email protected]> |
Hi Andrea,
On Wed, 5 Aug 2026, Andrea Cervesato wrote:
> tpci: refactor kernel module
--- [PATCH 2/2] ---
> tcpi: refactor test using new API
Low: Could "tcpi" be corrected to "tpci" so that the subject names the
component changed by the patch?
> for (int i = 0; i < PCI_TCASES_NUM; ++i) {
> if (!is_target && is_destructive_test(i))
> continue;
High: Could PCI_DISABLE remain excluded from this automatic sequence until
the module can detach the normal driver and restore the original device
state?
This path calls pci_release_regions() while that driver is still bound,
although the kernel API requires all region use to have ceased. No later
path requests those regions again. In addition, Linux 7.2
pci_disable_device() only disables bus mastering; it does not move
current_state to D3hot or D3cold. Consequently, an ordinary D0 target both
reports TFAIL and may be left without its driver's resource reservations.
> if (!devices_found)
> tst_brk(TCONF, "no PCI device found on the system");
Medium: Could the test separately track whether target_bus/target_devfn was
selected when -d is supplied?
If that BDF is absent or has no driver, its selection returns ENODEV, but
devices_found can still be nonzero because of other devices. The run then
passes after executing only safe cases, without reporting that none of the
requested destructive cases ran.
Verdict - Needs revision
---
Note:
The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
--
Mailing list info: https://lists.linux.it/listinfo/ltp