All of lore.kernel.org
 help / color / mirror / Atom feed
* [S390] Improve AP bus device removal.
@ 2006-10-26  9:02 Martin Schwidefsky
  0 siblings, 0 replies; only message in thread
From: Martin Schwidefsky @ 2006-10-26  9:02 UTC (permalink / raw)
  To: linux-kernel, rwuerthn

From: Ralph Wuerthner <rwuerthn@de.ibm.com>

[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>
---

 drivers/s390/crypto/ap_bus.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletion(-)

diff -urpN linux-2.6/drivers/s390/crypto/ap_bus.c linux-2.6-patched/drivers/s390/crypto/ap_bus.c
--- linux-2.6/drivers/s390/crypto/ap_bus.c	2006-10-26 10:43:46.000000000 +0200
+++ linux-2.6-patched/drivers/s390/crypto/ap_bus.c	2006-10-26 10:44:05.000000000 +0200
@@ -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);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-10-26  9:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-26  9:02 [S390] Improve AP bus device removal Martin Schwidefsky

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.