FreeBSD/sys/dev/mfi/mfi_tbolt.c
/*
 * mfi_tbolt_return_cmd -	Return a cmd to free command pool
 * @instance:		Adapter soft state
 * @tbolt_cmd:		Tbolt command packet to be returned to free command pool
 * @mfi_cmd:		Oning MFI command packe
 */
Return a cmd to free command pool
@instance:           Adapter soft state
@tbolt_cmd:          Tbolt command packet to be returned to free command pool
@mfi_cmd:            Oning MFI command packe
Return a cmd to free command pool @instance : Adapter soft state @tbolt_cmd : Tbolt command packet to be returned to free command pool @mfi_cmd : Oning MFI command packe
void
mfi_tbolt_return_cmd(struct mfi_softc *sc, struct mfi_cmd_tbolt *tbolt_cmd,
    struct mfi_command *mfi_cmd)
{
	mtx_assert(&sc->mfi_io_lock, MA_OWNED);
	mfi_cmd->cm_flags &= ~MFI_CMD_TBOLT;
	mfi_cmd->cm_extra_frames = 0;
	tbolt_cmd->sync_cmd_idx = sc->mfi_max_fw_cmds;
	TAILQ_INSERT_TAIL(&sc->mfi_cmd_tbolt_tqh, tbolt_cmd, next);
}
void mfi_tbolt_return_cmd ( struct mfi_softc * sc , struct mfi_cmd_tbolt * tbolt_cmd , struct mfi_command * mfi_cmd ) { mtx_assert ( & sc -> mfi_io_lock , MA_OWNED ) ; mfi_cmd -> cm_flags &= ~ MFI_CMD_TBOLT ; mfi_cmd -> cm_extra_frames = 0 ; tbolt_cmd -> sync_cmd_idx = sc -> mfi_max_fw_cmds ; TAILQ_INSERT_TAIL ( & sc -> mfi_cmd_tbolt_tqh , tbolt_cmd , next ) ; }
mfi_tbolt_return_cmd -       Return a cmd to free command pool
 @instance:           Adapter soft state
 @tbolt_cmd:          Tbolt command packet to be returned to free command pool
 @mfi_cmd:            Oning MFI command packe
mfi_tbolt_return_cmd - Return a cmd to free command pool @instance : Adapter soft state @tbolt_cmd : Tbolt command packet to be returned to free command pool @mfi_cmd : Oning MFI command packe