FreeBSD/sys/dev/mrsas/mrsas.c
/*
 * mrsas_release_mfi_cmd:	Return a cmd to free command pool
 * input:					Command packet for return to free cmd pool
 *
 * This function returns the MFI command to the command list.
 */
Return a cmd to free command pool
input:                                       Command packet for return to free cmd pool

This function returns the MFI command to the command list.
Return a cmd to free command pool input : Command packet for return to free cmd pool This function returns the MFI command to the command list .
void
mrsas_release_mfi_cmd(struct mrsas_mfi_cmd *cmd)
{
	struct mrsas_softc *sc = cmd->sc;
	mtx_lock(&sc->mfi_cmd_pool_lock);
	cmd->ccb_ptr = NULL;
	cmd->cmd_id.frame_count = 0;
	TAILQ_INSERT_TAIL(&(sc->mrsas_mfi_cmd_list_head), cmd, next);
	mtx_unlock(&sc->mfi_cmd_pool_lock);
	return;
}
void mrsas_release_mfi_cmd ( struct mrsas_mfi_cmd * cmd ) { struct mrsas_softc * sc = cmd -> sc ; mtx_lock ( & sc -> mfi_cmd_pool_lock ) ; cmd -> ccb_ptr = NULL ; cmd -> cmd_id . frame_count = 0 ; TAILQ_INSERT_TAIL ( & ( sc -> mrsas_mfi_cmd_list_head ) , cmd , next ) ; mtx_unlock ( & sc -> mfi_cmd_pool_lock ) ; return ; }
mrsas_release_mfi_cmd:       Return a cmd to free command pool
 input:                                       Command packet for return to free cmd pool
mrsas_release_mfi_cmd : Return a cmd to free command pool input : Command packet for return to free cmd pool