Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 43469
b: refs/heads/master
c: 8252bbb
h: refs/heads/master
i:
  43467: a991d20
v: v3
  • Loading branch information
Stefan Richter committed Dec 7, 2006
1 parent fd871de commit 40930ea
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cec1a31196a6edb1397ffb8fbdc0410dd8946d78
refs/heads/master: 8252bbb1363b7fe963a3eb6f8a36da619a6f5a65
21 changes: 18 additions & 3 deletions trunk/drivers/ieee1394/nodemgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/kthread.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/freezer.h>
#include <asm/atomic.h>
Expand Down Expand Up @@ -260,9 +261,20 @@ static struct device nodemgr_dev_template_ne = {
.release = nodemgr_release_ne,
};

/* This dummy driver prevents the host devices from being scanned. We have no
* useful drivers for them yet, and there would be a deadlock possible if the
* driver core scans the host device while the host's low-level driver (i.e.
* the host's parent device) is being removed. */
static struct device_driver nodemgr_mid_layer_driver = {
.bus = &ieee1394_bus_type,
.name = "nodemgr",
.owner = THIS_MODULE,
};

struct device nodemgr_dev_template_host = {
.bus = &ieee1394_bus_type,
.release = nodemgr_release_host,
.driver = &nodemgr_mid_layer_driver,
};


Expand Down Expand Up @@ -705,11 +717,14 @@ static int nodemgr_bus_match(struct device * dev, struct device_driver * drv)
return 0;

ud = container_of(dev, struct unit_directory, device);
driver = container_of(drv, struct hpsb_protocol_driver, driver);

if (ud->ne->in_limbo || ud->ignore_driver)
return 0;

/* We only match drivers of type hpsb_protocol_driver */
if (drv == &nodemgr_mid_layer_driver)
return 0;

driver = container_of(drv, struct hpsb_protocol_driver, driver);
for (id = driver->id_table; id->match_flags != 0; id++) {
if ((id->match_flags & IEEE1394_MATCH_VENDOR_ID) &&
id->vendor_id != ud->vendor_id)
Expand Down Expand Up @@ -1900,7 +1915,7 @@ int init_ieee1394_nodemgr(void)
class_unregister(&nodemgr_ne_class);
return error;
}

error = driver_register(&nodemgr_mid_layer_driver);
hpsb_register_highlevel(&nodemgr_highlevel);
return 0;
}
Expand Down

0 comments on commit 40930ea

Please sign in to comment.