diff options
author | Markus Lidel <Markus.Lidel@shadowconnect.com> | 2006-01-06 03:19:30 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-06 11:33:53 -0500 |
commit | 793fd15d9fafe5b1c71e50d3c041f1463895dbde (patch) | |
tree | a19f3f17b435a3600d19f5a5ee2136b2d3646987 /drivers/message/i2o/exec-osm.c | |
parent | a1a5ea70a6e9db6332b27fe2d96666e17aa1436b (diff) |
[PATCH] I2O: SPARC fixes
Fix lot of BE <-> LE bugs which prevent it from working on SPARC.
Signed-off-by: Markus Lidel <Markus.Lidel@shadowconnect.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/message/i2o/exec-osm.c')
-rw-r--r-- | drivers/message/i2o/exec-osm.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/message/i2o/exec-osm.c b/drivers/message/i2o/exec-osm.c index 71a09332e7c0..d24548f4c033 100644 --- a/drivers/message/i2o/exec-osm.c +++ b/drivers/message/i2o/exec-osm.c | |||
@@ -77,7 +77,7 @@ static struct i2o_exec_wait *i2o_exec_wait_alloc(void) | |||
77 | 77 | ||
78 | wait = kmalloc(sizeof(*wait), GFP_KERNEL); | 78 | wait = kmalloc(sizeof(*wait), GFP_KERNEL); |
79 | if (!wait) | 79 | if (!wait) |
80 | return ERR_PTR(-ENOMEM); | 80 | return NULL; |
81 | 81 | ||
82 | memset(wait, 0, sizeof(*wait)); | 82 | memset(wait, 0, sizeof(*wait)); |
83 | 83 | ||
@@ -271,8 +271,8 @@ static ssize_t i2o_exec_show_vendor_id(struct device *d, | |||
271 | struct i2o_device *dev = to_i2o_device(d); | 271 | struct i2o_device *dev = to_i2o_device(d); |
272 | u16 id; | 272 | u16 id; |
273 | 273 | ||
274 | if (i2o_parm_field_get(dev, 0x0000, 0, &id, 2)) { | 274 | if (!i2o_parm_field_get(dev, 0x0000, 0, &id, 2)) { |
275 | sprintf(buf, "0x%04x", id); | 275 | sprintf(buf, "0x%04x", le16_to_cpu(id)); |
276 | return strlen(buf) + 1; | 276 | return strlen(buf) + 1; |
277 | } | 277 | } |
278 | 278 | ||
@@ -293,8 +293,8 @@ static ssize_t i2o_exec_show_product_id(struct device *d, | |||
293 | struct i2o_device *dev = to_i2o_device(d); | 293 | struct i2o_device *dev = to_i2o_device(d); |
294 | u16 id; | 294 | u16 id; |
295 | 295 | ||
296 | if (i2o_parm_field_get(dev, 0x0000, 1, &id, 2)) { | 296 | if (!i2o_parm_field_get(dev, 0x0000, 1, &id, 2)) { |
297 | sprintf(buf, "0x%04x", id); | 297 | sprintf(buf, "0x%04x", le16_to_cpu(id)); |
298 | return strlen(buf) + 1; | 298 | return strlen(buf) + 1; |
299 | } | 299 | } |
300 | 300 | ||
@@ -364,7 +364,9 @@ static void i2o_exec_lct_modified(struct i2o_controller *c) | |||
364 | if (i2o_device_parse_lct(c) != -EAGAIN) | 364 | if (i2o_device_parse_lct(c) != -EAGAIN) |
365 | change_ind = c->lct->change_ind + 1; | 365 | change_ind = c->lct->change_ind + 1; |
366 | 366 | ||
367 | #ifdef CONFIG_I2O_LCT_NOTIFY_ON_CHANGES | ||
367 | i2o_exec_lct_notify(c, change_ind); | 368 | i2o_exec_lct_notify(c, change_ind); |
369 | #endif | ||
368 | }; | 370 | }; |
369 | 371 | ||
370 | /** | 372 | /** |
@@ -512,7 +514,8 @@ static int i2o_exec_lct_notify(struct i2o_controller *c, u32 change_ind) | |||
512 | 514 | ||
513 | dev = &c->pdev->dev; | 515 | dev = &c->pdev->dev; |
514 | 516 | ||
515 | if (i2o_dma_realloc(dev, &c->dlct, sb->expected_lct_size, GFP_KERNEL)) | 517 | if (i2o_dma_realloc |
518 | (dev, &c->dlct, le32_to_cpu(sb->expected_lct_size), GFP_KERNEL)) | ||
516 | return -ENOMEM; | 519 | return -ENOMEM; |
517 | 520 | ||
518 | msg = i2o_msg_get_wait(c, I2O_TIMEOUT_MESSAGE_GET); | 521 | msg = i2o_msg_get_wait(c, I2O_TIMEOUT_MESSAGE_GET); |