Skip to content

Commit

Permalink
[S390] Improve AP bus device removal.
Browse files Browse the repository at this point in the history
Added a call to device_unregister() in ap_scan_bus() to actively
remove unavailable AP bus devices with every bus scan. Previously
devices were only removed in ap_queue_message() or __ap_poll_all().

Signed-off-by: Ralph Wuerthner <rwuerthn@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Ralph Wuerthner authored and Martin Schwidefsky committed Oct 27, 2006
1 parent 12bae23 commit f3b017d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/s390/crypto/ap_bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -739,11 +739,16 @@ static void ap_scan_bus(void *data)
dev = bus_find_device(&ap_bus_type, NULL,
(void *)(unsigned long)qid,
__ap_scan_bus);
rc = ap_query_queue(qid, &queue_depth, &device_type);
if (dev && rc) {
put_device(dev);
device_unregister(dev);
continue;
}
if (dev) {
put_device(dev);
continue;
}
rc = ap_query_queue(qid, &queue_depth, &device_type);
if (rc)
continue;
rc = ap_init_queue(qid);
Expand Down

0 comments on commit f3b017d

Please sign in to comment.