[PATCH v3 0/2] some fixes in pata_parport

From: Pei Xiao

Date: Mon Sep 21 2026 - 23:38:19 EST


Patch 1 pins the protocol module before the device becomes visible.
Previously try_module_get() ran after device_register(), so a forced
module unload in between left pi->proto dangling from the moment the
device appeared on the bus.

Patch 2:fix parport attach idr_alloc for port numbers > 0

remove this patch:
https://lore.kernel.org/lkml/cec58ea83362df88f516ba7a5b895cf07edd7728.1788867690.git.xiaopei01@xxxxxxxxxx/#t

I have become cautious now, for fear of causing a disaster, so I removed
this patch. The other patches sent this time have undergone simple
compilation tests and simple tests such as rmmod. Since I don't have the
relevant hardware to test this patch, out of caution, I removed it this
time.

in v3:
1.ata: pata_parport: pin the protocol module before device_register() no
changes
2.Add ata: pata_parport: fix parport attach for port numbers > 0

Pei Xiao (2):
ata: pata_parport: pin the protocol module before device_register()
ata: pata_parport: fix parport attach for port numbers > 0

drivers/ata/pata_parport/pata_parport.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)

--
2.25.1