From 61fbfa8129c1771061a0e9f47747854293081c5b Mon Sep 17 00:00:00 2001 From: Markus Lidel Date: Thu, 23 Jun 2005 22:02:11 -0700 Subject: [PATCH] I2O: bugfixes and compability enhancements Changes: - Fixed sysfs bug where user and parent links where added to the I2O device itself - Fixed bug when calculating TID for the event handler and cleaned up the workflow of i2o_driver_dispatch() - Fixed oops when no I2O device could be found for an event delivered to Exec-OSM - Fixed initialization of spinlock in Exec-OSM - Fixed memory leak in i2o_cfg_passthru() and i2o_cfg_passthru() - Removed MTRR support - Added PCI ID of Promise SX6000 with firmware >= 1.20.x.x - Turn of caching for ioremapped memory of in_queue - Added initialization sequence for Promise controllers - Moved definition of u8 / u16 / u32 for raidutils before first use Signed-off-by: Markus Lidel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/message/i2o/device.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'drivers/message/i2o/device.c') diff --git a/drivers/message/i2o/device.c b/drivers/message/i2o/device.c index eb907e87bc7..280627ae6cf 100644 --- a/drivers/message/i2o/device.c +++ b/drivers/message/i2o/device.c @@ -401,25 +401,27 @@ static int i2o_device_class_add(struct class_device *cd) /* create user entries for this device */ tmp = i2o_iop_find_device(i2o_dev->iop, i2o_dev->lct_data.user_tid); - if (tmp) + if (tmp && (tmp != i2o_dev)) sysfs_create_link(&i2o_dev->device.kobj, &tmp->device.kobj, "user"); /* create user entries refering to this device */ list_for_each_entry(tmp, &c->devices, list) - if (tmp->lct_data.user_tid == i2o_dev->lct_data.tid) + if ((tmp->lct_data.user_tid == i2o_dev->lct_data.tid) + && (tmp != i2o_dev)) sysfs_create_link(&tmp->device.kobj, &i2o_dev->device.kobj, "user"); /* create parent entries for this device */ tmp = i2o_iop_find_device(i2o_dev->iop, i2o_dev->lct_data.parent_tid); - if (tmp) + if (tmp && (tmp != i2o_dev)) sysfs_create_link(&i2o_dev->device.kobj, &tmp->device.kobj, "parent"); /* create parent entries refering to this device */ list_for_each_entry(tmp, &c->devices, list) - if (tmp->lct_data.parent_tid == i2o_dev->lct_data.tid) + if ((tmp->lct_data.parent_tid == i2o_dev->lct_data.tid) + && (tmp != i2o_dev)) sysfs_create_link(&tmp->device.kobj, &i2o_dev->device.kobj, "parent"); -- cgit v1.2.3