On Tue, Dec 01, 2026 at 02:56:31AM +0400, Arina Kharlamova wrote:
> t7xx_pcie_reinit() runs on resume from L2 or L3 and on every reprobe > after a modem reset. It calls pcim_enable_device(), which did nothing > for an already enabled managed device until commit 77f79ac8de0f > ("PCI: Remove struct pci_devres.enabled status bit"). Since then each > call raises the enable count. Since commit f748a07a0b64 ("PCI: Remove > legacy pcim_release()") each call also registers a new > pcim_disable_device() devres action, and the actions pile up until the > device is unbound. > > The device is enabled once in t7xx_pci_probe() and the driver never > disables it, so drop the call from the reinit path.
This and the loongson/lsdc issue (https://lore.kernel.org/all/2026…@mbzuai.ac.ae) seem like basically the same issue, so I wonder if the pcim API could be improved to avoid it. It seems a bit subtle and like something driver authors are likely to trip over.
> Fixes: 77f79ac8de0f ("PCI: Remove struct pci_devres.enabled status bit") > Fixes: f748a07a0b64 ("PCI: Remove legacy pcim_release()") > Signed-off-by: Arina Kharlamova <arin…@mbzuai.ac.ae> > --- > Found by checks derived from the spec2patch kernel API specifications, > with the help of an AI coding assistant (Claude); I reviewed the > analysis and the fix. > --- > drivers/net/wwan/t7xx/t7xx_pci.c | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/drivers/net/wwan/t7xx/t7xx_pci.c b/drivers/net/wwan/t7xx/t7xx_pci.c > index c51c3b267186..47593e759238 100644 > --- a/drivers/net/wwan/t7xx/t7xx_pci.c > +++ b/drivers/net/wwan/t7xx/t7xx_pci.c > @@ -496,12 +496,6 @@ static void t7xx_pcie_interrupt_reinit(struct t7xx_pci_dev *t7xx_dev) > > static int t7xx_pcie_reinit(struct t7xx_pci_dev *t7xx_dev, bool is_d3) > { > - int ret; > - > - ret = pcim_enable_device(t7xx_dev->pdev); > - if (ret) > - return ret; > - > t7xx_pcie_mac_atr_init(t7xx_dev); > t7xx_pcie_interrupt_reinit(t7xx_dev); > > > --- > base-commit: 25faec9ce61c01fb45abf812a222c5b43c3cd5c5 > change-id: 20261129-s2p-d64-e315656e3f12 > > Best regards, > -- > Arina Kharlamova <arin…@mbzuai.ac.ae> >