diff options
author | Markus Lidel <Markus.Lidel@shadowconnect.com> | 2006-01-06 03:19:32 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-06 11:33:54 -0500 |
commit | dcceafe25a5f47cf69e5b46b4da6f15186ec8386 (patch) | |
tree | 4a3d581b2a1d239daf5d42cd9d2e1e5d838d817a /drivers/message/i2o/driver.c | |
parent | 24791bd48f643194d806654b587251b0f92233e8 (diff) |
[PATCH] I2O: Bugfixes
- Removed some kmalloc's with __GFP_ZERO and replace it with memset()
because it didn't work properly.
- Fixed returned message frame in i2o_cfg_passthru() which caused raidutils
to display wrong error message in case a disk was missing.
- Fixed size of printk() in i2o_scsi.c.
- Fixed get_device() and put_device() in probing of the I2O controller.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/message/i2o/driver.c')
-rw-r--r-- | drivers/message/i2o/driver.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/message/i2o/driver.c b/drivers/message/i2o/driver.c index 25292b36e2d9..9c631c873dc6 100644 --- a/drivers/message/i2o/driver.c +++ b/drivers/message/i2o/driver.c | |||
@@ -217,14 +217,15 @@ int i2o_driver_dispatch(struct i2o_controller *c, u32 m) | |||
217 | /* cut of header from message size (in 32-bit words) */ | 217 | /* cut of header from message size (in 32-bit words) */ |
218 | size = (le32_to_cpu(msg->u.head[0]) >> 16) - 5; | 218 | size = (le32_to_cpu(msg->u.head[0]) >> 16) - 5; |
219 | 219 | ||
220 | evt = kmalloc(size * 4 + sizeof(*evt), GFP_ATOMIC | __GFP_ZERO); | 220 | evt = kmalloc(size * 4 + sizeof(*evt), GFP_ATOMIC); |
221 | if (!evt) | 221 | if (!evt) |
222 | return -ENOMEM; | 222 | return -ENOMEM; |
223 | memset(evt, 0, size * 4 + sizeof(*evt)); | ||
223 | 224 | ||
224 | evt->size = size; | 225 | evt->size = size; |
225 | evt->tcntxt = le32_to_cpu(msg->u.s.tcntxt); | 226 | evt->tcntxt = le32_to_cpu(msg->u.s.tcntxt); |
226 | evt->event_indicator = le32_to_cpu(msg->body[0]); | 227 | evt->event_indicator = le32_to_cpu(msg->body[0]); |
227 | memcpy(&evt->tcntxt, &msg->u.s.tcntxt, size * 4); | 228 | memcpy(&evt->data, &msg->body[1], size * 4); |
228 | 229 | ||
229 | list_for_each_entry_safe(dev, tmp, &c->devices, list) | 230 | list_for_each_entry_safe(dev, tmp, &c->devices, list) |
230 | if (dev->lct_data.tid == tid) { | 231 | if (dev->lct_data.tid == tid) { |