FreeBSD/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c
/*
 * Convert the status code of an ABORT_REQ into a FreeBSD error code.
 */
Convert the status code of an ABORT_REQ into a FreeBSD error code.
Convert the status code of an ABORT_REQ into a FreeBSD error code .
static int
abort_status_to_errno(struct tcpcb *tp, int abort_reason)
{
	switch (abort_reason) {
	case CPL_ERR_BAD_SYN:
	case CPL_ERR_CONN_RESET:
		return (tp->t_state == TCPS_CLOSE_WAIT ? EPIPE : ECONNRESET);
	case CPL_ERR_XMIT_TIMEDOUT:
	case CPL_ERR_PERSIST_TIMEDOUT:
	case CPL_ERR_FINWAIT2_TIMEDOUT:
	case CPL_ERR_KEEPALIVE_TIMEDOUT:
		return (ETIMEDOUT);
	default:
		return (EIO);
	}
}
static int abort_status_to_errno ( struct tcpcb * tp , int abort_reason ) { switch ( abort_reason ) { case CPL_ERR_BAD_SYN : case CPL_ERR_CONN_RESET : return ( tp -> t_state == TCPS_CLOSE_WAIT ? EPIPE : ECONNRESET ) ; case CPL_ERR_XMIT_TIMEDOUT : case CPL_ERR_PERSIST_TIMEDOUT : case CPL_ERR_FINWAIT2_TIMEDOUT : case CPL_ERR_KEEPALIVE_TIMEDOUT : return ( ETIMEDOUT ) ; default : return ( EIO ) ; } }
Convert the status code of an ABORT_REQ into a FreeBSD error code.
Convert the status code of an ABORT_REQ into a FreeBSD error code .