[S390] Improve AP bus device removal.

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>
This commit is contained in:
Ralph Wuerthner 2006-10-27 12:39:26 +02:00 committed by Martin Schwidefsky
parent 12bae23507
commit f3b017d8c9
1 changed files with 6 additions and 1 deletions

View File

@ -739,11 +739,16 @@ static void ap_scan_bus(void *data)
dev = bus_find_device(&ap_bus_type, NULL, dev = bus_find_device(&ap_bus_type, NULL,
(void *)(unsigned long)qid, (void *)(unsigned long)qid,
__ap_scan_bus); __ap_scan_bus);
rc = ap_query_queue(qid, &queue_depth, &device_type);
if (dev && rc) {
put_device(dev);
device_unregister(dev);
continue;
}
if (dev) { if (dev) {
put_device(dev); put_device(dev);
continue; continue;
} }
rc = ap_query_queue(qid, &queue_depth, &device_type);
if (rc) if (rc)
continue; continue;
rc = ap_init_queue(qid); rc = ap_init_queue(qid);