diff options
author | Markus Lidel <Markus.Lidel@shadowconnect.com> | 2006-01-06 03:19:29 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-06 11:33:53 -0500 |
commit | a1a5ea70a6e9db6332b27fe2d96666e17aa1436b (patch) | |
tree | 7edfe920aa40af94464ab05539d449dbe5689254 /drivers/message/i2o/bus-osm.c | |
parent | 347a8dc3b815f0c0fa62a1df075184ffe4cbdcf1 (diff) |
[PATCH] I2O: changed I2O API to create I2O messages in kernel memory
Changed the I2O API to create I2O messages first in kernel memory and then
transfer it at once over the PCI bus instead of sending each quad-word over
the PCI bus.
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/bus-osm.c')
-rw-r--r-- | drivers/message/i2o/bus-osm.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/message/i2o/bus-osm.c b/drivers/message/i2o/bus-osm.c index 151b228e1cb3..ce039d322fd0 100644 --- a/drivers/message/i2o/bus-osm.c +++ b/drivers/message/i2o/bus-osm.c | |||
@@ -39,18 +39,18 @@ static struct i2o_class_id i2o_bus_class_id[] = { | |||
39 | */ | 39 | */ |
40 | static int i2o_bus_scan(struct i2o_device *dev) | 40 | static int i2o_bus_scan(struct i2o_device *dev) |
41 | { | 41 | { |
42 | struct i2o_message __iomem *msg; | 42 | struct i2o_message *msg; |
43 | u32 m; | ||
44 | 43 | ||
45 | m = i2o_msg_get_wait(dev->iop, &msg, I2O_TIMEOUT_MESSAGE_GET); | 44 | msg = i2o_msg_get_wait(dev->iop, I2O_TIMEOUT_MESSAGE_GET); |
46 | if (m == I2O_QUEUE_EMPTY) | 45 | if (IS_ERR(msg)) |
47 | return -ETIMEDOUT; | 46 | return -ETIMEDOUT; |
48 | 47 | ||
49 | writel(FIVE_WORD_MSG_SIZE | SGL_OFFSET_0, &msg->u.head[0]); | 48 | msg->u.head[0] = cpu_to_le32(FIVE_WORD_MSG_SIZE | SGL_OFFSET_0); |
50 | writel(I2O_CMD_BUS_SCAN << 24 | HOST_TID << 12 | dev->lct_data.tid, | 49 | msg->u.head[1] = |
51 | &msg->u.head[1]); | 50 | cpu_to_le32(I2O_CMD_BUS_SCAN << 24 | HOST_TID << 12 | dev->lct_data. |
51 | tid); | ||
52 | 52 | ||
53 | return i2o_msg_post_wait(dev->iop, m, 60); | 53 | return i2o_msg_post_wait(dev->iop, msg, 60); |
54 | }; | 54 | }; |
55 | 55 | ||
56 | /** | 56 | /** |
@@ -59,8 +59,9 @@ static int i2o_bus_scan(struct i2o_device *dev) | |||
59 | * | 59 | * |
60 | * Returns count. | 60 | * Returns count. |
61 | */ | 61 | */ |
62 | static ssize_t i2o_bus_store_scan(struct device *d, struct device_attribute *attr, const char *buf, | 62 | static ssize_t i2o_bus_store_scan(struct device *d, |
63 | size_t count) | 63 | struct device_attribute *attr, |
64 | const char *buf, size_t count) | ||
64 | { | 65 | { |
65 | struct i2o_device *i2o_dev = to_i2o_device(d); | 66 | struct i2o_device *i2o_dev = to_i2o_device(d); |
66 | int rc; | 67 | int rc; |