init_msg_header(&msg, CONTROLVM_DEVICE_CHANGESTATE, 0, 0);
msg.cmd.deviceChangeState.busNo = bus_no;
msg.cmd.deviceChangeState.devNo = dev_no;
- msg.cmd.deviceChangeState.state = SegmentStateStandby;
+ msg.cmd.deviceChangeState.state = segment_state_standby;
rc = pause_device(&msg);
if (rc != CONTROLVM_RESP_SUCCESS) {
LOGERR("VHBA pause_device failed. busNo=0x%x devNo=0x%x\n",
init_msg_header(&msg, CONTROLVM_DEVICE_CHANGESTATE, 0, 0);
msg.cmd.deviceChangeState.busNo = bus_no;
msg.cmd.deviceChangeState.devNo = dev_no;
- msg.cmd.deviceChangeState.state = SegmentStateRunning;
+ msg.cmd.deviceChangeState.state = segment_state_running;
rc = resume_device(&msg);
if (rc != CONTROLVM_RESP_SUCCESS) {
LOGERR("VHBA resume_device failed. busNo=0x%x devNo=0x%x\n",
init_msg_header(&msg, CONTROLVM_DEVICE_CHANGESTATE, 0, 0);
msg.cmd.deviceChangeState.busNo = bus_no;
msg.cmd.deviceChangeState.devNo = dev_no;
- msg.cmd.deviceChangeState.state = SegmentStateStandby;
+ msg.cmd.deviceChangeState.state = segment_state_standby;
rc = pause_device(&msg);
if (rc != CONTROLVM_RESP_SUCCESS) {
LOGERR("VNIC pause_device failed. busNo=0x%x devNo=0x%x\n",
init_msg_header(&msg, CONTROLVM_DEVICE_CHANGESTATE, 0, 0);
msg.cmd.deviceChangeState.busNo = bus_no;
msg.cmd.deviceChangeState.devNo = dev_no;
- msg.cmd.deviceChangeState.state = SegmentStateRunning;
+ msg.cmd.deviceChangeState.state = segment_state_running;
rc = resume_device(&msg);
if (rc != CONTROLVM_RESP_SUCCESS) {
LOGERR("VNIC resume_device failed. busNo=0x%x devNo=0x%x\n",
break;
case CONTROLVM_DEVICE_CHANGESTATE:
/* ServerReady / ServerRunning / SegmentStateRunning */
- if (state.alive == SegmentStateRunning.alive &&
- state.operating == SegmentStateRunning.operating) {
+ if (state.alive == segment_state_running.alive &&
+ state.operating ==
+ segment_state_running.operating) {
if (notifiers->device_resume) {
(*notifiers->device_resume) (busNo,
devNo);
}
}
/* ServerNotReady / ServerLost / SegmentStateStandby */
- else if (state.alive == SegmentStateStandby.alive &&
+ else if (state.alive == segment_state_standby.alive &&
state.operating ==
- SegmentStateStandby.operating) {
+ segment_state_standby.operating) {
/* technically this is standby case
* where server is lost
*/
devNo);
notified = TRUE;
}
- } else if (state.alive == SegmentStatePaused.alive &&
+ } else if (state.alive == segment_state_paused.alive &&
state.operating ==
- SegmentStatePaused.operating) {
+ segment_state_paused.operating) {
/* this is lite pause where channel is
* still valid just 'pause' of it
*/
LOGINF("CONTROLVM_DEVICE_CREATE for DiagPool channel: busNo=%lu, devNo=%lu",
g_diagpoolBusNo, g_diagpoolDevNo);
}
- device_epilog(busNo, devNo, SegmentStateRunning,
+ device_epilog(busNo, devNo, segment_state_running,
CONTROLVM_DEVICE_CREATE, &inmsg->hdr, rc,
inmsg->hdr.Flags.responseExpected == 1,
FOR_VISORBUS(pDevInfo->chanInfo.channelTypeGuid));
Away:
if ((rc >= CONTROLVM_RESP_SUCCESS) && pDevInfo)
- device_epilog(busNo, devNo, SegmentStateRunning,
+ device_epilog(busNo, devNo, segment_state_running,
CONTROLVM_DEVICE_DESTROY, &inmsg->hdr, rc,
inmsg->hdr.Flags.responseExpected == 1,
FOR_VISORBUS(pDevInfo->chanInfo.channelTypeGuid));
device_changestate_responder(CONTROLVM_DEVICE_CHANGESTATE,
busNo, devNo, response,
- SegmentStateStandby);
+ segment_state_standby);
}
EXPORT_SYMBOL_GPL(visorchipset_device_pause_response);
{
device_changestate_responder(CONTROLVM_DEVICE_CHANGESTATE,
busNo, devNo, response,
- SegmentStateRunning);
+ segment_state_running);
}
BOOL