FreeBSD/sys/dev/mrsas/mrsas.c
/*
 * mrsas_wakeup:	Completes an internal command
 * input:			Adapter soft state
 * 					Command to be completed
 *
 * In mrsas_issue_blocked_cmd(), after a command is issued to Firmware, a wait
 * timer is started.  This function is called from
 * mrsas_complete_mptmfi_passthru() as it completes the command, to wake up
 * from the command wait.
 */
Completes an internal command
input:                       Adapter soft state
Command to be completed

In mrsas_issue_blocked_cmd(), after a command is issued to Firmware, a wait
timer is started.  This function is called from
mrsas_complete_mptmfi_passthru() as it completes the command, to wake up
from the command wait.
Completes an internal command input : Adapter soft state Command to be completed In mrsas_issue_blocked_cmd () after a command is issued to Firmware a wait timer is started . This function is called from mrsas_complete_mptmfi_passthru () as it completes the command to wake up from the command wait .
void
mrsas_wakeup(struct mrsas_softc *sc, struct mrsas_mfi_cmd *cmd)
{
	cmd->cmd_status = cmd->frame->io.cmd_status;
	if (cmd->cmd_status == 0xFF)
		cmd->cmd_status = 0;
	sc->chan = (void *)&cmd;
	wakeup_one((void *)&sc->chan);
	return;
}
void mrsas_wakeup ( struct mrsas_softc * sc , struct mrsas_mfi_cmd * cmd ) { cmd -> cmd_status = cmd -> frame -> io . cmd_status ; if ( cmd -> cmd_status == 0xFF ) cmd -> cmd_status = 0 ; sc -> chan = ( void * ) & cmd ; wakeup_one ( ( void * ) & sc -> chan ) ; return ; }
mrsas_wakeup:        Completes an internal command
 input:                       Adapter soft state
                                      Command to be completed
mrsas_wakeup : Completes an internal command input : Adapter soft state Command to be completed