Commit 4f747dc1 authored by Ondrej Zary's avatar Ondrej Zary Committed by Damien Le Moal

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: default avatarSergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: default avatarOndrej Zary <linux@zary.sk>
Signed-off-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
parent d0b3f883
...@@ -534,7 +534,7 @@ int pata_parport_register_driver(struct pi_protocol *pr) ...@@ -534,7 +534,7 @@ int pata_parport_register_driver(struct pi_protocol *pr)
if (probe) { if (probe) {
/* probe all parports using this protocol */ /* probe all parports using this protocol */
idr_for_each_entry(&parport_list, parport, port_num) 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); mutex_unlock(&pi_mutex);
...@@ -669,7 +669,7 @@ static void pata_parport_attach(struct parport *port) ...@@ -669,7 +669,7 @@ static void pata_parport_attach(struct parport *port)
if (probe) { if (probe) {
/* probe this port using all protocols */ /* probe this port using all protocols */
idr_for_each_entry(&protocols, pr, pr_num) 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); mutex_unlock(&pi_mutex);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment