Lines Matching refs:msg
135 struct i2o_message *msg; in i2o_block_device_flush() local
137 msg = i2o_msg_get_wait(dev->iop, I2O_TIMEOUT_MESSAGE_GET); in i2o_block_device_flush()
138 if (IS_ERR(msg)) in i2o_block_device_flush()
139 return PTR_ERR(msg); in i2o_block_device_flush()
141 msg->u.head[0] = cpu_to_le32(FIVE_WORD_MSG_SIZE | SGL_OFFSET_0); in i2o_block_device_flush()
142 msg->u.head[1] = in i2o_block_device_flush()
145 msg->body[0] = cpu_to_le32(60 << 16); in i2o_block_device_flush()
148 return i2o_msg_post_wait(dev->iop, msg, 60); in i2o_block_device_flush()
163 struct i2o_message *msg; in i2o_block_device_mount() local
165 msg = i2o_msg_get_wait(dev->iop, I2O_TIMEOUT_MESSAGE_GET); in i2o_block_device_mount()
166 if (IS_ERR(msg)) in i2o_block_device_mount()
167 return PTR_ERR(msg); in i2o_block_device_mount()
169 msg->u.head[0] = cpu_to_le32(FIVE_WORD_MSG_SIZE | SGL_OFFSET_0); in i2o_block_device_mount()
170 msg->u.head[1] = in i2o_block_device_mount()
173 msg->body[0] = cpu_to_le32(-1); in i2o_block_device_mount()
174 msg->body[1] = cpu_to_le32(0x00000000); in i2o_block_device_mount()
177 return i2o_msg_post_wait(dev->iop, msg, 2); in i2o_block_device_mount()
192 struct i2o_message *msg; in i2o_block_device_lock() local
194 msg = i2o_msg_get_wait(dev->iop, I2O_TIMEOUT_MESSAGE_GET); in i2o_block_device_lock()
195 if (IS_ERR(msg)) in i2o_block_device_lock()
196 return PTR_ERR(msg); in i2o_block_device_lock()
198 msg->u.head[0] = cpu_to_le32(FIVE_WORD_MSG_SIZE | SGL_OFFSET_0); in i2o_block_device_lock()
199 msg->u.head[1] = in i2o_block_device_lock()
202 msg->body[0] = cpu_to_le32(-1); in i2o_block_device_lock()
205 return i2o_msg_post_wait(dev->iop, msg, 2); in i2o_block_device_lock()
220 struct i2o_message *msg; in i2o_block_device_unlock() local
222 msg = i2o_msg_get_wait(dev->iop, I2O_TIMEOUT_MESSAGE_GET); in i2o_block_device_unlock()
223 if (IS_ERR(msg)) in i2o_block_device_unlock()
224 return PTR_ERR(msg); in i2o_block_device_unlock()
226 msg->u.head[0] = cpu_to_le32(FIVE_WORD_MSG_SIZE | SGL_OFFSET_0); in i2o_block_device_unlock()
227 msg->u.head[1] = in i2o_block_device_unlock()
230 msg->body[0] = cpu_to_le32(media_id); in i2o_block_device_unlock()
233 return i2o_msg_post_wait(dev->iop, msg, 2); in i2o_block_device_unlock()
249 struct i2o_message *msg; in i2o_block_device_power() local
252 msg = i2o_msg_get_wait(c, I2O_TIMEOUT_MESSAGE_GET); in i2o_block_device_power()
253 if (IS_ERR(msg)) in i2o_block_device_power()
254 return PTR_ERR(msg); in i2o_block_device_power()
256 msg->u.head[0] = cpu_to_le32(FOUR_WORD_MSG_SIZE | SGL_OFFSET_0); in i2o_block_device_power()
257 msg->u.head[1] = in i2o_block_device_power()
260 msg->body[0] = cpu_to_le32(op << 24); in i2o_block_device_power()
263 rc = i2o_msg_post_wait(c, msg, 60); in i2o_block_device_power()
464 struct i2o_message *msg) in i2o_block_reply() argument
469 req = i2o_cntxt_list_get(c, le32_to_cpu(msg->u.s.tcntxt)); in i2o_block_reply()
480 if ((le32_to_cpu(msg->body[0]) >> 24) != 0) { in i2o_block_reply()
481 u32 status = le32_to_cpu(msg->body[0]); in i2o_block_reply()
495 "0x%04x\n", (le32_to_cpu(msg->u.head[1]) >> 12 & 0xfff), in i2o_block_reply()
503 i2o_block_end_request(req, error, le32_to_cpu(msg->body[1])); in i2o_block_reply()
721 struct i2o_message *msg; in i2o_block_transfer() local
738 msg = i2o_msg_get(c); in i2o_block_transfer()
739 if (IS_ERR(msg)) { in i2o_block_transfer()
740 rc = PTR_ERR(msg); in i2o_block_transfer()
750 msg->u.s.icntxt = cpu_to_le32(i2o_block_driver.context); in i2o_block_transfer()
751 msg->u.s.tcntxt = cpu_to_le32(tcntxt); in i2o_block_transfer()
753 mptr = &msg->body[0]; in i2o_block_transfer()
809 msg->u.head[1] = in i2o_block_transfer()
839 msg->u.head[1] = cpu_to_le32(cmd | HOST_TID << 12 | tid); in i2o_block_transfer()
853 msg->u.head[0] = in i2o_block_transfer()
854 cpu_to_le32(I2O_MESSAGE_SIZE(mptr - &msg->u.head[0]) | sgl_offset); in i2o_block_transfer()
859 i2o_msg_post(c, msg); in i2o_block_transfer()
867 i2o_msg_nop(c, msg); in i2o_block_transfer()