/* ib2ehca_qp_state maps IB to ehca qp_state returns ehca qp state corresponding to given ib qp state  */
static enum ehca_qp_state ib2ehca_qp_state(enum ib_qp_state ib_qp_state)
/* ib2ehca_qp_state maps IB to ehca qp_state returns ehca qp state corresponding to given ib qp state  */
static enum ehca_qp_state ib2ehca_qp_state(enum ib_qp_state ib_qp_state)
{
	switch (ib_qp_state) {
	case IB_QPS_RESET:
		return EHCA_QPS_RESET;
	case IB_QPS_INIT:
		return EHCA_QPS_INIT;
	case IB_QPS_RTR:
		return EHCA_QPS_RTR;
	case IB_QPS_RTS:
		return EHCA_QPS_RTS;
	case IB_QPS_SQD:
		return EHCA_QPS_SQD;
	case IB_QPS_SQE:
		return EHCA_QPS_SQE;
	case IB_QPS_ERR:
		return EHCA_QPS_ERR;
	default:
		ehca_gen_err("invalid ib_qp_state=%x", ib_qp_state);
		return -EINVAL;
	}
}