oplmsu_ioctl_lrp.c revision 07d06da50d310a325b457d6330165aebab1e0064
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* All Rights Reserved, Copyright (c) FUJITSU LIMITED 2006
*/
#include <sys/prom_plat.h>
/*
* LOWER READ SERVICE PROCEDURE
*/
/* termios ioctl response received */
int
{
} else {
}
} else {
"Status of path is improper");
return (SUCCESS);
}
switch (trad_sts) {
case MSU_WTCS_ACK :
break;
case MSU_WTMS_ACK :
break;
case MSU_WPPS_ACK :
break;
case MSU_WWSZ_ACK :
break;
case MSU_WCAR_ACK :
break;
default :
break;
}
switch (trad_sts) {
case MSU_WTCS_ACK : /* FALLTHRU */
case MSU_WTMS_ACK : /* FALLTHRU */
case MSU_WPPS_ACK : /* FALLTHRU */
case MSU_WWSZ_ACK : /* FALLTHRU */
case MSU_WCAR_ACK :
break;
default :
break;
}
} else {
} else { /* Normal termios */
}
}
return (FAILURE);
}
if (term_stat != MSU_WPTH_CHG) {
/* Continue sending termios ioctls */
return (SUCCESS);
}
/* Change status of new active path */
/* Put a message(M_DATA) on a queue */
}
}
/* Notify of the active path changing */
/* Send XON to notify active path */
/* Change status of stopped or old-active path */
if (chkflag == MSU_CMD_STOP) {
} else { /* == MSU_CMD_ACTIVE */
}
/* Send XOFF to notify all standby paths */
/* Change active path of user node */
/* Reschedule a queue for service */
oplmsu_queue_flag = 0;
}
}
/* Wake up oplmsu_config_stop */
}
return (SUCCESS);
} else { /* M_IOCNAK received */
if ((chkflag == MSU_CMD_ACTIVE) &&
}
return (SUCCESS);
} else if ((chkflag == MSU_CMD_STOP) &&
/* MSU_CMD_STOP for active path */
/* Search alternate path from standby paths */
if (altn_upath == NULL) {
altn_upath = upath;
}
sizeof (char), MSU_READ_SIDE) == FAILURE) {
return (FAILURE);
}
return (FAILURE);
}
return (SUCCESS);
}
}
(chkflag == TIOCSSOFTCAR)) {
MSU_READ_SIDE) == FAILURE) {
return (FAILURE);
}
switch (chkflag) {
case TCSETS : /* FALLTHRU */
case TCSETSW : /* FALLTHRU */
case TCSETSF :
}
break;
case TIOCMSET :
}
break;
case TIOCSPPS :
}
break;
case TIOCSWINSZ :
}
break;
case TIOCSSOFTCAR :
}
break;
}
/* Check sleep flag and wake up thread */
return (SUCCESS);
/* Check sleep flag and wake up thread */
return (SUCCESS);
}
}
case MSU_PSTAT_FAIL :
break;
case MSU_PSTAT_STOP :
break;
case MSU_PSTAT_STANDBY :
break;
case MSU_PSTAT_ACTIVE :
break;
}
return (SUCCESS);
}
/* M_ERROR or M_HANGUP response received */
int
{
int term_stat, term_ioctl;
}
return (SUCCESS);
}
MSU_FAIL);
if (altn_upath == NULL) {
return (SUCCESS);
}
MSU_READ_SIDE) == FAILURE) {
return (FAILURE);
}
return (FAILURE);
}
oplmsu_queue_flag = 1;
}
}
return (SUCCESS);
}
int
{
int term_stat, term_ioctl;
/* Get lower path of active status */
}
}
return (SUCCESS);
}
return (FAILURE);
}
}
return (SUCCESS);
"Can't change to specified path");
return (SUCCESS);
}
FAILURE) {
return (FAILURE);
}
return (FAILURE);
}
if (term_stat != MSU_WPTH_CHG) {
/*
* Send termios to new active path and wait response
*/
}
} else {
/*
* No termios messages are received. Change active path.
*/
/* Notify of the active path changing */
/* Send XON to notify active path */
/* Put a message(M_DATA) on a queue */
}
}
}
/* Change the status of stop path */
}
#ifdef DEBUG
#endif
/* Send XOFF to notify all standby paths */
/* Reschedule a queue for service */
oplmsu_queue_flag = 0;
}
}
return (SUCCESS);
}