ata: pata_parport: probe all units automatically

Only unit 0 is probed after registering a protocol driver or attaching
a new parport. This causes bpck and bpck6 devices to be not detected
automatically.
Probe all units just like in manual device creation (using sysfs).

Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Ondrej Zary <linux@zary.sk>
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
This commit is contained in:
Ondrej Zary 2023-02-18 23:01:22 +01:00 committed by Damien Le Moal
parent d0b3f883c4
commit 4f747dc1af
1 changed files with 2 additions and 2 deletions

View File

@ -534,7 +534,7 @@ int pata_parport_register_driver(struct pi_protocol *pr)
if (probe) {
/* probe all parports using this protocol */
idr_for_each_entry(&parport_list, parport, port_num)
pi_init_one(parport, pr, -1, 0, -1);
pi_init_one(parport, pr, -1, -1, -1);
}
mutex_unlock(&pi_mutex);
@ -669,7 +669,7 @@ static void pata_parport_attach(struct parport *port)
if (probe) {
/* probe this port using all protocols */
idr_for_each_entry(&protocols, pr, pr_num)
pi_init_one(port, pr, -1, 0, -1);
pi_init_one(port, pr, -1, -1, -1);
}
mutex_unlock(&pi_mutex);
}