View | Details | Raw Unified | Return to bug 6706 | Differences between
and this patch

Collapse All | Expand All

(-)linux.orig/drivers/ieee1394/nodemgr.c (-3 / +18 lines)
Lines 14-19 Link Here
14
#include <linux/slab.h>
14
#include <linux/slab.h>
15
#include <linux/delay.h>
15
#include <linux/delay.h>
16
#include <linux/kthread.h>
16
#include <linux/kthread.h>
17
#include <linux/module.h>
17
#include <linux/moduleparam.h>
18
#include <linux/moduleparam.h>
18
#include <asm/atomic.h>
19
#include <asm/atomic.h>
19
20
Lines 259-267 static struct device nodemgr_dev_templat Link Here
259
	.release	= nodemgr_release_ne,
260
	.release	= nodemgr_release_ne,
260
};
261
};
261
262
263
/* This dummy driver prevents the host devices from being scanned. We have no
264
 * useful drivers for them yet, and there would be a deadlock possible if the
265
 * driver core scans the host device while the host's low-level driver (i.e.
266
 * the host's parent device) is being removed. */
267
static struct device_driver nodemgr_mid_layer_driver = {
268
	.bus		= &ieee1394_bus_type,
269
	.name		= "ieee1394",
270
	.owner		= THIS_MODULE,
271
};
272
262
struct device nodemgr_dev_template_host = {
273
struct device nodemgr_dev_template_host = {
263
	.bus		= &ieee1394_bus_type,
274
	.bus		= &ieee1394_bus_type,
264
	.release	= nodemgr_release_host,
275
	.release	= nodemgr_release_host,
276
	.driver		= &nodemgr_mid_layer_driver,
265
};
277
};
266
278
267
279
Lines 704-714 static int nodemgr_bus_match(struct devi Link Here
704
		return 0;
716
		return 0;
705
717
706
	ud = container_of(dev, struct unit_directory, device);
718
	ud = container_of(dev, struct unit_directory, device);
707
	driver = container_of(drv, struct hpsb_protocol_driver, driver);
708
709
	if (ud->ne->in_limbo || ud->ignore_driver)
719
	if (ud->ne->in_limbo || ud->ignore_driver)
710
		return 0;
720
		return 0;
711
721
722
	/* We only match drivers of type hpsb_protocol_driver */
723
	if (drv == &nodemgr_mid_layer_driver)
724
		return 0;
725
726
	driver = container_of(drv, struct hpsb_protocol_driver, driver);
712
        for (id = driver->id_table; id->match_flags != 0; id++) {
727
        for (id = driver->id_table; id->match_flags != 0; id++) {
713
                if ((id->match_flags & IEEE1394_MATCH_VENDOR_ID) &&
728
                if ((id->match_flags & IEEE1394_MATCH_VENDOR_ID) &&
714
                    id->vendor_id != ud->vendor_id)
729
                    id->vendor_id != ud->vendor_id)
Lines 1899-1905 int init_ieee1394_nodemgr(void) Link Here
1899
		class_unregister(&nodemgr_ne_class);
1914
		class_unregister(&nodemgr_ne_class);
1900
		return error;
1915
		return error;
1901
	}
1916
	}
1902
1917
	error = driver_register(&nodemgr_mid_layer_driver);
1903
	hpsb_register_highlevel(&nodemgr_highlevel);
1918
	hpsb_register_highlevel(&nodemgr_highlevel);
1904
	return 0;
1919
	return 0;
1905
}
1920
}

Return to bug 6706