scfops.c revision 44bed9d7e21975b68d41a2a54db2aa0581429ca6
/*
* 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
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Function list
*/
int *rval_p);
int scf_push_getevent(unsigned char *event_p);
/*
* scf_open()
*
* Description: Driver open() entry processing.
*
*/
/* ARGSUSED */
int
{
#define SCF_FUNC_NAME "scf_open() "
int ret = 0;
int instance;
/* get instance */
if (SCF_CHECK_INSTANCE(instance)) {
/* is the device character ? */
"open ", 8);
}
} else {
}
return (ret);
}
/*
* close entry
*/
/* ARGSUSED */
int
{
#define SCF_FUNC_NAME "scf_close() "
int ret = 0;
return (ret);
}
/*
* scf_ioctl()
*
* Description: Driver ioctl() entry processing.
*
*/
int
int *rval_p)
{
#define SCF_FUNC_NAME "scf_ioctl() "
int ret = 0;
int instance;
int u_mode;
int tm_stop_cnt;
#ifdef _MULTI_DATAMODEL
/* DDI_MODEL_ILP32: SCF driver 64bit, upper 32bit */
/* DDI_MODEL_NONE : SCF driver64bit, upper 64bit */
#else /* ! _MULTI_DATAMODEL */
/* DDI_MODEL_NONE : SCF driver 32bit, upper 32bit */
#endif /* _MULTI_DATAMODEL */
/* get instance */
if (instance == SCF_USER_INSTANCE) {
/* Not attach device */
"ioctl ", 8);
goto END_ioctl;
}
/* Not super-user */
if ((cmd != SCFIOCHSTADRSINFO) &&
(cmd != SCFIOCRDCLISTMAX) &&
(cmd != SCFIOCRDCLISTX)) {
"ioctl ", 8);
goto END_ioctl;
}
}
/* Suspend flag check */
if (scf_comtbl.suspend_flag) {
"ioctl ", 8);
goto END_ioctl;
}
/*
* RAS control interface
*/
case SCFIOCREPORTSTAT:
break;
case SCFIOCCLEARLCD:
break;
case SCFIOCWRLCD:
break;
case SCFIOCGETDISKLED:
break;
case SCFIOCSETDISKLED:
break;
case SCFIOCGETSDOWNREASON:
break;
/*
* System infomarion interface
*/
case SCFIOCOPTIONDISP:
break;
case SCFIOCGETPCICONFIG:
break;
/*
* RCI control interface
*/
case SCFIOCHAC:
break;
case SCFIOCHSTADRSINFO:
break;
case SCFIOCRDCLISTMAX:
break;
case SCFIOCRDCLISTX:
break;
case SCFIOCRDCTRL:
break;
case SCFIOCOPECALL:
break;
case SCFIOCGETREPORT:
break;
case SCFIOCRCIPWR:
break;
case SCFIOCPANICREQ:
break;
case SCFIOCPANICCHK:
break;
case SCFIOCPARMSET:
break;
case SCFIOCPARMGET:
break;
/*
* APCS control interface
*/
case SCFIOCAUTOPWRSET:
break;
case SCFIOCAUTOPWRGET:
case SCFIOCSYSAUTOPWRGET:
break;
case SCFIOCSYSAUTOPWRCLR:
break;
case SCFIOCAUTOPWRFPOFF:
break;
case SCFIOCAUTOPWREXSET:
break;
case SCFIOCAUTOPWREXGET:
break;
/*
* FJDR control interface
*/
case SCFIOCDR:
break;
/*
* MADM REMCS interface
*/
case SCFIOCEVENTLIST:
break;
case SCFIOCGETEVENT:
break;
case SCFIOCSETMADMEVENT:
break;
case SCFIOCREMCSCMD:
break;
case SCFIOCREMCSFILE:
break;
case SCFIOCSPARECMD:
break;
/*
* Kernel interface
*/
case SCFIOCSETPHPINFO:
break;
default:
"ioctl ", 8);
break;
}
} else {
}
/*
* END_ioctl
*/
/*
* untimeout() processing of the timer which stopped a timer by
* ioctl processing
* Call of driver mutex status is prohibited.
*/
/* Lock driver mutex */
/* Collect the timers which need to be stopped */
/* Unlock driver mutex */
/* Timer stop */
if (tm_stop_cnt != 0) {
}
}
return (ret);
}
/*
* scf_ioc_reportstat()
*
* Description: SCFIOCREPORTSTAT ioctl command processing.
*
*/
/* ARGSUSED */
int
{
#define SCF_FUNC_NAME "scf_ioc_reportstat() "
int ret = 0;
switch (arg) {
case SCF_SHUTDOWN_START:
sbuf.b[0] = REPORT_STAT_SHUTDOWN_START;
break;
case SCF_SYSTEM_RUNNING:
sbuf.b[0] = REPORT_STAT_SYSTEM_RUNNING;
sbuf.b[1] = 0;
sbuf.b[2] = 0;
sbuf.b[3] = 0;
break;
default:
goto END_reportstat;
}
}
(arg == SCF_SHUTDOWN_START)) {
/* Interrupt enable */
/* SCF command send sync stop */
if (ret == 0) {
/* new report shutdown */
if (ret == 0) {
/*
* SCF command send sync re-stop
*/
}
}
/* FIOMPSTART exec status */
if (scf_comtbl.watchdog_after_resume) {
/*
* Alive check status recovery
*/
}
/* SCF path change send */
scf_comtbl.scf_exec_p = 0;
scf_comtbl.scf_path_p = 0;
}
/* SCF command send sync start */
}
}
/*
* END_reportstat
*/
return (ret);
}
/*
* scf_ioc_clearlcd()
*
* Description: SCFIOCCLEARLCD ioctl command processing.
*
*/
/* ARGSUSED */
int
{
#define SCF_FUNC_NAME "scf_ioc_clearlcd() "
int ret = 0;
int ii;
switch (arg) {
case SCF_CLRLCD_SEQ:
}
break;
default:
break;
}
return (ret);
}
/*
* scf_ioc_wrlcd()
*
* Description: SCFIOCWRLCD ioctl command processing.
*
*/
/* ARGSUSED */
int
{
#define SCF_FUNC_NAME "scf_ioc_wrlcd() "
int ret = 0;
int ii;
if (u_mode == DDI_MODEL_ILP32) {
/* DDI_MODEL_ILP32 */
sizeof (scfwrlcd32_t), mode) != 0) {
"ioctl ", 8);
goto END_wrlcd;
}
} else {
/* DDI_MODEL_NONE */
sizeof (scfwrlcd_t), mode) != 0) {
"ioctl ", 8);
goto END_wrlcd;
}
}
goto END_wrlcd;
}
}
}
goto END_wrlcd;
}
case SCF_WRLCD_SEQ:
break;
default:
break;
}
/*
* END_wrlcd
*/
return (ret);
}
/*
* scf_ioc_getdiskled()
*
* Description: SCFIOCGETDISKLED ioctl command processing.
*
*/
/* ARGSUSED */
int
{
#define SCF_FUNC_NAME "scf_ioc_getdiskled() "
int ret = 0;
KM_SLEEP);
sizeof (scfiocgetdiskled_t), mode) != 0) {
goto END_getdiskled;
}
if (ret == 0) {
sizeof (scfiocgetdiskled_t), mode) != 0) {
"ioctl ", 8);
}
}
/*
* END_getdiskled
*/
if (scfiocgetdiskled_p) {
kmem_free((void *)scfiocgetdiskled_p,
(size_t)(sizeof (scfiocgetdiskled_t)));
}
return (ret);
}
/*
* scf_ioc_setdiskled()
*
* Description: SCFIOCSETDISKLED ioctl command processing.
*
*/
/* ARGSUSED */
int
{
#define SCF_FUNC_NAME "scf_ioc_setdiskled() "
int ret = 0;
KM_SLEEP);
sizeof (scfiocgetdiskled_t), mode) != 0) {
goto END_setdiskled;
}
switch (scfiocgetdiskled_p->led) {
case SCF_DISK_LED_ON:
break;
case SCF_DISK_LED_BLINK:
break;
case SCF_DISK_LED_OFF:
break;
default:
goto END_setdiskled;
}
/*
* END_setdiskled
*/
if (scfiocgetdiskled_p) {
kmem_free((void *)scfiocgetdiskled_p,
(size_t)(sizeof (scfiocgetdiskled_t)));
}
return (ret);
}
/*
* scf_ioc_getsdownreason()
*
* Description: SCFIOCGETSDOWNREASON ioctl command processing.
*
*/
/* ARGSUSED */
int
{
#define SCF_FUNC_NAME "scf_ioc_getsdownreason() "
int ret = 0;
}
return (ret);
}
/*
* scf_ioc_optiondisp()
*
* Description: SCFIOCOPTIONDISP ioctl command processing.
*
*/
/* ARGSUSED */
int
{
#define SCF_FUNC_NAME "scf_ioc_optiondisp() "
int ret = 0;
if (ret == 0) {
/* Set XSCF version */
(void *)&scf_xscf_comif_version, 2);
sizeof (scfoption_t), mode) != 0) {
"ioctl ", 8);
}
}
return (ret);
}
/*
* scf_ioc_getpciconfig()
*
* Description: SCFIOCGETPCICONFIG ioctl command processing.
*
*/
/* ARGSUSED */
int
{
#define SCF_FUNC_NAME "scf_ioc_getpciconfig() "
int ret = 0;
sizeof (scfiocgetpciconfig_t), mode) != 0) {
goto END_getpciconfig;
}
if (ret == 0) {
if (ddi_copyout((void *)scfiocgetpciconfig_p,
(void *)arg, sizeof (scfiocgetpciconfig_t),
mode) != 0) {
"ioctl ", 8);
}
}
/*
* END_getpciconfig
*/
if (scfiocgetpciconfig_p) {
kmem_free((void *)scfiocgetpciconfig_p,
(size_t)(sizeof (scfiocgetpciconfig_t)));
}
return (ret);
}
/*
* scf_ioc_hac()
*
* Description: SCFIOCHAC ioctl command processing.
*
*/
/* ARGSUSED */
int
{
#define SCF_FUNC_NAME "scf_ioc_hac() "
int ret = 0;
goto END_hac;
}
if (scf_save_hac_flag != 0) {
"ioctl ", 8);
}
goto END_hac;
} else {
}
}
switch (scfhac.sub_command) {
case SUB_REMOTE_POWCTL_SET:
break;
break;
case SUB_HOSTADDR_DISP:
case SUB_DEVICE_INFO:
break;
default:
goto END_hac;
}
if (ret == 0) {
sizeof (scfhac_t));
scf_save_hac_flag = 1;
}
mode) != 0) {
"ioctl ", 8);
}
} else {
}
/*
* END_hac
*/
return (ret);
}
/*
* scf_ioc_hstadrsinfo()
*
* Description: SCFIOCHSTADRSINFO ioctl command processing.
*
*/
/* ARGSUSED */
int
{
#define SCF_FUNC_NAME "scf_ioc_hstadrsinfo() "
int ret = 0;
if (ret == 0) {
scf_save_hac_flag = 1;
mode) < 0) {
"ioctl ", 8);
}
} else {
}
return (ret);
}
/*
* scf_ioc_rdclistmax()
*
* Description: SCFIOCRDCLISTMAX ioctl command processing.
*
*/
/* ARGSUSED */
int
{
#define SCF_FUNC_NAME "scf_ioc_rdclistmax() "
int ret = 0;
int scfrdclistmax;
mode) != 0) {
}
return (ret);
}
/*
* scf_ioc_rdclistx()
*
* Description: SCFIOCRDCLISTX ioctl command processing.
*
*/
/* ARGSUSED */
int
{
#define SCF_FUNC_NAME "scf_ioc_rdclistx() "
int ret = 0;
union wk_buffer {
uchar_t b[8];
} *rbuf_wk;
int ii;
int jj;
scf_rci_max), KM_SLEEP);
/* set device class */
if (ret != 0) {
goto END_rdclistx;
}
jj++) {
break;
}
rbuf_wk++;
}
/* set device class */
if (ret != 0) {
goto END_rdclistx;
}
break;
}
rbuf_wk++;
}
/* return number of data */
mode) != 0) {
"ioctl ", 8);
}
}
/*
* END_rdclistx
*/
if (rdclistxp) {
}
if (rdclistxp_wk) {
kmem_free((void *)rdclistxp_wk,
}
return (ret);
}
/*
* scf_ioc_rdctrl()
*
* Description: SCFIOCRDCTRL ioctl command processing.
*
*/
/* ARGSUSED */
int
{
#define SCF_FUNC_NAME "scf_ioc_rdctrl() "
int ret = 0;
int got_sense = 0;
int ii;
sizeof (scfrdctrl_t), mode) != 0) {
goto END_rdctrl;
}
SCF_RCI_PATH_40)) {
/* wrong sub_cmd */
goto END_rdctrl;
}
while (scf_comtbl.rdctrl_busy) {
sizeof (kcondvar_t));
&scf_comtbl.all_mutex) == 0) {
goto END_rdctrl;
}
}
}
} else {
/* SUB_RCI_PATH_4* */
/* Parameter size set */
} else {
}
}
(SCF_RCI_PATH_40 & (~SCF_RCI_PATH_PARITY))) {
} else {
}
if (ret != 0) {
goto END_rdctrl_signal;
}
/* wait for sense */
lb = ddi_get_lbolt();
while (scf_comtbl.rdctrl_sense_category_code == 0) {
sizeof (kcondvar_t));
/* time out */
"ioctl ", 8);
goto END_rdctrl_signal;
}
}
/* check RCI-addr and category code */
got_sense = 1;
} else {
}
/*
* END_rdctrl_signal
*/
scf_comtbl.rdctrl_busy = 0;
sizeof (kcondvar_t));
if (got_sense) {
sizeof (scfrdctrl_t), mode) != 0) {
"ioctl ", 8);
}
}
/*
* END_rdctrl
*/
return (ret);
}
/*
* scf_ioc_opecall()
*
* Description: SCFIOCOPECALL ioctl command processing.
*
*/
/* ARGSUSED */
int
{
#define SCF_FUNC_NAME "scf_ioc_opecall() "
int ret = 0;
mode) != 0) {
goto END_opecall;
}
switch (scfhac.sub_command) {
case SUB_OPECALL_ON_SET:
case SUB_OPECALL_OFF_SET:
break;
case SUB_OPECALL_DISP:
break;
default:
goto END_opecall;
}
if (ret == 0) {
mode) != 0) {
"ioctl ", 8);
}
}
/*
* END_opecall
*/
return (ret);
}
/*
* scf_ioc_getreport()
*
* Description: SCFIOCGETREPORT ioctl command processing.
*
*/
/* ARGSUSED */
int
{
#define SCF_FUNC_NAME "scf_ioc_getreport() "
int ret = 0;
int loop_flag = 1;
if (u_mode == DDI_MODEL_ILP32) {
/* DDI_MODEL_ILP32 */
sizeof (scfreport32_t), mode) != 0) {
"ioctl ", 8);
goto END_getreport;
}
} else {
/* DDI_MODEL_NONE */
sizeof (scfreport_t), mode) != 0) {
"ioctl ", 8);
goto END_getreport;
}
}
case GETREPORT_WAIT:
while (loop_flag) {
if (scf_pop_reportsense(&scfreport) == 0) {
break;
}
scfreport.report_sense[0] =
scfreport_p->report_sense[0];
break;
}
&scf_comtbl.all_mutex) == 0) {
sizeof (kcondvar_t));
goto END_getreport;
}
}
break;
case GETREPORT_NOWAIT:
if (scf_pop_reportsense(&scfreport) < 0) {
"ioctl ", 8);
goto END_getreport;
}
break;
default:
goto END_getreport;
}
if (u_mode == DDI_MODEL_ILP32) {
/* DDI_MODEL_ILP32 */
"ioctl ", 8);
goto END_getreport;
}
sizeof (scfreport32_t), mode) != 0) {
"ioctl ", 8);
}
} else {
/* DDI_MODEL_NONE */
sizeof (scfreport_t), mode) != 0) {
"ioctl ", 8);
}
}
/*
* END_getreport
*/
return (ret);
}
/*
* scf_ioc_rcipwr()
*
* Description: SCFIOCRCIPWR ioctl command processing.
*
*/
/* ARGSUSED */
int
{
#define SCF_FUNC_NAME "scf_ioc_rcipwr() "
int ret = 0;
sizeof (scfrcipwr_t), mode) != 0) {
goto END_rcipwr;
}
if (ret != 0) {
goto END_rcipwr;
}
/* check RCI-address */
goto END_rcipwr;
}
case RCI_PWR_ON:
break;
case RCI_PWR_OFF:
break;
case RCI_SYS_RESET:
break;
case RCI_PWR_NOR_OFF:
break;
default:
goto END_rcipwr;
}
/*
* END_rcipwr
*/
return (ret);
}
/*
* scf_ioc_panicreq()
*
* Description: SCFIOCPANICREQ ioctl command processing.
*
*/
/* ARGSUSED */
int
{
#define SCF_FUNC_NAME "scf_ioc_panicreq() "
int ret = 0;
if (ret != 0) {
goto END_panicreq;
}
/* check RCI-address */
(arg == SCF_CMD_SYSTEM_ADDR)) {
goto END_panicreq;
}
/*
* END_panicreq
*/
return (ret);
}
/*
* scf_ioc_panicchk()
*
* Description: SCFIOCPANICCHK ioctl command processing.
*
*/
/* ARGSUSED */
int
{
#define SCF_FUNC_NAME "scf_ioc_panicchk() "
int ret = 0;
sizeof (int), mode) != 0) {
}
return (ret);
}
/*
* scf_ioc_parmset()
*
* Description: SCFIOCPARMSET ioctl command processing.
*
*/
/* ARGSUSED */
int
{
#define SCF_FUNC_NAME "scf_ioc_parmset() "
int ret = 0;
sizeof (scfparam_t), mode) != 0) {
goto END_parmset;
}
case SCF_PARM_RDCTRL_TIMER:
} else {
"ioctl ", 8);
goto END_parmset;
}
break;
default:
goto END_parmset;
}
sizeof (scfparam_t), mode) != 0) {
}
/*
* END_parmset
*/
return (ret);
}
/*
* scf_ioc_parmget()
*
* Description: SCFIOCPARMGET ioctl command processing.
*
*/
/* ARGSUSED */
int
{
#define SCF_FUNC_NAME "scf_ioc_parmget() "
int ret = 0;
sizeof (scfparam_t), mode) != 0) {
goto END_parmget;
}
case SCF_PARM_RDCTRL_TIMER:
break;
default:
goto END_parmget;
}
sizeof (scfparam_t), mode) != 0) {
}
/*
* END_parmget
*/
return (ret);
}
/*
* scf_ioc_autopwrset()
*
* Description: SCFIOCAUTOPWRSET ioctl command processing.
*
*/
/* ARGSUSED */
int
{
#define SCF_FUNC_NAME "scf_ioc_autopwrset() "
int ret = 0;
int ii;
int jj;
sizeof (scfautopwr_t), mode) != 0) {
goto END_autopwrset;
}
goto END_autopwrset;
}
/* check pon time */
"ioctl ", 8);
goto END_autopwrset;
}
"ioctl ", 8);
goto END_autopwrset;
}
}
/*
* END_autopwrset
*/
return (ret);
}
/*
* scf_ioc_autopwrget()
*
* Description: SCFIOCAUTOPWRGET or SCFIOCSYSAUTOPWRGET
* ioctl command processing.
*
*/
/* ARGSUSED */
int
{
#define SCF_FUNC_NAME "scf_ioc_autopwrget() "
int ret = 0;
int ii;
int jj;
if (ret != 0) {
goto END_autopwrget;
}
}
sizeof (scfautopwr_t), mode) != 0) {
}
/*
* END_autopwrget
*/
return (ret);
}
/*
* scf_ioc_autopwrclr()
*
* Description: SCFIOCSYSAUTOPWRCLR ioctl command processing.
*
*/
/* ARGSUSED */
int
{
#define SCF_FUNC_NAME "scf_ioc_autopwrclr() "
int ret = 0;
return (ret);
}
/*
* scf_ioc_autopwrfpoff()
*
* Description: SCFIOCAUTOPWRFPOFF ioctl command processing.
*
*/
/* ARGSUSED */
int
{
#define SCF_FUNC_NAME "scf_ioc_autopwrfpoff() "
int ret = 0;
sizeof (scfautopwrtime_t), mode) != 0) {
goto END_autopwrfpoff;
}
if (scf_check_poff_time(&scfautopwrtime) < 0) {
goto END_autopwrfpoff;
}
/*
* END_autopwrfpoff
*/
return (ret);
}
/*
* scf_ioc_autopwrexset()
*
* Description: SCFIOCAUTOPWREXSET ioctl command processing.
*
*/
/* ARGSUSED */
int
{
#define SCF_FUNC_NAME "scf_ioc_autopwrexset() "
int ret = 0;
sizeof (scfautopwrex_t), mode) != 0) {
goto END_autopwrexset;
}
switch (scfautopwrex.rpwr_mode) {
case AUTOPWREX_RESTORE:
case AUTOPWREX_NOPON:
case AUTOPWREX_AUTOPON:
break;
default:
goto END_autopwrexset;
}
/*
* END_autopwrexset
*/
return (ret);
}
/*
* scf_ioc_autopwrexget()
*
* Description: SCFIOCAUTOPWREXGET ioctl command processing.
*
*/
/* ARGSUSED */
int
{
#define SCF_FUNC_NAME "scf_ioc_autopwrexget() "
int ret = 0;
if (ret == 0) {
sizeof (scfautopwrex_t), mode) != 0) {
"ioctl ", 8);
}
}
return (ret);
}
/*
* scf_ioc_dr()
*
* Description: SCFIOCDR ioctl command processing.
*
*/
/* ARGSUSED */
int
{
#define SCF_FUNC_NAME "scf_ioc_dr() "
int ret = 0;
mode) != 0) {
goto END_dr;
}
switch (scfdr_p->sub_command) {
case SUB_SB_CONF_CHG:
break;
case SUB_SB_BUILD_COMP:
break;
case SUB_SB_SENSE_ALL:
break;
case SUB_SB_SENSE:
break;
default:
goto END_dr;
}
if (ret != 0) {
} else {
goto END_dr;
}
}
mode) != 0) {
}
/*
* END_dr
*/
if (scfdr_p) {
}
return (ret);
}
/*
* scf_ioc_eventlist()
*
* Description: SCFIOCEVENTLIST ioctl command processing.
*
*/
/* ARGSUSED */
int
{
#define SCF_FUNC_NAME "scf_ioc_eventlist() "
int ret = 0;
KM_SLEEP);
sizeof (scfeventlist_t), mode) != 0) {
goto END_eventlist;
}
goto END_eventlist;
}
sizeof (scfeventlist_t));
/*
* END_eventlist
*/
if (scfeventlist_p) {
kmem_free((void *)scfeventlist_p,
(size_t)(sizeof (scfeventlist_t)));
}
return (ret);
}
/*
* scf_ioc_getevent()
*
* Description: SCFIOCGETEVENT ioctl command processing.
*
*/
/* ARGSUSED */
int
{
#define SCF_FUNC_NAME "scf_ioc_getevent() "
int ret = 0;
int loop_flag = 1;
if (u_mode == DDI_MODEL_ILP32) {
/* DDI_MODEL_ILP32 */
sizeof (scfevent32_t), mode) != 0) {
"ioctl ", 8);
goto END_getevent;
}
} else {
/* DDI_MODEL_NONE */
sizeof (scfevent_t), mode) != 0) {
"ioctl ", 8);
goto END_getevent;
}
}
case GETEVENT_WAIT:
while (loop_flag) {
if (scf_pop_getevent(&scfevent) == 0) {
break;
}
&scf_comtbl.all_mutex) == 0) {
sizeof (kcondvar_t));
goto END_getevent;
}
}
break;
case GETEVENT_NOWAIT:
if (scf_pop_getevent(&scfevent) < 0) {
"ioctl ", 8);
goto END_getevent;
}
break;
default:
goto END_getevent;
}
if (u_mode == DDI_MODEL_ILP32) {
/* DDI_MODEL_ILP32 */
"ioctl ", 8);
goto END_getevent;
}
sizeof (scfevent32_t), mode) != 0) {
"ioctl ", 8);
}
} else {
/* DDI_MODEL_NONE */
sizeof (scfevent_t), mode) != 0) {
"ioctl ", 8);
}
}
/*
* END_getevent
*/
return (ret);
}
/*
* scf_ioc_setmadmevent()
*
* Description: SCFIOCSETMADMEVENT ioctl command processing.
*
*/
/* ARGSUSED */
int
{
#define SCF_FUNC_NAME "scf_ioc_setmadmevent() "
int ret = 0;
KM_SLEEP);
sizeof (scfiocsetmadmevent_t), mode) != 0) {
goto END_setmadmevent;
}
goto END_setmadmevent;
}
/*
* END_setmadmevent
*/
if (scfiocsetmadmevent_p) {
kmem_free((void *)scfiocsetmadmevent_p,
(size_t)(sizeof (scfiocsetmadmevent_t)));
}
return (ret);
}
/*
* scf_ioc_remcscmd()
*
* Description: SCFIOCREMCSCMD ioctl command processing.
*
*/
/* ARGSUSED */
int
{
#define SCF_FUNC_NAME "scf_ioc_remcscmd() "
int ret = 0;
sizeof (scfiocremcscmd_t), mode) != 0) {
goto END_remcscmd;
}
goto END_remcscmd;
}
switch (scfiocremcscmd.sub_command) {
case SUB_CMD_EX_REMCS:
break;
default:
goto END_remcscmd;
}
if (ret == 0) {
if (scfiocremcscmd.size != 0) {
(void *)&scfiocremcscmd.buf[0],
}
sizeof (scfiocremcscmd_t), mode) != 0) {
"ioctl ", 8);
}
}
/*
* END_remcscmd
*/
return (ret);
}
/*
* scf_ioc_remcsfile()
*
* Description: SCFIOCREMCSFILE ioctl command processing.
*
*/
/* ARGSUSED */
int
{
#define SCF_FUNC_NAME "scf_ioc_remcsfile() "
int ret = 0;
KM_SLEEP);
sizeof (scfiocremcsfile_t), mode) != 0) {
goto END_remcsfile;
}
goto END_remcsfile;
}
switch (scfiocremcsfile_p->sub_command) {
case SUB_FILEUP_READY:
"ioctl ", 8);
goto END_remcsfile;
}
break;
case SUB_FILEUP_SET:
break;
case SUB_TRANSFER_STOP:
break;
default:
goto END_remcsfile;
}
if (ret == 0) {
if (scfiocremcsfile_p->size != 0) {
(void *)&scfiocremcsfile_p->buf[0],
}
sizeof (scfiocremcsfile_t), mode) != 0) {
"ioctl ", 8);
}
}
/*
* END_remcsfile
*/
if (scfiocremcsfile_p) {
kmem_free((void *)scfiocremcsfile_p,
(size_t)(sizeof (scfiocremcsfile_t)));
}
return (ret);
}
/*
* scf_ioc_sparecmd()
*
* Description: SCFIOCSPARECMD ioctl command processing.
*
*/
/* ARGSUSED */
int
{
#define SCF_FUNC_NAME "scf_ioc_sparecmd() "
int ret = 0;
KM_SLEEP);
sizeof (scfiocsparecmd_t), mode) != 0) {
goto END_sparecmd;
}
goto END_sparecmd;
}
switch (scfiocsparecmd_p->spare_sub_command) {
case SUB_SPARE_SS:
break;
case SUB_SPARE_SL:
break;
case SUB_SPARE_LS:
break;
default:
goto END_sparecmd;
}
if (ret == 0) {
sizeof (scfiocsparecmd_t), mode) != 0) {
"ioctl ", 8);
}
}
/*
* END_sparecmd
*/
if (scfiocsparecmd_p) {
kmem_free((void *)scfiocsparecmd_p,
(size_t)(sizeof (scfiocsparecmd_t)));
}
return (ret);
}
/*
* scf_ioc_setphpinfo()
*
* Description: SCFIOCSETPHPINFO ioctl command processing.
*
*/
/* ARGSUSED */
int
{
#define SCF_FUNC_NAME "scf_ioc_setphpinfo() "
int ret = 0;
KM_SLEEP);
sizeof (scfsetphpinfo_t), mode) != 0) {
goto END_setphpinfo;
}
goto END_setphpinfo;
}
/*
* END_setphpinfo
*/
if (scfsetphpinfo_p) {
kmem_free((void *)scfsetphpinfo_p,
(size_t)(sizeof (scfsetphpinfo_t)));
}
return (ret);
}
/*
* scf_push_reportsense()
*
* Description: Set processing of SCFIOCGETREPORT information.
*
*/
int
{
#define SCF_FUNC_NAME "scf_push_reportsense() "
int overflow = 0;
int ret = 0;
overflow = 1;
/* increment counter */
}
if (overflow) {
}
return (ret);
}
/*
* scf_pop_reportsense()
*
* Description: Get processing of SCFIOCGETREPORT information.
*
*/
int
{
#define SCF_FUNC_NAME "scf_pop_reportsense() "
int ret = (-1);
/* clear flag */
? 0 : oldest + 1;
ret = 0;
}
return (ret);
}
/*
* scf_push_getevent()
*
* Description: Set processing of SCFIOCGETEVENT information.
*
*/
int
scf_push_getevent(unsigned char *event_p)
{
#define SCF_FUNC_NAME "scf_push_getevent() "
int overflow = 0;
int ii;
int ret = 1;
/* Event check */
ret = 0;
break;
}
}
if (ret == 0) {
/* Event set */
overflow = 1;
/* increment counter */
}
timestamp = ddi_get_time();
if (overflow) {
}
}
return (ret);
}
/*
* scf_pop_reportsense()
*
* Description: Get processing of SCFIOCGETEVENT information.
*
*/
int
{
#define SCF_FUNC_NAME "scf_pop_getevent() "
int ret = (-1);
/* clear flag */
? 0 : oldest + 1;
ret = 0;
}
return (ret);
}
/*
* scf_valid_date()
*
* Description: Validity check processing of date.
*
*/
int
{
#define SCF_FUNC_NAME "scf_valid_date() "
int leap = 0;
int ret = 0;
{ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 },
{ 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
};
if ((year % 400) == 0) {
leap = 1;
} else {
if ((year % 100) == 0) {
leap = 0;
} else {
if ((year % 4) == 0) {
leap = 1;
}
}
}
ret = 1;
}
return (ret);
}
/*
* scf_check_pon_time()
*
* Description: Power-on time range check processing.
*
*/
int
{
#define SCF_FUNC_NAME "scf_check_pon_time() "
int ret = (-1);
/* check date, time */
(ptime->pon_minute == 0)) {
ret = 0;
goto END_check_pon_time;
}
/* check date, time */
goto END_check_pon_time;
}
goto END_check_pon_time;
}
goto END_check_pon_time;
}
goto END_check_pon_time;
}
goto END_check_pon_time;
}
goto END_check_pon_time;
}
ret = 0;
/*
* END_check_pon_time
*/
return (ret);
}
/*
* scf_check_poff_time()
*
* Description: Power-off time range check processing.
*
*/
int
{
#define SCF_FUNC_NAME "scf_check_poff_time() "
int ret = (-1);
/* all zero? */
(ptime->poff_minute == 0)) {
goto END_check_poff_time;
}
ret = 0;
goto END_check_poff_time;
}
/* check date, time */
goto END_check_poff_time;
}
goto END_check_poff_time;
}
goto END_check_poff_time;
}
goto END_check_poff_time;
}
goto END_check_poff_time;
}
goto END_check_poff_time;
}
ret = 0;
/*
* END_check_poff_time
*/
return (ret);
}