Skip to contentSkip to conversation

net: tulip: dmfe: Disable PCI device on removal

PATCH In review Myeonghun Pak 2 participants 2 messages Sep 15 – Sep 16

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: tulip: dmfe: Disable PCI device on removal

dmfe_init_one() enables the PCI device and balances that reference on probe failures, but dmfe_remove_one() leaves the device enabled. Disable it after unregistering the network device and releasing the driver's mappings, DMA buffers and PCI regions.

This issue is already present in the initial Git import; its pre-Git introduction is unknown.

This issue was identified during our ongoing static-analysis research while reviewing kernel code.

Fixes 1da177e4c3f4 ("Linux-2.6.12-rc2")
Assisted-by LLM
---
 drivers/net/ethernet/dec/tulip/dmfe.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/dec/tulip/dmfe.c +1 -0
index dabc091..dcf6848 100644
@@ -528,6 +528,7 @@ static void dmfe_remove_one(struct pci_dev *pdev)
 				  TX_BUF_ALLOC * TX_DESC_CNT + 4,
 				  db->buf_pool_ptr, db->buf_pool_dma_ptr);
 		pci_release_regions(pdev);
+		pci_disable_device(pdev);
 		free_netdev(dev);	/* free board information */
 	}
 
maintainer
#1 lore raw
Quoted 1 line · On Mon, 14 Sep 2026 22:03:59 -0400 Myeonghun Pak wrote:

Subject: [PATCH net] net: tulip: dmfe: Disable PCI device on removal

Please stop wasting our time fixing bugs in 30 year old drivers that nobody cares about.

Signature · 2 lines
pw-bot: reject
pv-bot: slop