aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2005-12-12 23:03:19 -0500
committerJody McIntyre <scjody@modernduck.com>2005-12-12 23:03:19 -0500
commit51c1d80e929bace26d2d795bd77fcc14b02ba3bb (patch)
tree0da6fdaf7b83263d3bcebc380d99d7001b3ff21e /drivers/ieee1394
parente38dc0ae24635a2a8a68d87cd0f4a13e74a52d98 (diff)
ieee1394: run high-level updates before high-level probes
After a bus reset, let nodemgr call high-level update hooks first for nodes which do not need to be probed. The main benefit is for a bus with more than one SBP-2 device: SBP-2 reconnects will be performed before SBP-2 logins, thus have a much higher chance to succeed, and their SCSI devices will not be blocked much longer than necessary. This was demonstrated for Linux 2.4 by Dave Cinege a while ago. A better approach would be to perform time-consuming probes in parallel by a subthread. I actually plan to implement this for sbp2 but it may take a while to get that done and tested. Until then, this tweak is a huge improvement for users with multiple SBP-2 devices. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Jody McIntyre <scjody@modernduck.com>
Diffstat (limited to 'drivers/ieee1394')
-rw-r--r--drivers/ieee1394/nodemgr.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c
index 01ab2bfa8d9d..0ec298768621 100644
--- a/drivers/ieee1394/nodemgr.c
+++ b/drivers/ieee1394/nodemgr.c
@@ -1407,14 +1407,28 @@ static void nodemgr_node_probe(struct host_info *hi, int generation)
1407 struct hpsb_host *host = hi->host; 1407 struct hpsb_host *host = hi->host;
1408 struct class *class = &nodemgr_ne_class; 1408 struct class *class = &nodemgr_ne_class;
1409 struct class_device *cdev; 1409 struct class_device *cdev;
1410 struct node_entry *ne;
1410 1411
1411 /* Do some processing of the nodes we've probed. This pulls them 1412 /* Do some processing of the nodes we've probed. This pulls them
1412 * into the sysfs layer if needed, and can result in processing of 1413 * into the sysfs layer if needed, and can result in processing of
1413 * unit-directories, or just updating the node and it's 1414 * unit-directories, or just updating the node and it's
1414 * unit-directories. */ 1415 * unit-directories.
1416 *
1417 * Run updates before probes. Usually, updates are time-critical
1418 * while probes are time-consuming. (Well, those probes need some
1419 * improvement...) */
1420
1415 down_read(&class->subsys.rwsem); 1421 down_read(&class->subsys.rwsem);
1416 list_for_each_entry(cdev, &class->children, node) 1422 list_for_each_entry(cdev, &class->children, node) {
1417 nodemgr_probe_ne(hi, container_of(cdev, struct node_entry, class_dev), generation); 1423 ne = container_of(cdev, struct node_entry, class_dev);
1424 if (!ne->needs_probe)
1425 nodemgr_probe_ne(hi, ne, generation);
1426 }
1427 list_for_each_entry(cdev, &class->children, node) {
1428 ne = container_of(cdev, struct node_entry, class_dev);
1429 if (ne->needs_probe)
1430 nodemgr_probe_ne(hi, ne, generation);
1431 }
1418 up_read(&class->subsys.rwsem); 1432 up_read(&class->subsys.rwsem);
1419 1433
1420 1434