FreeBSD/sys/dev/ipmi/ipmi_kcs.c
/*
 * Write the last byte of a request message.
 */
Write the last byte of a request message.
Write the last byte of a request message .
static int
kcs_write_last_byte(struct ipmi_softc *sc, u_char data)
{
	int status;
	OUTB(sc, KCS_CTL_STS, KCS_CONTROL_WRITE_END);
	status = kcs_wait_for_ibf(sc, 0);
	if (status & KCS_STATUS_IBF)
		return (0);
	if (KCS_STATUS_STATE(status) != KCS_STATUS_STATE_WRITE)
		return (0);
	kcs_clear_obf(sc, status);
	OUTB(sc, KCS_DATA, data);
	return (1);
}
static int kcs_write_last_byte ( struct ipmi_softc * sc , u_char data ) { int status ; OUTB ( sc , KCS_CTL_STS , KCS_CONTROL_WRITE_END ) ; status = kcs_wait_for_ibf ( sc , 0 ) ; if ( status & KCS_STATUS_IBF ) return ( 0 ) ; if ( KCS_STATUS_STATE ( status ) != KCS_STATUS_STATE_WRITE ) return ( 0 ) ; kcs_clear_obf ( sc , status ) ; OUTB ( sc , KCS_DATA , data ) ; return ( 1 ) ; }
Write the last byte of a request message.
Write the last byte of a request message .
/* Write end to command */ /* Wait for IBF = 0 */ /* error state */ /* Clear OBF */ /* Send data byte to DATA. */