| /* SPDX-License-Identifier: GPL-2.0-or-later */ |
| * IBM ASM Service Processor Device Driver |
| * Copyright (C) IBM Corporation, 2004 |
| * Author: Max Asböck <amax@us.ibm.com> |
| #define I2O_HEADER_TEMPLATE \ |
| .initiator_and_target = 0x40, \ |
| .initiator_context = 0x0 } |
| #define I2O_MESSAGE_SIZE 0x1000 |
| #define I2O_COMMAND_SIZE (I2O_MESSAGE_SIZE - sizeof(struct i2o_header)) |
| struct i2o_header header; |
| static inline unsigned short outgoing_message_size(unsigned int data_size) |
| if (data_size > I2O_COMMAND_SIZE) |
| data_size = I2O_COMMAND_SIZE; |
| size = sizeof(struct i2o_header) + data_size; |
| i2o_size = size / sizeof(u32); |
| static inline u32 incoming_data_size(struct i2o_message *i2o_message) |
| return (sizeof(u32) * i2o_message->header.message_size); |