Commit 2ea5117b authored by Benjamin Romer's avatar Benjamin Romer Committed by Greg Kroah-Hartman

staging: unisys: refactor CONTROLVM_MESSAGE_PACKET

This patch refactors the message union and internal structures so they
will pass checkpatch.pl. The typedef is removed, and references are
changed to struct controlvm_message_packet. The comments were reflowed
and cleaned up to remove unnecessary information, and CamelCase member
names were fixed here and in references:

busNo => bus_no
devNo => dev_no
deviceCount => dev_count
channelAddr => channel_addr
channelBytes => channel_bytes
busDataTypeGuid => bus_data_type_uuid
busInstGuid => bus_inst_uuid
destroyBus => destroy_bus
guestHandle => guest_handle
recvBusInterruptHandle => recv_bus_irq_handle
configureBus => configure_bus
createDevuce => create_device
destroyDevice => destroy_device
configureDevice => configure_device
reconfigureDevice => reconfigure_device
busChangeState => bus_change_state
physicalDevice => phys_device
busCount => bus_count
switchCount => switch_count
platformNumber => platformNumber
initChipset => init_chipset
Options => options
Test => test
chipsetSelftest => chipset_selftest
Signed-off-by: default avatarBenjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b9b141e8
...@@ -251,135 +251,100 @@ typedef struct _CONTROLVM_MESSAGE_DEVICE_CONFIGURE { ...@@ -251,135 +251,100 @@ typedef struct _CONTROLVM_MESSAGE_DEVICE_CONFIGURE {
} CONTROLVM_MESSAGE_DEVICE_CONFIGURE; /* total 56 bytes */ } CONTROLVM_MESSAGE_DEVICE_CONFIGURE; /* total 56 bytes */
/* This is the format for a message in any ControlVm queue. */ /* This is the format for a message in any ControlVm queue. */
typedef struct _CONTROLVM_MESSAGE_PACKET { struct controlvm_message_packet {
union { union {
/* BEGIN Request messages */
struct { struct {
u32 busNo; /*< bus # (0..n-1) from the msg u32 bus_no; /* bus # (0..n-1) from the msg
* receiver's perspective */ * receiver's perspective */
u32 dev_count; /* indicates the max number of
/* Control uses header SegmentIndex field to access bus number... */ * devices on this bus */
u32 deviceCount; /*< indicates the max number of u64 channel_addr; /* Guest physical address of
* devices on this bus */ * the channel, which can be
u64 channelAddr; /*< Guest physical address of the * dereferenced by the receiver
* channel, which can be * of this ControlVm command */
* dereferenced by the receiver u64 channel_bytes; /* size of the channel */
* of this ControlVm command */ uuid_le bus_data_type_uuid; /* indicates format of
u64 channelBytes; /*< size of the channel in bytes */ * data in bus channel*/
uuid_le busDataTypeGuid;/*< indicates format of data in uuid_le bus_inst_uuid; /* instance uuid for the bus */
bus channel */ } create_bus; /* for CONTROLVM_BUS_CREATE */
uuid_le busInstGuid; /*< instance guid for the bus */
} createBus; /* for CONTROLVM_BUS_CREATE */
struct { struct {
u32 busNo; /*< bus # (0..n-1) from the msg u32 bus_no; /* bus # (0..n-1) from the msg
* receiver's perspective */ * receiver's perspective */
/* Control uses header SegmentIndex field to access bus number... */
u32 reserved; /* Natural alignment purposes */ u32 reserved; /* Natural alignment purposes */
} destroyBus; /* for CONTROLVM_BUS_DESTROY */ } destroy_bus; /* for CONTROLVM_BUS_DESTROY */
struct { struct {
u32 busNo; /*< bus # (0..n-1) from the u32 bus_no; /* bus # (0..n-1) from the receiver's
* msg receiver's * perspective */
* perspective */ u32 reserved1; /* for alignment purposes */
u64 guest_handle; /* This is used to convert
/* Control uses header SegmentIndex field to access bus number... */ * guest physical address to
u32 reserved1; /* for alignment purposes */ * physical address */
u64 guestHandle; /* This is used to convert u64 recv_bus_irq_handle;
* guest physical address to real /* specifies interrupt info. It is used by SP
* physical address for DMA, for ex. */ * to register to receive interrupts from the
u64 recvBusInterruptHandle;/*< specifies interrupt * CP. This interrupt is used for bus level
* info. It is used by SP to register * notifications. The corresponding
* to receive interrupts from the CP. * sendBusInterruptHandle is kept in CP. */
* This interrupt is used for bus } configure_bus; /* for CONTROLVM_BUS_CONFIGURE */
* level notifications. The
* corresponding
* sendBusInterruptHandle is kept in
* CP. */
} configureBus; /* for CONTROLVM_BUS_CONFIGURE */
/* for CONTROLVM_DEVICE_CREATE */ /* for CONTROLVM_DEVICE_CREATE */
CONTROLVM_PACKET_DEVICE_CREATE createDevice; CONTROLVM_PACKET_DEVICE_CREATE create_device;
struct { struct {
u32 busNo; /*< bus # (0..n-1) from the msg u32 bus_no; /* bus # (0..n-1) from the msg
* receiver's perspective */ * receiver's perspective */
u32 dev_no; /* bus-relative (0..n-1) device # */
/* Control uses header SegmentIndex field to access bus number... */ } destroy_device; /* for CONTROLVM_DEVICE_DESTROY */
u32 devNo; /*< bus-relative (0..n-1) device
* number */
} destroyDevice; /* for CONTROLVM_DEVICE_DESTROY */
/* for CONTROLVM_DEVICE_CONFIGURE */ /* for CONTROLVM_DEVICE_CONFIGURE */
CONTROLVM_PACKET_DEVICE_CONFIGURE configureDevice; CONTROLVM_PACKET_DEVICE_CONFIGURE configure_device;
struct { struct {
u32 busNo; /*< bus # (0..n-1) from the msg u32 bus_no; /* bus # (0..n-1) from the msg
* receiver's perspective */ * receiver's perspective */
u32 dev_no; /* bus-relative (0..n-1) device # */
/* Control uses header SegmentIndex field to access bus number... */ } reconfigure_device; /* for CONTROLVM_DEVICE_RECONFIGURE */
u32 devNo; /*< bus-relative (0..n-1) device
* number */
} reconfigureDevice; /* for CONTROLVM_DEVICE_RECONFIGURE */
struct { struct {
u32 busNo; u32 bus_no;
struct spar_segment_state state; struct spar_segment_state state;
u8 reserved[2]; /* Natural alignment purposes */ u8 reserved[2]; /* Natural alignment purposes */
} busChangeState; /* for CONTROLVM_BUS_CHANGESTATE */ } bus_change_state; /* for CONTROLVM_BUS_CHANGESTATE */
struct { struct {
u32 busNo; u32 bus_no;
u32 devNo; u32 dev_no;
struct spar_segment_state state; struct spar_segment_state state;
struct { struct {
u32 physicalDevice:1; /* =1 if message is for u32 phys_device:1; /* =1 if message is for
* a physical device */ * a physical device */
/* remaining bits in this 32-bit word are available */
} flags; } flags;
u8 reserved[2]; /* Natural alignment purposes */ u8 reserved[2]; /* Natural alignment purposes */
} deviceChangeState; /* for CONTROLVM_DEVICE_CHANGESTATE */ } device_change_state; /* for CONTROLVM_DEVICE_CHANGESTATE */
struct { struct {
u32 busNo; u32 bus_no;
u32 devNo; u32 dev_no;
struct spar_segment_state state; struct spar_segment_state state;
u8 reserved[6]; /* Natural alignment purposes */ u8 reserved[6]; /* Natural alignment purposes */
} deviceChangeStateEvent; /* for CONTROLVM_DEVICE_CHANGESTATE_EVENT */ } device_change_state_event;
/* for CONTROLVM_DEVICE_CHANGESTATE_EVENT */
struct { struct {
u32 busCount; /*< indicates the max number of busses */ u32 bus_count; /* indicates the max number of busses */
u32 switchCount; /*< indicates the max number of u32 switch_count; /* indicates the max number of
* switches (applicable for service * switches if a service partition */
* partition only) */
enum ultra_chipset_feature features; enum ultra_chipset_feature features;
u32 platformNumber; /* Platform Number */ u32 platform_number; /* Platform Number */
} initChipset; /* for CONTROLVM_CHIPSET_INIT */ } init_chipset; /* for CONTROLVM_CHIPSET_INIT */
struct { struct {
u32 Options; /*< reserved */ u32 options; /* reserved */
u32 Test; /*< bit 0 set to run embedded selftest */ u32 test; /* bit 0 set to run embedded selftest */
} chipsetSelftest; /* for CONTROLVM_CHIPSET_SELFTEST */ } chipset_selftest; /* for CONTROLVM_CHIPSET_SELFTEST */
u64 addr; /* a physical address of something, that can be
/* END Request messages */ * dereferenced by the receiver of this
* ControlVm command (depends on command id) */
/* BEGIN Response messages */ u64 handle; /* a handle of something (depends on command
* id) */
/* END Response messages */
/* BEGIN Event messages */
/* END Event messages */
/* BEGIN Ack messages */
/* END Ack messages */
u64 addr; /*< a physical address of something, that
* can be dereferenced by the receiver of
* this ControlVm command (depends on
* command id) */
u64 handle; /*< a handle of something (depends on
* command id) */
}; };
} CONTROLVM_MESSAGE_PACKET; };
/* All messages in any ControlVm queue have this layout. */ /* All messages in any ControlVm queue have this layout. */
typedef struct _CONTROLVM_MESSAGE { typedef struct _CONTROLVM_MESSAGE {
CONTROLVM_MESSAGE_HEADER hdr; CONTROLVM_MESSAGE_HEADER hdr;
CONTROLVM_MESSAGE_PACKET cmd; struct controlvm_message_packet cmd;
} CONTROLVM_MESSAGE; } CONTROLVM_MESSAGE;
typedef struct _DEVICE_MAP { typedef struct _DEVICE_MAP {
......
...@@ -155,7 +155,8 @@ u64 uislib_storage_channel(int client_id); ...@@ -155,7 +155,8 @@ u64 uislib_storage_channel(int client_id);
#endif #endif
int uislib_get_owned_pdest(struct uisscsi_dest *pdest); int uislib_get_owned_pdest(struct uisscsi_dest *pdest);
int uislib_send_event(enum controlvm_id id, CONTROLVM_MESSAGE_PACKET *event); int uislib_send_event(enum controlvm_id id,
struct controlvm_message_packet *event);
/* structure used by vhba & vnic to keep track of queue & thread info */ /* structure used by vhba & vnic to keep track of queue & thread info */
struct chaninfo { struct chaninfo {
......
...@@ -168,8 +168,8 @@ create_bus(CONTROLVM_MESSAGE *msg, char *buf) ...@@ -168,8 +168,8 @@ create_bus(CONTROLVM_MESSAGE *msg, char *buf)
return CONTROLVM_RESP_ERROR_MAX_BUSES; return CONTROLVM_RESP_ERROR_MAX_BUSES;
} }
busNo = msg->cmd.createBus.busNo; busNo = msg->cmd.create_bus.bus_no;
deviceCount = msg->cmd.createBus.deviceCount; deviceCount = msg->cmd.create_bus.dev_count;
POSTCODE_LINUX_4(BUS_CREATE_ENTRY_PC, busNo, deviceCount, POSTCODE_LINUX_4(BUS_CREATE_ENTRY_PC, busNo, deviceCount,
POSTCODE_SEVERITY_INFO); POSTCODE_SEVERITY_INFO);
...@@ -199,7 +199,7 @@ create_bus(CONTROLVM_MESSAGE *msg, char *buf) ...@@ -199,7 +199,7 @@ create_bus(CONTROLVM_MESSAGE *msg, char *buf)
bus->device_count = deviceCount; bus->device_count = deviceCount;
bus->device = bus->device =
(struct device_info **) ((char *) bus + sizeof(struct bus_info)); (struct device_info **) ((char *) bus + sizeof(struct bus_info));
bus->bus_inst_uuid = msg->cmd.createBus.busInstGuid; bus->bus_inst_uuid = msg->cmd.create_bus.bus_inst_uuid;
bus->bus_channel_bytes = 0; bus->bus_channel_bytes = 0;
bus->bus_channel = NULL; bus->bus_channel = NULL;
...@@ -221,12 +221,12 @@ create_bus(CONTROLVM_MESSAGE *msg, char *buf) ...@@ -221,12 +221,12 @@ create_bus(CONTROLVM_MESSAGE *msg, char *buf)
kfree(bus); kfree(bus);
return CONTROLVM_RESP_ERROR_ALREADY_DONE; return CONTROLVM_RESP_ERROR_ALREADY_DONE;
} }
if ((msg->cmd.createBus.channelAddr != 0) if ((msg->cmd.create_bus.channel_addr != 0)
&& (msg->cmd.createBus.channelBytes != 0)) { && (msg->cmd.create_bus.channel_bytes != 0)) {
bus->bus_channel_bytes = msg->cmd.createBus.channelBytes; bus->bus_channel_bytes = msg->cmd.create_bus.channel_bytes;
bus->bus_channel = bus->bus_channel =
init_vbus_channel(msg->cmd.createBus.channelAddr, init_vbus_channel(msg->cmd.create_bus.channel_addr,
msg->cmd.createBus.channelBytes); msg->cmd.create_bus.channel_bytes);
} }
/* the msg is bound for virtpci; send guest_msgs struct to callback */ /* the msg is bound for virtpci; send guest_msgs struct to callback */
if (!msg->hdr.Flags.server) { if (!msg->hdr.Flags.server) {
...@@ -236,8 +236,8 @@ create_bus(CONTROLVM_MESSAGE *msg, char *buf) ...@@ -236,8 +236,8 @@ create_bus(CONTROLVM_MESSAGE *msg, char *buf)
cmd.add_vbus.bus_no = busNo; cmd.add_vbus.bus_no = busNo;
cmd.add_vbus.chanptr = bus->bus_channel; cmd.add_vbus.chanptr = bus->bus_channel;
cmd.add_vbus.dev_count = deviceCount; cmd.add_vbus.dev_count = deviceCount;
cmd.add_vbus.bus_uuid = msg->cmd.createBus.busDataTypeGuid; cmd.add_vbus.bus_uuid = msg->cmd.create_bus.bus_data_type_uuid;
cmd.add_vbus.instance_uuid = msg->cmd.createBus.busInstGuid; cmd.add_vbus.instance_uuid = msg->cmd.create_bus.bus_inst_uuid;
if (!virt_control_chan_func) { if (!virt_control_chan_func) {
LOGERR("CONTROLVM_BUS_CREATE Failed: virtpci callback not registered."); LOGERR("CONTROLVM_BUS_CREATE Failed: virtpci callback not registered.");
POSTCODE_LINUX_3(BUS_CREATE_FAILURE_PC, bus->bus_no, POSTCODE_LINUX_3(BUS_CREATE_FAILURE_PC, bus->bus_no,
...@@ -279,7 +279,7 @@ destroy_bus(CONTROLVM_MESSAGE *msg, char *buf) ...@@ -279,7 +279,7 @@ destroy_bus(CONTROLVM_MESSAGE *msg, char *buf)
struct guest_msgs cmd; struct guest_msgs cmd;
u32 busNo; u32 busNo;
busNo = msg->cmd.destroyBus.busNo; busNo = msg->cmd.destroy_bus.bus_no;
read_lock(&BusListLock); read_lock(&BusListLock);
...@@ -354,8 +354,8 @@ create_device(CONTROLVM_MESSAGE *msg, char *buf) ...@@ -354,8 +354,8 @@ create_device(CONTROLVM_MESSAGE *msg, char *buf)
u64 minSize = MIN_IO_CHANNEL_SIZE; u64 minSize = MIN_IO_CHANNEL_SIZE;
struct req_handler_info *pReqHandler; struct req_handler_info *pReqHandler;
busNo = msg->cmd.createDevice.busNo; busNo = msg->cmd.create_device.busNo;
devNo = msg->cmd.createDevice.devNo; devNo = msg->cmd.create_device.devNo;
POSTCODE_LINUX_4(DEVICE_CREATE_ENTRY_PC, devNo, busNo, POSTCODE_LINUX_4(DEVICE_CREATE_ENTRY_PC, devNo, busNo,
POSTCODE_SEVERITY_INFO); POSTCODE_SEVERITY_INFO);
...@@ -368,9 +368,9 @@ create_device(CONTROLVM_MESSAGE *msg, char *buf) ...@@ -368,9 +368,9 @@ create_device(CONTROLVM_MESSAGE *msg, char *buf)
return CONTROLVM_RESP_ERROR_KMALLOC_FAILED; return CONTROLVM_RESP_ERROR_KMALLOC_FAILED;
} }
dev->channel_uuid = msg->cmd.createDevice.dataTypeGuid; dev->channel_uuid = msg->cmd.create_device.dataTypeGuid;
dev->intr = msg->cmd.createDevice.intr; dev->intr = msg->cmd.create_device.intr;
dev->channel_addr = msg->cmd.createDevice.channelAddr; dev->channel_addr = msg->cmd.create_device.channelAddr;
dev->bus_no = busNo; dev->bus_no = busNo;
dev->dev_no = devNo; dev->dev_no = devNo;
sema_init(&dev->interrupt_callback_lock, 1); /* unlocked */ sema_init(&dev->interrupt_callback_lock, 1); /* unlocked */
...@@ -385,9 +385,9 @@ create_device(CONTROLVM_MESSAGE *msg, char *buf) ...@@ -385,9 +385,9 @@ create_device(CONTROLVM_MESSAGE *msg, char *buf)
* channel * channel
*/ */
minSize = pReqHandler->min_channel_bytes; minSize = pReqHandler->min_channel_bytes;
if (minSize > msg->cmd.createDevice.channelBytes) { if (minSize > msg->cmd.create_device.channelBytes) {
LOGERR("CONTROLVM_DEVICE_CREATE Failed: channel size is too small, channel size:0x%lx, required size:0x%lx", LOGERR("CONTROLVM_DEVICE_CREATE Failed: channel size is too small, channel size:0x%lx, required size:0x%lx",
(ulong) msg->cmd.createDevice.channelBytes, (ulong) msg->cmd.create_device.channelBytes,
(ulong) minSize); (ulong) minSize);
POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, devNo, busNo, POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, devNo, busNo,
POSTCODE_SEVERITY_ERR); POSTCODE_SEVERITY_ERR);
...@@ -396,19 +396,19 @@ create_device(CONTROLVM_MESSAGE *msg, char *buf) ...@@ -396,19 +396,19 @@ create_device(CONTROLVM_MESSAGE *msg, char *buf)
} }
dev->chanptr = dev->chanptr =
uislib_ioremap_cache(dev->channel_addr, uislib_ioremap_cache(dev->channel_addr,
msg->cmd.createDevice.channelBytes); msg->cmd.create_device.channelBytes);
if (!dev->chanptr) { if (!dev->chanptr) {
LOGERR("CONTROLVM_DEVICE_CREATE Failed: ioremap_cache of channelAddr:%Lx for channelBytes:%llu failed", LOGERR("CONTROLVM_DEVICE_CREATE Failed: ioremap_cache of channelAddr:%Lx for channelBytes:%llu failed",
dev->channel_addr, dev->channel_addr,
msg->cmd.createDevice.channelBytes); msg->cmd.create_device.channelBytes);
result = CONTROLVM_RESP_ERROR_IOREMAP_FAILED; result = CONTROLVM_RESP_ERROR_IOREMAP_FAILED;
POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, devNo, busNo, POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, devNo, busNo,
POSTCODE_SEVERITY_ERR); POSTCODE_SEVERITY_ERR);
goto Away; goto Away;
} }
} }
dev->instance_uuid = msg->cmd.createDevice.devInstGuid; dev->instance_uuid = msg->cmd.create_device.devInstGuid;
dev->channel_bytes = msg->cmd.createDevice.channelBytes; dev->channel_bytes = msg->cmd.create_device.channelBytes;
read_lock(&BusListLock); read_lock(&BusListLock);
for (bus = BusListHead; bus; bus = bus->next) { for (bus = BusListHead; bus; bus = bus->next) {
...@@ -552,8 +552,8 @@ pause_device(CONTROLVM_MESSAGE *msg) ...@@ -552,8 +552,8 @@ pause_device(CONTROLVM_MESSAGE *msg)
struct guest_msgs cmd; struct guest_msgs cmd;
int retval = CONTROLVM_RESP_SUCCESS; int retval = CONTROLVM_RESP_SUCCESS;
busNo = msg->cmd.deviceChangeState.busNo; busNo = msg->cmd.device_change_state.bus_no;
devNo = msg->cmd.deviceChangeState.devNo; devNo = msg->cmd.device_change_state.dev_no;
read_lock(&BusListLock); read_lock(&BusListLock);
for (bus = BusListHead; bus; bus = bus->next) { for (bus = BusListHead; bus; bus = bus->next) {
...@@ -620,8 +620,8 @@ resume_device(CONTROLVM_MESSAGE *msg) ...@@ -620,8 +620,8 @@ resume_device(CONTROLVM_MESSAGE *msg)
struct guest_msgs cmd; struct guest_msgs cmd;
int retval = CONTROLVM_RESP_SUCCESS; int retval = CONTROLVM_RESP_SUCCESS;
busNo = msg->cmd.deviceChangeState.busNo; busNo = msg->cmd.device_change_state.bus_no;
devNo = msg->cmd.deviceChangeState.devNo; devNo = msg->cmd.device_change_state.dev_no;
read_lock(&BusListLock); read_lock(&BusListLock);
for (bus = BusListHead; bus; bus = bus->next) { for (bus = BusListHead; bus; bus = bus->next) {
...@@ -689,8 +689,8 @@ destroy_device(CONTROLVM_MESSAGE *msg, char *buf) ...@@ -689,8 +689,8 @@ destroy_device(CONTROLVM_MESSAGE *msg, char *buf)
struct guest_msgs cmd; struct guest_msgs cmd;
int retval = CONTROLVM_RESP_SUCCESS; int retval = CONTROLVM_RESP_SUCCESS;
busNo = msg->cmd.destroyDevice.busNo; busNo = msg->cmd.destroy_device.bus_no;
devNo = msg->cmd.destroyDevice.devNo; devNo = msg->cmd.destroy_device.bus_no;
read_lock(&BusListLock); read_lock(&BusListLock);
LOGINF("destroy_device called for busNo=%u, devNo=%u", busNo, devNo); LOGINF("destroy_device called for busNo=%u, devNo=%u", busNo, devNo);
...@@ -773,8 +773,8 @@ init_chipset(CONTROLVM_MESSAGE *msg, char *buf) ...@@ -773,8 +773,8 @@ init_chipset(CONTROLVM_MESSAGE *msg, char *buf)
{ {
POSTCODE_LINUX_2(CHIPSET_INIT_ENTRY_PC, POSTCODE_SEVERITY_INFO); POSTCODE_LINUX_2(CHIPSET_INIT_ENTRY_PC, POSTCODE_SEVERITY_INFO);
MaxBusCount = msg->cmd.initChipset.busCount; MaxBusCount = msg->cmd.init_chipset.bus_count;
PlatformNumber = msg->cmd.initChipset.platformNumber; PlatformNumber = msg->cmd.init_chipset.platform_number;
PhysicalDataChan = 0; PhysicalDataChan = 0;
/* We need to make sure we have our functions registered /* We need to make sure we have our functions registered
...@@ -799,7 +799,7 @@ delete_bus_glue(u32 busNo) ...@@ -799,7 +799,7 @@ delete_bus_glue(u32 busNo)
CONTROLVM_MESSAGE msg; CONTROLVM_MESSAGE msg;
init_msg_header(&msg, CONTROLVM_BUS_DESTROY, 0, 0); init_msg_header(&msg, CONTROLVM_BUS_DESTROY, 0, 0);
msg.cmd.destroyBus.busNo = busNo; msg.cmd.destroy_bus.bus_no = busNo;
if (destroy_bus(&msg, NULL) != CONTROLVM_RESP_SUCCESS) { if (destroy_bus(&msg, NULL) != CONTROLVM_RESP_SUCCESS) {
LOGERR("destroy_bus failed. busNo=0x%x\n", busNo); LOGERR("destroy_bus failed. busNo=0x%x\n", busNo);
return 0; return 0;
...@@ -813,8 +813,8 @@ delete_device_glue(u32 busNo, u32 devNo) ...@@ -813,8 +813,8 @@ delete_device_glue(u32 busNo, u32 devNo)
CONTROLVM_MESSAGE msg; CONTROLVM_MESSAGE msg;
init_msg_header(&msg, CONTROLVM_DEVICE_DESTROY, 0, 0); init_msg_header(&msg, CONTROLVM_DEVICE_DESTROY, 0, 0);
msg.cmd.destroyDevice.busNo = busNo; msg.cmd.destroy_device.bus_no = busNo;
msg.cmd.destroyDevice.devNo = devNo; msg.cmd.destroy_device.dev_no = devNo;
if (destroy_device(&msg, NULL) != CONTROLVM_RESP_SUCCESS) { if (destroy_device(&msg, NULL) != CONTROLVM_RESP_SUCCESS) {
LOGERR("destroy_device failed. busNo=0x%x devNo=0x%x\n", busNo, LOGERR("destroy_device failed. busNo=0x%x devNo=0x%x\n", busNo,
devNo); devNo);
...@@ -843,8 +843,8 @@ uislib_client_inject_add_bus(u32 bus_no, uuid_le inst_uuid, ...@@ -843,8 +843,8 @@ uislib_client_inject_add_bus(u32 bus_no, uuid_le inst_uuid,
* after number 4, then the add_vnic will fail, and the * after number 4, then the add_vnic will fail, and the
* ultraboot will fail. * ultraboot will fail.
*/ */
msg.cmd.initChipset.busCount = 23; msg.cmd.init_chipset.bus_count = 23;
msg.cmd.initChipset.switchCount = 0; msg.cmd.init_chipset.switch_count = 0;
if (init_chipset(&msg, NULL) != CONTROLVM_RESP_SUCCESS) { if (init_chipset(&msg, NULL) != CONTROLVM_RESP_SUCCESS) {
LOGERR("init_chipset failed.\n"); LOGERR("init_chipset failed.\n");
return 0; return 0;
...@@ -858,10 +858,10 @@ uislib_client_inject_add_bus(u32 bus_no, uuid_le inst_uuid, ...@@ -858,10 +858,10 @@ uislib_client_inject_add_bus(u32 bus_no, uuid_le inst_uuid,
POSTCODE_LINUX_3(BUS_CREATE_ENTRY_PC, bus_no, POSTCODE_LINUX_3(BUS_CREATE_ENTRY_PC, bus_no,
POSTCODE_SEVERITY_WARNING); POSTCODE_SEVERITY_WARNING);
init_msg_header(&msg, CONTROLVM_BUS_CREATE, 0, 0); init_msg_header(&msg, CONTROLVM_BUS_CREATE, 0, 0);
msg.cmd.createBus.busNo = bus_no; msg.cmd.create_bus.bus_no = bus_no;
msg.cmd.createBus.deviceCount = 23; /* devNo+1; */ msg.cmd.create_bus.dev_count = 23; /* devNo+1; */
msg.cmd.createBus.channelAddr = channel_addr; msg.cmd.create_bus.channel_addr = channel_addr;
msg.cmd.createBus.channelBytes = n_channel_bytes; msg.cmd.create_bus.channel_bytes = n_channel_bytes;
if (create_bus(&msg, NULL) != CONTROLVM_RESP_SUCCESS) { if (create_bus(&msg, NULL) != CONTROLVM_RESP_SUCCESS) {
LOGERR("create_bus failed.\n"); LOGERR("create_bus failed.\n");
POSTCODE_LINUX_3(BUS_CREATE_FAILURE_PC, bus_no, POSTCODE_LINUX_3(BUS_CREATE_FAILURE_PC, bus_no,
...@@ -889,9 +889,9 @@ uislib_client_inject_pause_vhba(u32 bus_no, u32 dev_no) ...@@ -889,9 +889,9 @@ uislib_client_inject_pause_vhba(u32 bus_no, u32 dev_no)
int rc; int rc;
init_msg_header(&msg, CONTROLVM_DEVICE_CHANGESTATE, 0, 0); init_msg_header(&msg, CONTROLVM_DEVICE_CHANGESTATE, 0, 0);
msg.cmd.deviceChangeState.busNo = bus_no; msg.cmd.device_change_state.bus_no = bus_no;
msg.cmd.deviceChangeState.devNo = dev_no; msg.cmd.device_change_state.dev_no = dev_no;
msg.cmd.deviceChangeState.state = segment_state_standby; msg.cmd.device_change_state.state = segment_state_standby;
rc = pause_device(&msg); rc = pause_device(&msg);
if (rc != CONTROLVM_RESP_SUCCESS) { if (rc != CONTROLVM_RESP_SUCCESS) {
LOGERR("VHBA pause_device failed. busNo=0x%x devNo=0x%x\n", LOGERR("VHBA pause_device failed. busNo=0x%x devNo=0x%x\n",
...@@ -909,9 +909,9 @@ uislib_client_inject_resume_vhba(u32 bus_no, u32 dev_no) ...@@ -909,9 +909,9 @@ uislib_client_inject_resume_vhba(u32 bus_no, u32 dev_no)
int rc; int rc;
init_msg_header(&msg, CONTROLVM_DEVICE_CHANGESTATE, 0, 0); init_msg_header(&msg, CONTROLVM_DEVICE_CHANGESTATE, 0, 0);
msg.cmd.deviceChangeState.busNo = bus_no; msg.cmd.device_change_state.bus_no = bus_no;
msg.cmd.deviceChangeState.devNo = dev_no; msg.cmd.device_change_state.dev_no = dev_no;
msg.cmd.deviceChangeState.state = segment_state_running; msg.cmd.device_change_state.state = segment_state_running;
rc = resume_device(&msg); rc = resume_device(&msg);
if (rc != CONTROLVM_RESP_SUCCESS) { if (rc != CONTROLVM_RESP_SUCCESS) {
LOGERR("VHBA resume_device failed. busNo=0x%x devNo=0x%x\n", LOGERR("VHBA resume_device failed. busNo=0x%x devNo=0x%x\n",
...@@ -945,15 +945,15 @@ uislib_client_inject_add_vhba(u32 bus_no, u32 dev_no, ...@@ -945,15 +945,15 @@ uislib_client_inject_add_vhba(u32 bus_no, u32 dev_no,
* need to be ioremap()ed * need to be ioremap()ed
*/ */
msg.hdr.Flags.testMessage = 1; msg.hdr.Flags.testMessage = 1;
msg.cmd.createDevice.busNo = bus_no; msg.cmd.create_device.busNo = bus_no;
msg.cmd.createDevice.devNo = dev_no; msg.cmd.create_device.devNo = dev_no;
msg.cmd.createDevice.devInstGuid = inst_uuid; msg.cmd.create_device.devInstGuid = inst_uuid;
if (intr) if (intr)
msg.cmd.createDevice.intr = *intr; msg.cmd.create_device.intr = *intr;
else else
memset(&msg.cmd.createDevice.intr, 0, memset(&msg.cmd.create_device.intr, 0,
sizeof(struct irq_info)); sizeof(struct irq_info));
msg.cmd.createDevice.channelAddr = phys_chan_addr; msg.cmd.create_device.channelAddr = phys_chan_addr;
if (chan_bytes < MIN_IO_CHANNEL_SIZE) { if (chan_bytes < MIN_IO_CHANNEL_SIZE) {
LOGERR("wrong channel size.chan_bytes = 0x%x IO_CHANNEL_SIZE= 0x%x\n", LOGERR("wrong channel size.chan_bytes = 0x%x IO_CHANNEL_SIZE= 0x%x\n",
chan_bytes, (unsigned int) MIN_IO_CHANNEL_SIZE); chan_bytes, (unsigned int) MIN_IO_CHANNEL_SIZE);
...@@ -961,8 +961,8 @@ uislib_client_inject_add_vhba(u32 bus_no, u32 dev_no, ...@@ -961,8 +961,8 @@ uislib_client_inject_add_vhba(u32 bus_no, u32 dev_no,
MIN_IO_CHANNEL_SIZE, POSTCODE_SEVERITY_ERR); MIN_IO_CHANNEL_SIZE, POSTCODE_SEVERITY_ERR);
return 0; return 0;
} }
msg.cmd.createDevice.channelBytes = chan_bytes; msg.cmd.create_device.channelBytes = chan_bytes;
msg.cmd.createDevice.dataTypeGuid = spar_vhba_channel_protocol_uuid; msg.cmd.create_device.dataTypeGuid = spar_vhba_channel_protocol_uuid;
if (create_device(&msg, NULL) != CONTROLVM_RESP_SUCCESS) { if (create_device(&msg, NULL) != CONTROLVM_RESP_SUCCESS) {
LOGERR("VHBA create_device failed.\n"); LOGERR("VHBA create_device failed.\n");
POSTCODE_LINUX_4(VHBA_CREATE_FAILURE_PC, dev_no, bus_no, POSTCODE_LINUX_4(VHBA_CREATE_FAILURE_PC, dev_no, bus_no,
...@@ -1004,15 +1004,15 @@ uislib_client_inject_add_vnic(u32 bus_no, u32 dev_no, ...@@ -1004,15 +1004,15 @@ uislib_client_inject_add_vnic(u32 bus_no, u32 dev_no,
* need to be ioremap()ed * need to be ioremap()ed
*/ */
msg.hdr.Flags.testMessage = 1; msg.hdr.Flags.testMessage = 1;
msg.cmd.createDevice.busNo = bus_no; msg.cmd.create_device.busNo = bus_no;
msg.cmd.createDevice.devNo = dev_no; msg.cmd.create_device.devNo = dev_no;
msg.cmd.createDevice.devInstGuid = inst_uuid; msg.cmd.create_device.devInstGuid = inst_uuid;
if (intr) if (intr)
msg.cmd.createDevice.intr = *intr; msg.cmd.create_device.intr = *intr;
else else
memset(&msg.cmd.createDevice.intr, 0, memset(&msg.cmd.create_device.intr, 0,
sizeof(struct irq_info)); sizeof(struct irq_info));
msg.cmd.createDevice.channelAddr = phys_chan_addr; msg.cmd.create_device.channelAddr = phys_chan_addr;
if (chan_bytes < MIN_IO_CHANNEL_SIZE) { if (chan_bytes < MIN_IO_CHANNEL_SIZE) {
LOGERR("wrong channel size.chan_bytes = 0x%x IO_CHANNEL_SIZE= 0x%x\n", LOGERR("wrong channel size.chan_bytes = 0x%x IO_CHANNEL_SIZE= 0x%x\n",
chan_bytes, (unsigned int) MIN_IO_CHANNEL_SIZE); chan_bytes, (unsigned int) MIN_IO_CHANNEL_SIZE);
...@@ -1020,8 +1020,8 @@ uislib_client_inject_add_vnic(u32 bus_no, u32 dev_no, ...@@ -1020,8 +1020,8 @@ uislib_client_inject_add_vnic(u32 bus_no, u32 dev_no,
MIN_IO_CHANNEL_SIZE, POSTCODE_SEVERITY_ERR); MIN_IO_CHANNEL_SIZE, POSTCODE_SEVERITY_ERR);
return 0; return 0;
} }
msg.cmd.createDevice.channelBytes = chan_bytes; msg.cmd.create_device.channelBytes = chan_bytes;
msg.cmd.createDevice.dataTypeGuid = spar_vnic_channel_protocol_uuid; msg.cmd.create_device.dataTypeGuid = spar_vnic_channel_protocol_uuid;
if (create_device(&msg, NULL) != CONTROLVM_RESP_SUCCESS) { if (create_device(&msg, NULL) != CONTROLVM_RESP_SUCCESS) {
LOGERR("VNIC create_device failed.\n"); LOGERR("VNIC create_device failed.\n");
POSTCODE_LINUX_4(VNIC_CREATE_FAILURE_PC, dev_no, bus_no, POSTCODE_LINUX_4(VNIC_CREATE_FAILURE_PC, dev_no, bus_no,
...@@ -1042,9 +1042,9 @@ uislib_client_inject_pause_vnic(u32 bus_no, u32 dev_no) ...@@ -1042,9 +1042,9 @@ uislib_client_inject_pause_vnic(u32 bus_no, u32 dev_no)
int rc; int rc;
init_msg_header(&msg, CONTROLVM_DEVICE_CHANGESTATE, 0, 0); init_msg_header(&msg, CONTROLVM_DEVICE_CHANGESTATE, 0, 0);
msg.cmd.deviceChangeState.busNo = bus_no; msg.cmd.device_change_state.bus_no = bus_no;
msg.cmd.deviceChangeState.devNo = dev_no; msg.cmd.device_change_state.dev_no = dev_no;
msg.cmd.deviceChangeState.state = segment_state_standby; msg.cmd.device_change_state.state = segment_state_standby;
rc = pause_device(&msg); rc = pause_device(&msg);
if (rc != CONTROLVM_RESP_SUCCESS) { if (rc != CONTROLVM_RESP_SUCCESS) {
LOGERR("VNIC pause_device failed. busNo=0x%x devNo=0x%x\n", LOGERR("VNIC pause_device failed. busNo=0x%x devNo=0x%x\n",
...@@ -1062,9 +1062,9 @@ uislib_client_inject_resume_vnic(u32 bus_no, u32 dev_no) ...@@ -1062,9 +1062,9 @@ uislib_client_inject_resume_vnic(u32 bus_no, u32 dev_no)
int rc; int rc;
init_msg_header(&msg, CONTROLVM_DEVICE_CHANGESTATE, 0, 0); init_msg_header(&msg, CONTROLVM_DEVICE_CHANGESTATE, 0, 0);
msg.cmd.deviceChangeState.busNo = bus_no; msg.cmd.device_change_state.bus_no = bus_no;
msg.cmd.deviceChangeState.devNo = dev_no; msg.cmd.device_change_state.dev_no = dev_no;
msg.cmd.deviceChangeState.state = segment_state_running; msg.cmd.device_change_state.state = segment_state_running;
rc = resume_device(&msg); rc = resume_device(&msg);
if (rc != CONTROLVM_RESP_SUCCESS) { if (rc != CONTROLVM_RESP_SUCCESS) {
LOGERR("VNIC resume_device failed. busNo=0x%x devNo=0x%x\n", LOGERR("VNIC resume_device failed. busNo=0x%x devNo=0x%x\n",
...@@ -1093,10 +1093,10 @@ uislib_client_add_vnic(u32 busNo) ...@@ -1093,10 +1093,10 @@ uislib_client_add_vnic(u32 busNo)
init_msg_header(&msg, CONTROLVM_BUS_CREATE, 0, 0); init_msg_header(&msg, CONTROLVM_BUS_CREATE, 0, 0);
msg.hdr.Flags.testMessage = 1; msg.hdr.Flags.testMessage = 1;
msg.cmd.createBus.busNo = busNo; msg.cmd.create_bus.bus_no = busNo;
msg.cmd.createBus.deviceCount = 4; msg.cmd.create_bus.dev_count = 4;
msg.cmd.createBus.channelAddr = 0; msg.cmd.create_bus.channel_addr = 0;
msg.cmd.createBus.channelBytes = 0; msg.cmd.create_bus.channel_bytes = 0;
if (create_bus(&msg, NULL) != CONTROLVM_RESP_SUCCESS) { if (create_bus(&msg, NULL) != CONTROLVM_RESP_SUCCESS) {
LOGERR("client create_bus failed"); LOGERR("client create_bus failed");
return 0; return 0;
...@@ -1105,13 +1105,13 @@ uislib_client_add_vnic(u32 busNo) ...@@ -1105,13 +1105,13 @@ uislib_client_add_vnic(u32 busNo)
init_msg_header(&msg, CONTROLVM_DEVICE_CREATE, 0, 0); init_msg_header(&msg, CONTROLVM_DEVICE_CREATE, 0, 0);
msg.hdr.Flags.testMessage = 1; msg.hdr.Flags.testMessage = 1;
msg.cmd.createDevice.busNo = busNo; msg.cmd.create_device.busNo = busNo;
msg.cmd.createDevice.devNo = devNo; msg.cmd.create_device.devNo = devNo;
msg.cmd.createDevice.devInstGuid = NULL_UUID_LE; msg.cmd.create_device.devInstGuid = NULL_UUID_LE;
memset(&msg.cmd.createDevice.intr, 0, sizeof(struct irq_info)); memset(&msg.cmd.create_device.intr, 0, sizeof(struct irq_info));
msg.cmd.createDevice.channelAddr = PhysicalDataChan; msg.cmd.create_device.channelAddr = PhysicalDataChan;
msg.cmd.createDevice.channelBytes = MIN_IO_CHANNEL_SIZE; msg.cmd.create_device.channelBytes = MIN_IO_CHANNEL_SIZE;
msg.cmd.createDevice.dataTypeGuid = spar_vnic_channel_protocol_uuid; msg.cmd.create_device.dataTypeGuid = spar_vnic_channel_protocol_uuid;
if (create_device(&msg, NULL) != CONTROLVM_RESP_SUCCESS) { if (create_device(&msg, NULL) != CONTROLVM_RESP_SUCCESS) {
LOGERR("client create_device failed"); LOGERR("client create_device failed");
goto AwayCleanup; goto AwayCleanup;
...@@ -1123,7 +1123,7 @@ uislib_client_add_vnic(u32 busNo) ...@@ -1123,7 +1123,7 @@ uislib_client_add_vnic(u32 busNo)
if (busCreated) { if (busCreated) {
init_msg_header(&msg, CONTROLVM_BUS_DESTROY, 0, 0); init_msg_header(&msg, CONTROLVM_BUS_DESTROY, 0, 0);
msg.hdr.Flags.testMessage = 1; msg.hdr.Flags.testMessage = 1;
msg.cmd.destroyBus.busNo = busNo; msg.cmd.destroy_bus.bus_no = busNo;
if (destroy_bus(&msg, NULL) != CONTROLVM_RESP_SUCCESS) if (destroy_bus(&msg, NULL) != CONTROLVM_RESP_SUCCESS)
LOGERR("client destroy_bus failed.\n"); LOGERR("client destroy_bus failed.\n");
} }
...@@ -1141,8 +1141,8 @@ uislib_client_delete_vnic(u32 busNo) ...@@ -1141,8 +1141,8 @@ uislib_client_delete_vnic(u32 busNo)
init_msg_header(&msg, CONTROLVM_DEVICE_DESTROY, 0, 0); init_msg_header(&msg, CONTROLVM_DEVICE_DESTROY, 0, 0);
msg.hdr.Flags.testMessage = 1; msg.hdr.Flags.testMessage = 1;
msg.cmd.destroyDevice.busNo = busNo; msg.cmd.destroy_device.bus_no = busNo;
msg.cmd.destroyDevice.devNo = devNo; msg.cmd.destroy_device.dev_no = devNo;
if (destroy_device(&msg, NULL) != CONTROLVM_RESP_SUCCESS) { if (destroy_device(&msg, NULL) != CONTROLVM_RESP_SUCCESS) {
/* Don't error exit - try to see if bus can be destroyed... */ /* Don't error exit - try to see if bus can be destroyed... */
LOGERR("client destroy_device failed.\n"); LOGERR("client destroy_device failed.\n");
...@@ -1150,7 +1150,7 @@ uislib_client_delete_vnic(u32 busNo) ...@@ -1150,7 +1150,7 @@ uislib_client_delete_vnic(u32 busNo)
init_msg_header(&msg, CONTROLVM_BUS_DESTROY, 0, 0); init_msg_header(&msg, CONTROLVM_BUS_DESTROY, 0, 0);
msg.hdr.Flags.testMessage = 1; msg.hdr.Flags.testMessage = 1;
msg.cmd.destroyBus.busNo = busNo; msg.cmd.destroy_bus.bus_no = busNo;
if (destroy_bus(&msg, NULL) != CONTROLVM_RESP_SUCCESS) if (destroy_bus(&msg, NULL) != CONTROLVM_RESP_SUCCESS)
LOGERR("client destroy_bus failed.\n"); LOGERR("client destroy_bus failed.\n");
......
...@@ -84,7 +84,7 @@ static const uuid_le UltraDiagPoolChannelProtocolGuid = ...@@ -84,7 +84,7 @@ static const uuid_le UltraDiagPoolChannelProtocolGuid =
/* 0xffffff is an invalid Bus/Device number */ /* 0xffffff is an invalid Bus/Device number */
static ulong g_diagpoolBusNo = 0xffffff; static ulong g_diagpoolBusNo = 0xffffff;
static ulong g_diagpoolDevNo = 0xffffff; static ulong g_diagpoolDevNo = 0xffffff;
static CONTROLVM_MESSAGE_PACKET g_DeviceChangeStatePacket; static struct controlvm_message_packet g_DeviceChangeStatePacket;
/* Only VNIC and VHBA channels are sent to visorclientbus (aka /* Only VNIC and VHBA channels are sent to visorclientbus (aka
* "visorhackbus") * "visorhackbus")
...@@ -670,7 +670,7 @@ chipset_init(CONTROLVM_MESSAGE *inmsg) ...@@ -670,7 +670,7 @@ chipset_init(CONTROLVM_MESSAGE *inmsg)
/* Set features to indicate we support parahotplug (if Command /* Set features to indicate we support parahotplug (if Command
* also supports it). */ * also supports it). */
features = features =
inmsg->cmd.initChipset. inmsg->cmd.init_chipset.
features & ULTRA_CHIPSET_FEATURE_PARA_HOTPLUG; features & ULTRA_CHIPSET_FEATURE_PARA_HOTPLUG;
/* Set the "reply" bit so Command knows this is a /* Set the "reply" bit so Command knows this is a
...@@ -708,9 +708,9 @@ controlvm_respond(CONTROLVM_MESSAGE_HEADER *msgHdr, int response) ...@@ -708,9 +708,9 @@ controlvm_respond(CONTROLVM_MESSAGE_HEADER *msgHdr, int response)
/* For DiagPool channel DEVICE_CHANGESTATE, we need to send /* For DiagPool channel DEVICE_CHANGESTATE, we need to send
* back the deviceChangeState structure in the packet. */ * back the deviceChangeState structure in the packet. */
if (msgHdr->Id == CONTROLVM_DEVICE_CHANGESTATE if (msgHdr->Id == CONTROLVM_DEVICE_CHANGESTATE
&& g_DeviceChangeStatePacket.deviceChangeState.busNo == && g_DeviceChangeStatePacket.device_change_state.bus_no ==
g_diagpoolBusNo g_diagpoolBusNo
&& g_DeviceChangeStatePacket.deviceChangeState.devNo == && g_DeviceChangeStatePacket.device_change_state.dev_no ==
g_diagpoolDevNo) g_diagpoolDevNo)
outmsg.cmd = g_DeviceChangeStatePacket; outmsg.cmd = g_DeviceChangeStatePacket;
if (outmsg.hdr.Flags.testMessage == 1) { if (outmsg.hdr.Flags.testMessage == 1) {
...@@ -732,7 +732,7 @@ controlvm_respond_chipset_init(CONTROLVM_MESSAGE_HEADER *msgHdr, int response, ...@@ -732,7 +732,7 @@ controlvm_respond_chipset_init(CONTROLVM_MESSAGE_HEADER *msgHdr, int response,
CONTROLVM_MESSAGE outmsg; CONTROLVM_MESSAGE outmsg;
controlvm_init_response(&outmsg, msgHdr, response); controlvm_init_response(&outmsg, msgHdr, response);
outmsg.cmd.initChipset.features = features; outmsg.cmd.init_chipset.features = features;
if (!visorchannel_signalinsert(ControlVm_channel, if (!visorchannel_signalinsert(ControlVm_channel,
CONTROLVM_QUEUE_REQUEST, &outmsg)) { CONTROLVM_QUEUE_REQUEST, &outmsg)) {
LOGERR("signalinsert failed!"); LOGERR("signalinsert failed!");
...@@ -747,8 +747,8 @@ controlvm_respond_physdev_changestate(CONTROLVM_MESSAGE_HEADER *msgHdr, ...@@ -747,8 +747,8 @@ controlvm_respond_physdev_changestate(CONTROLVM_MESSAGE_HEADER *msgHdr,
CONTROLVM_MESSAGE outmsg; CONTROLVM_MESSAGE outmsg;
controlvm_init_response(&outmsg, msgHdr, response); controlvm_init_response(&outmsg, msgHdr, response);
outmsg.cmd.deviceChangeState.state = state; outmsg.cmd.device_change_state.state = state;
outmsg.cmd.deviceChangeState.flags.physicalDevice = 1; outmsg.cmd.device_change_state.flags.phys_device = 1;
if (!visorchannel_signalinsert(ControlVm_channel, if (!visorchannel_signalinsert(ControlVm_channel,
CONTROLVM_QUEUE_REQUEST, &outmsg)) { CONTROLVM_QUEUE_REQUEST, &outmsg)) {
LOGERR("signalinsert failed!"); LOGERR("signalinsert failed!");
...@@ -879,9 +879,9 @@ device_changestate_responder(enum controlvm_id cmdId, ...@@ -879,9 +879,9 @@ device_changestate_responder(enum controlvm_id cmdId,
controlvm_init_response(&outmsg, &p->pendingMsgHdr, response); controlvm_init_response(&outmsg, &p->pendingMsgHdr, response);
outmsg.cmd.deviceChangeState.busNo = busNo; outmsg.cmd.device_change_state.bus_no = busNo;
outmsg.cmd.deviceChangeState.devNo = devNo; outmsg.cmd.device_change_state.dev_no = devNo;
outmsg.cmd.deviceChangeState.state = responseState; outmsg.cmd.device_change_state.state = responseState;
if (!visorchannel_signalinsert(ControlVm_channel, if (!visorchannel_signalinsert(ControlVm_channel,
CONTROLVM_QUEUE_REQUEST, &outmsg)) { CONTROLVM_QUEUE_REQUEST, &outmsg)) {
...@@ -1094,8 +1094,8 @@ device_epilog(u32 busNo, u32 devNo, struct spar_segment_state state, u32 cmd, ...@@ -1094,8 +1094,8 @@ device_epilog(u32 busNo, u32 devNo, struct spar_segment_state state, u32 cmd,
static void static void
bus_create(CONTROLVM_MESSAGE *inmsg) bus_create(CONTROLVM_MESSAGE *inmsg)
{ {
CONTROLVM_MESSAGE_PACKET *cmd = &inmsg->cmd; struct controlvm_message_packet *cmd = &inmsg->cmd;
ulong busNo = cmd->createBus.busNo; ulong busNo = cmd->create_bus.bus_no;
int rc = CONTROLVM_RESP_SUCCESS; int rc = CONTROLVM_RESP_SUCCESS;
VISORCHIPSET_BUS_INFO *pBusInfo = NULL; VISORCHIPSET_BUS_INFO *pBusInfo = NULL;
...@@ -1121,7 +1121,7 @@ bus_create(CONTROLVM_MESSAGE *inmsg) ...@@ -1121,7 +1121,7 @@ bus_create(CONTROLVM_MESSAGE *inmsg)
INIT_LIST_HEAD(&pBusInfo->entry); INIT_LIST_HEAD(&pBusInfo->entry);
pBusInfo->busNo = busNo; pBusInfo->busNo = busNo;
pBusInfo->devNo = cmd->createBus.deviceCount; pBusInfo->devNo = cmd->create_bus.dev_count;
POSTCODE_LINUX_3(BUS_CREATE_ENTRY_PC, busNo, POSTCODE_SEVERITY_INFO); POSTCODE_LINUX_3(BUS_CREATE_ENTRY_PC, busNo, POSTCODE_SEVERITY_INFO);
...@@ -1131,10 +1131,10 @@ bus_create(CONTROLVM_MESSAGE *inmsg) ...@@ -1131,10 +1131,10 @@ bus_create(CONTROLVM_MESSAGE *inmsg)
pBusInfo->chanInfo.addrType = ADDRTYPE_localPhysical; pBusInfo->chanInfo.addrType = ADDRTYPE_localPhysical;
pBusInfo->flags.server = inmsg->hdr.Flags.server; pBusInfo->flags.server = inmsg->hdr.Flags.server;
pBusInfo->chanInfo.channelAddr = cmd->createBus.channelAddr; pBusInfo->chanInfo.channelAddr = cmd->create_bus.channel_addr;
pBusInfo->chanInfo.nChannelBytes = cmd->createBus.channelBytes; pBusInfo->chanInfo.nChannelBytes = cmd->create_bus.channel_bytes;
pBusInfo->chanInfo.channelTypeGuid = cmd->createBus.busDataTypeGuid; pBusInfo->chanInfo.channelTypeGuid = cmd->create_bus.bus_data_type_uuid;
pBusInfo->chanInfo.channelInstGuid = cmd->createBus.busInstGuid; pBusInfo->chanInfo.channelInstGuid = cmd->create_bus.bus_inst_uuid;
list_add(&pBusInfo->entry, &BusInfoList); list_add(&pBusInfo->entry, &BusInfoList);
...@@ -1148,8 +1148,8 @@ bus_create(CONTROLVM_MESSAGE *inmsg) ...@@ -1148,8 +1148,8 @@ bus_create(CONTROLVM_MESSAGE *inmsg)
static void static void
bus_destroy(CONTROLVM_MESSAGE *inmsg) bus_destroy(CONTROLVM_MESSAGE *inmsg)
{ {
CONTROLVM_MESSAGE_PACKET *cmd = &inmsg->cmd; struct controlvm_message_packet *cmd = &inmsg->cmd;
ulong busNo = cmd->destroyBus.busNo; ulong busNo = cmd->destroy_bus.bus_no;
VISORCHIPSET_BUS_INFO *pBusInfo; VISORCHIPSET_BUS_INFO *pBusInfo;
int rc = CONTROLVM_RESP_SUCCESS; int rc = CONTROLVM_RESP_SUCCESS;
...@@ -1174,13 +1174,13 @@ bus_destroy(CONTROLVM_MESSAGE *inmsg) ...@@ -1174,13 +1174,13 @@ bus_destroy(CONTROLVM_MESSAGE *inmsg)
static void static void
bus_configure(CONTROLVM_MESSAGE *inmsg, PARSER_CONTEXT *parser_ctx) bus_configure(CONTROLVM_MESSAGE *inmsg, PARSER_CONTEXT *parser_ctx)
{ {
CONTROLVM_MESSAGE_PACKET *cmd = &inmsg->cmd; struct controlvm_message_packet *cmd = &inmsg->cmd;
ulong busNo = cmd->configureBus.busNo; ulong busNo = cmd->configure_bus.bus_no;
VISORCHIPSET_BUS_INFO *pBusInfo = NULL; VISORCHIPSET_BUS_INFO *pBusInfo = NULL;
int rc = CONTROLVM_RESP_SUCCESS; int rc = CONTROLVM_RESP_SUCCESS;
char s[99]; char s[99];
busNo = cmd->configureBus.busNo; busNo = cmd->configure_bus.bus_no;
POSTCODE_LINUX_3(BUS_CONFIGURE_ENTRY_PC, busNo, POSTCODE_SEVERITY_INFO); POSTCODE_LINUX_3(BUS_CONFIGURE_ENTRY_PC, busNo, POSTCODE_SEVERITY_INFO);
pBusInfo = findbus(&BusInfoList, busNo); pBusInfo = findbus(&BusInfoList, busNo);
...@@ -1210,7 +1210,7 @@ bus_configure(CONTROLVM_MESSAGE *inmsg, PARSER_CONTEXT *parser_ctx) ...@@ -1210,7 +1210,7 @@ bus_configure(CONTROLVM_MESSAGE *inmsg, PARSER_CONTEXT *parser_ctx)
goto Away; goto Away;
} }
pBusInfo->partitionHandle = cmd->configureBus.guestHandle; pBusInfo->partitionHandle = cmd->configure_bus.guest_handle;
pBusInfo->partitionGuid = parser_id_get(parser_ctx); pBusInfo->partitionGuid = parser_id_get(parser_ctx);
parser_param_start(parser_ctx, PARSERSTRING_NAME); parser_param_start(parser_ctx, PARSERSTRING_NAME);
pBusInfo->name = parser_string_get(parser_ctx); pBusInfo->name = parser_string_get(parser_ctx);
...@@ -1225,9 +1225,9 @@ bus_configure(CONTROLVM_MESSAGE *inmsg, PARSER_CONTEXT *parser_ctx) ...@@ -1225,9 +1225,9 @@ bus_configure(CONTROLVM_MESSAGE *inmsg, PARSER_CONTEXT *parser_ctx)
static void static void
my_device_create(CONTROLVM_MESSAGE *inmsg) my_device_create(CONTROLVM_MESSAGE *inmsg)
{ {
CONTROLVM_MESSAGE_PACKET *cmd = &inmsg->cmd; struct controlvm_message_packet *cmd = &inmsg->cmd;
ulong busNo = cmd->createDevice.busNo; ulong busNo = cmd->create_device.busNo;
ulong devNo = cmd->createDevice.devNo; ulong devNo = cmd->create_device.devNo;
VISORCHIPSET_DEVICE_INFO *pDevInfo = NULL; VISORCHIPSET_DEVICE_INFO *pDevInfo = NULL;
VISORCHIPSET_BUS_INFO *pBusInfo = NULL; VISORCHIPSET_BUS_INFO *pBusInfo = NULL;
int rc = CONTROLVM_RESP_SUCCESS; int rc = CONTROLVM_RESP_SUCCESS;
...@@ -1271,7 +1271,7 @@ my_device_create(CONTROLVM_MESSAGE *inmsg) ...@@ -1271,7 +1271,7 @@ my_device_create(CONTROLVM_MESSAGE *inmsg)
INIT_LIST_HEAD(&pDevInfo->entry); INIT_LIST_HEAD(&pDevInfo->entry);
pDevInfo->busNo = busNo; pDevInfo->busNo = busNo;
pDevInfo->devNo = devNo; pDevInfo->devNo = devNo;
pDevInfo->devInstGuid = cmd->createDevice.devInstGuid; pDevInfo->devInstGuid = cmd->create_device.devInstGuid;
POSTCODE_LINUX_4(DEVICE_CREATE_ENTRY_PC, devNo, busNo, POSTCODE_LINUX_4(DEVICE_CREATE_ENTRY_PC, devNo, busNo,
POSTCODE_SEVERITY_INFO); POSTCODE_SEVERITY_INFO);
...@@ -1279,10 +1279,10 @@ my_device_create(CONTROLVM_MESSAGE *inmsg) ...@@ -1279,10 +1279,10 @@ my_device_create(CONTROLVM_MESSAGE *inmsg)
pDevInfo->chanInfo.addrType = ADDRTYPE_localTest; pDevInfo->chanInfo.addrType = ADDRTYPE_localTest;
else else
pDevInfo->chanInfo.addrType = ADDRTYPE_localPhysical; pDevInfo->chanInfo.addrType = ADDRTYPE_localPhysical;
pDevInfo->chanInfo.channelAddr = cmd->createDevice.channelAddr; pDevInfo->chanInfo.channelAddr = cmd->create_device.channelAddr;
pDevInfo->chanInfo.nChannelBytes = cmd->createDevice.channelBytes; pDevInfo->chanInfo.nChannelBytes = cmd->create_device.channelBytes;
pDevInfo->chanInfo.channelTypeGuid = cmd->createDevice.dataTypeGuid; pDevInfo->chanInfo.channelTypeGuid = cmd->create_device.dataTypeGuid;
pDevInfo->chanInfo.intr = cmd->createDevice.intr; pDevInfo->chanInfo.intr = cmd->create_device.intr;
list_add(&pDevInfo->entry, &DevInfoList); list_add(&pDevInfo->entry, &DevInfoList);
POSTCODE_LINUX_4(DEVICE_CREATE_EXIT_PC, devNo, busNo, POSTCODE_LINUX_4(DEVICE_CREATE_EXIT_PC, devNo, busNo,
POSTCODE_SEVERITY_INFO); POSTCODE_SEVERITY_INFO);
...@@ -1303,10 +1303,10 @@ my_device_create(CONTROLVM_MESSAGE *inmsg) ...@@ -1303,10 +1303,10 @@ my_device_create(CONTROLVM_MESSAGE *inmsg)
static void static void
my_device_changestate(CONTROLVM_MESSAGE *inmsg) my_device_changestate(CONTROLVM_MESSAGE *inmsg)
{ {
CONTROLVM_MESSAGE_PACKET *cmd = &inmsg->cmd; struct controlvm_message_packet *cmd = &inmsg->cmd;
ulong busNo = cmd->deviceChangeState.busNo; ulong busNo = cmd->device_change_state.bus_no;
ulong devNo = cmd->deviceChangeState.devNo; ulong devNo = cmd->device_change_state.dev_no;
struct spar_segment_state state = cmd->deviceChangeState.state; struct spar_segment_state state = cmd->device_change_state.state;
VISORCHIPSET_DEVICE_INFO *pDevInfo = NULL; VISORCHIPSET_DEVICE_INFO *pDevInfo = NULL;
int rc = CONTROLVM_RESP_SUCCESS; int rc = CONTROLVM_RESP_SUCCESS;
...@@ -1337,9 +1337,9 @@ my_device_changestate(CONTROLVM_MESSAGE *inmsg) ...@@ -1337,9 +1337,9 @@ my_device_changestate(CONTROLVM_MESSAGE *inmsg)
static void static void
my_device_destroy(CONTROLVM_MESSAGE *inmsg) my_device_destroy(CONTROLVM_MESSAGE *inmsg)
{ {
CONTROLVM_MESSAGE_PACKET *cmd = &inmsg->cmd; struct controlvm_message_packet *cmd = &inmsg->cmd;
ulong busNo = cmd->destroyDevice.busNo; ulong busNo = cmd->destroy_device.bus_no;
ulong devNo = cmd->destroyDevice.devNo; ulong devNo = cmd->destroy_device.dev_no;
VISORCHIPSET_DEVICE_INFO *pDevInfo = NULL; VISORCHIPSET_DEVICE_INFO *pDevInfo = NULL;
int rc = CONTROLVM_RESP_SUCCESS; int rc = CONTROLVM_RESP_SUCCESS;
...@@ -1621,7 +1621,7 @@ parahotplug_request_destroy(struct parahotplug_request *req) ...@@ -1621,7 +1621,7 @@ parahotplug_request_destroy(struct parahotplug_request *req)
static void static void
parahotplug_request_kickoff(struct parahotplug_request *req) parahotplug_request_kickoff(struct parahotplug_request *req)
{ {
CONTROLVM_MESSAGE_PACKET *cmd = &req->msg.cmd; struct controlvm_message_packet *cmd = &req->msg.cmd;
char env_cmd[40], env_id[40], env_state[40], env_bus[40], env_dev[40], char env_cmd[40], env_id[40], env_state[40], env_bus[40], env_dev[40],
env_func[40]; env_func[40];
char *envp[] = { char *envp[] = {
...@@ -1631,18 +1631,19 @@ parahotplug_request_kickoff(struct parahotplug_request *req) ...@@ -1631,18 +1631,19 @@ parahotplug_request_kickoff(struct parahotplug_request *req)
sprintf(env_cmd, "SPAR_PARAHOTPLUG=1"); sprintf(env_cmd, "SPAR_PARAHOTPLUG=1");
sprintf(env_id, "SPAR_PARAHOTPLUG_ID=%d", req->id); sprintf(env_id, "SPAR_PARAHOTPLUG_ID=%d", req->id);
sprintf(env_state, "SPAR_PARAHOTPLUG_STATE=%d", sprintf(env_state, "SPAR_PARAHOTPLUG_STATE=%d",
cmd->deviceChangeState.state.active); cmd->device_change_state.state.active);
sprintf(env_bus, "SPAR_PARAHOTPLUG_BUS=%d", sprintf(env_bus, "SPAR_PARAHOTPLUG_BUS=%d",
cmd->deviceChangeState.busNo); cmd->device_change_state.bus_no);
sprintf(env_dev, "SPAR_PARAHOTPLUG_DEVICE=%d", sprintf(env_dev, "SPAR_PARAHOTPLUG_DEVICE=%d",
cmd->deviceChangeState.devNo >> 3); cmd->device_change_state.dev_no >> 3);
sprintf(env_func, "SPAR_PARAHOTPLUG_FUNCTION=%d", sprintf(env_func, "SPAR_PARAHOTPLUG_FUNCTION=%d",
cmd->deviceChangeState.devNo & 0x7); cmd->device_change_state.dev_no & 0x7);
LOGINF("parahotplug_request_kickoff: state=%d, bdf=%d/%d/%d, id=%u\n", LOGINF("parahotplug_request_kickoff: state=%d, bdf=%d/%d/%d, id=%u\n",
cmd->deviceChangeState.state.active, cmd->device_change_state.state.active,
cmd->deviceChangeState.busNo, cmd->deviceChangeState.devNo >> 3, cmd->device_change_state.bus_no,
cmd->deviceChangeState.devNo & 7, req->id); cmd->device_change_state.dev_no >> 3,
cmd->device_change_state.dev_no & 7, req->id);
kobject_uevent_env(&Visorchipset_platform_device.dev.kobj, KOBJ_CHANGE, kobject_uevent_env(&Visorchipset_platform_device.dev.kobj, KOBJ_CHANGE,
envp); envp);
...@@ -1669,7 +1670,7 @@ parahotplug_process_list(void) ...@@ -1669,7 +1670,7 @@ parahotplug_process_list(void)
controlvm_respond_physdev_changestate( controlvm_respond_physdev_changestate(
&req->msg.hdr, &req->msg.hdr,
CONTROLVM_RESP_ERROR_DEVICE_UDEV_TIMEOUT, CONTROLVM_RESP_ERROR_DEVICE_UDEV_TIMEOUT,
req->msg.cmd.deviceChangeState.state); req->msg.cmd.device_change_state.state);
parahotplug_request_destroy(req); parahotplug_request_destroy(req);
} }
} }
...@@ -1700,11 +1701,11 @@ parahotplug_request_complete(int id, u16 active) ...@@ -1700,11 +1701,11 @@ parahotplug_request_complete(int id, u16 active)
*/ */
list_del(pos); list_del(pos);
spin_unlock(&Parahotplug_request_list_lock); spin_unlock(&Parahotplug_request_list_lock);
req->msg.cmd.deviceChangeState.state.active = active; req->msg.cmd.device_change_state.state.active = active;
if (req->msg.hdr.Flags.responseExpected) if (req->msg.hdr.Flags.responseExpected)
controlvm_respond_physdev_changestate( controlvm_respond_physdev_changestate(
&req->msg.hdr, CONTROLVM_RESP_SUCCESS, &req->msg.hdr, CONTROLVM_RESP_SUCCESS,
req->msg.cmd.deviceChangeState.state); req->msg.cmd.device_change_state.state);
parahotplug_request_destroy(req); parahotplug_request_destroy(req);
return 0; return 0;
} }
...@@ -1729,7 +1730,7 @@ parahotplug_process_message(CONTROLVM_MESSAGE *inmsg) ...@@ -1729,7 +1730,7 @@ parahotplug_process_message(CONTROLVM_MESSAGE *inmsg)
return; return;
} }
if (inmsg->cmd.deviceChangeState.state.active) { if (inmsg->cmd.device_change_state.state.active) {
/* For enable messages, just respond with success /* For enable messages, just respond with success
* right away. This is a bit of a hack, but there are * right away. This is a bit of a hack, but there are
* issues with the early enable messages we get (with * issues with the early enable messages we get (with
...@@ -1741,9 +1742,8 @@ parahotplug_process_message(CONTROLVM_MESSAGE *inmsg) ...@@ -1741,9 +1742,8 @@ parahotplug_process_message(CONTROLVM_MESSAGE *inmsg)
*/ */
parahotplug_request_kickoff(req); parahotplug_request_kickoff(req);
controlvm_respond_physdev_changestate(&inmsg->hdr, controlvm_respond_physdev_changestate(&inmsg->hdr,
CONTROLVM_RESP_SUCCESS, CONTROLVM_RESP_SUCCESS, inmsg->cmd.
inmsg->cmd. device_change_state.state);
deviceChangeState.state);
parahotplug_request_destroy(req); parahotplug_request_destroy(req);
} else { } else {
/* For disable messages, add the request to the /* For disable messages, add the request to the
...@@ -1773,7 +1773,7 @@ parahotplug_process_message(CONTROLVM_MESSAGE *inmsg) ...@@ -1773,7 +1773,7 @@ parahotplug_process_message(CONTROLVM_MESSAGE *inmsg)
static BOOL static BOOL
handle_command(CONTROLVM_MESSAGE inmsg, HOSTADDRESS channel_addr) handle_command(CONTROLVM_MESSAGE inmsg, HOSTADDRESS channel_addr)
{ {
CONTROLVM_MESSAGE_PACKET *cmd = &inmsg.cmd; struct controlvm_message_packet *cmd = &inmsg.cmd;
u64 parametersAddr = 0; u64 parametersAddr = 0;
u32 parametersBytes = 0; u32 parametersBytes = 0;
PARSER_CONTEXT *parser_ctx = NULL; PARSER_CONTEXT *parser_ctx = NULL;
...@@ -1824,42 +1824,42 @@ handle_command(CONTROLVM_MESSAGE inmsg, HOSTADDRESS channel_addr) ...@@ -1824,42 +1824,42 @@ handle_command(CONTROLVM_MESSAGE inmsg, HOSTADDRESS channel_addr)
switch (inmsg.hdr.Id) { switch (inmsg.hdr.Id) {
case CONTROLVM_CHIPSET_INIT: case CONTROLVM_CHIPSET_INIT:
LOGINF("CHIPSET_INIT(#busses=%lu,#switches=%lu)", LOGINF("CHIPSET_INIT(#busses=%lu,#switches=%lu)",
(ulong) inmsg.cmd.initChipset.busCount, (ulong) inmsg.cmd.init_chipset.bus_count,
(ulong) inmsg.cmd.initChipset.switchCount); (ulong) inmsg.cmd.init_chipset.switch_count);
chipset_init(&inmsg); chipset_init(&inmsg);
break; break;
case CONTROLVM_BUS_CREATE: case CONTROLVM_BUS_CREATE:
LOGINF("BUS_CREATE(%lu,#devs=%lu)", LOGINF("BUS_CREATE(%lu,#devs=%lu)",
(ulong) cmd->createBus.busNo, (ulong) cmd->create_bus.bus_no,
(ulong) cmd->createBus.deviceCount); (ulong) cmd->create_bus.dev_count);
bus_create(&inmsg); bus_create(&inmsg);
break; break;
case CONTROLVM_BUS_DESTROY: case CONTROLVM_BUS_DESTROY:
LOGINF("BUS_DESTROY(%lu)", (ulong) cmd->destroyBus.busNo); LOGINF("BUS_DESTROY(%lu)", (ulong) cmd->destroy_bus.bus_no);
bus_destroy(&inmsg); bus_destroy(&inmsg);
break; break;
case CONTROLVM_BUS_CONFIGURE: case CONTROLVM_BUS_CONFIGURE:
LOGINF("BUS_CONFIGURE(%lu)", (ulong) cmd->configureBus.busNo); LOGINF("BUS_CONFIGURE(%lu)", (ulong) cmd->configure_bus.bus_no);
bus_configure(&inmsg, parser_ctx); bus_configure(&inmsg, parser_ctx);
break; break;
case CONTROLVM_DEVICE_CREATE: case CONTROLVM_DEVICE_CREATE:
LOGINF("DEVICE_CREATE(%lu,%lu)", LOGINF("DEVICE_CREATE(%lu,%lu)",
(ulong) cmd->createDevice.busNo, (ulong) cmd->create_device.busNo,
(ulong) cmd->createDevice.devNo); (ulong) cmd->create_device.devNo);
my_device_create(&inmsg); my_device_create(&inmsg);
break; break;
case CONTROLVM_DEVICE_CHANGESTATE: case CONTROLVM_DEVICE_CHANGESTATE:
if (cmd->deviceChangeState.flags.physicalDevice) { if (cmd->device_change_state.flags.phys_device) {
LOGINF("DEVICE_CHANGESTATE for physical device (%lu,%lu, active=%lu)", LOGINF("DEVICE_CHANGESTATE for physical device (%lu,%lu, active=%lu)",
(ulong) cmd->deviceChangeState.busNo, (ulong) cmd->device_change_state.bus_no,
(ulong) cmd->deviceChangeState.devNo, (ulong) cmd->device_change_state.dev_no,
(ulong) cmd->deviceChangeState.state.active); (ulong) cmd->device_change_state.state.active);
parahotplug_process_message(&inmsg); parahotplug_process_message(&inmsg);
} else { } else {
LOGINF("DEVICE_CHANGESTATE for virtual device (%lu,%lu, state.Alive=0x%lx)", LOGINF("DEVICE_CHANGESTATE for virtual device (%lu,%lu, state.Alive=0x%lx)",
(ulong) cmd->deviceChangeState.busNo, (ulong) cmd->device_change_state.bus_no,
(ulong) cmd->deviceChangeState.devNo, (ulong) cmd->device_change_state.dev_no,
(ulong) cmd->deviceChangeState.state.alive); (ulong) cmd->device_change_state.state.alive);
/* save the hdr and cmd structures for later use */ /* save the hdr and cmd structures for later use */
/* when sending back the response to Command */ /* when sending back the response to Command */
my_device_changestate(&inmsg); my_device_changestate(&inmsg);
...@@ -1870,14 +1870,14 @@ handle_command(CONTROLVM_MESSAGE inmsg, HOSTADDRESS channel_addr) ...@@ -1870,14 +1870,14 @@ handle_command(CONTROLVM_MESSAGE inmsg, HOSTADDRESS channel_addr)
break; break;
case CONTROLVM_DEVICE_DESTROY: case CONTROLVM_DEVICE_DESTROY:
LOGINF("DEVICE_DESTROY(%lu,%lu)", LOGINF("DEVICE_DESTROY(%lu,%lu)",
(ulong) cmd->destroyDevice.busNo, (ulong) cmd->destroy_device.bus_no,
(ulong) cmd->destroyDevice.devNo); (ulong) cmd->destroy_device.dev_no);
my_device_destroy(&inmsg); my_device_destroy(&inmsg);
break; break;
case CONTROLVM_DEVICE_CONFIGURE: case CONTROLVM_DEVICE_CONFIGURE:
LOGINF("DEVICE_CONFIGURE(%lu,%lu)", LOGINF("DEVICE_CONFIGURE(%lu,%lu)",
(ulong) cmd->configureDevice.busNo, (ulong) cmd->configure_device.busNo,
(ulong) cmd->configureDevice.devNo); (ulong) cmd->configure_device.devNo);
/* no op for now, just send a respond that we passed */ /* no op for now, just send a respond that we passed */
if (inmsg.hdr.Flags.responseExpected) if (inmsg.hdr.Flags.responseExpected)
controlvm_respond(&inmsg.hdr, CONTROLVM_RESP_SUCCESS); controlvm_respond(&inmsg.hdr, CONTROLVM_RESP_SUCCESS);
...@@ -2056,8 +2056,8 @@ setup_crash_devices_work_queue(struct work_struct *work) ...@@ -2056,8 +2056,8 @@ setup_crash_devices_work_queue(struct work_struct *work)
/* send init chipset msg */ /* send init chipset msg */
msg.hdr.Id = CONTROLVM_CHIPSET_INIT; msg.hdr.Id = CONTROLVM_CHIPSET_INIT;
msg.cmd.initChipset.busCount = 23; msg.cmd.init_chipset.bus_count = 23;
msg.cmd.initChipset.switchCount = 0; msg.cmd.init_chipset.switch_count = 0;
chipset_init(&msg); chipset_init(&msg);
...@@ -2116,7 +2116,7 @@ setup_crash_devices_work_queue(struct work_struct *work) ...@@ -2116,7 +2116,7 @@ setup_crash_devices_work_queue(struct work_struct *work)
} }
/* reuse IOVM create bus message */ /* reuse IOVM create bus message */
if (localCrashCreateBusMsg.cmd.createBus.channelAddr != 0) if (localCrashCreateBusMsg.cmd.create_bus.channel_addr != 0)
bus_create(&localCrashCreateBusMsg); bus_create(&localCrashCreateBusMsg);
else { else {
LOGERR("CrashCreateBusMsg is null, no dump will be taken"); LOGERR("CrashCreateBusMsg is null, no dump will be taken");
...@@ -2126,7 +2126,7 @@ setup_crash_devices_work_queue(struct work_struct *work) ...@@ -2126,7 +2126,7 @@ setup_crash_devices_work_queue(struct work_struct *work)
} }
/* reuse create device message for storage device */ /* reuse create device message for storage device */
if (localCrashCreateDevMsg.cmd.createDevice.channelAddr != 0) if (localCrashCreateDevMsg.cmd.create_device.channelAddr != 0)
my_device_create(&localCrashCreateDevMsg); my_device_create(&localCrashCreateDevMsg);
else { else {
LOGERR("CrashCreateDevMsg is null, no dump will be taken"); LOGERR("CrashCreateDevMsg is null, no dump will be taken");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment