ata: pata_parport: probe all units automatically
authorOndrej Zary <linux@zary.sk>
Sat, 18 Feb 2023 22:01:22 +0000 (23:01 +0100)
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>
Thu, 23 Mar 2023 01:29:24 +0000 (10:29 +0900)
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>
drivers/ata/pata_parport/pata_parport.c

index c1576d943b4364b861c85ec609fd51c21dbe46d4..58bbed1074036de66af2dd431e4674fc46d2950b 100644 (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);
 }