u32 new_wqe; 
__be32 new_wqe; 
static int handle_error_cqe(struct mthca_dev *dev, struct mthca_cq *cq,			    struct mthca_qp *qp, int wqe_index, int is_send,			    struct mthca_err_cqe *cqe,			    struct ib_wc *entry, int *free_cqe){	int err;	int dbd;	u32 new_wqe;	if (cqe->syndrome == SYNDROME_LOCAL_QP_OP_ERR) {		mthca_dbg(dev, "local QP operation err "			  "(QPN %06x, WQE @ %08x, CQN %06x, index %d)\n",			  be32_to_cpu(cqe->my_qpn), be32_to_cpu(cqe->wqe),			  cq->cqn, cq->cons_index);		dump_cqe(dev, cqe);	}	/*	 * For completions in error, only work request ID, status (and	 * freed resource count for RD) have to be set.	 */	switch (cqe->syndrome) {	case SYNDROME_LOCAL_LENGTH_ERR:		entry->status = IB_WC_LOC_LEN_ERR;		break;	case SYNDROME_LOCAL_QP_OP_ERR:		entry->status = IB_WC_LOC_QP_OP_ERR;		break;	case SYNDROME_LOCAL_EEC_OP_ERR:		entry->status = IB_WC_LOC_EEC_OP_ERR;		break;	case SYNDROME_LOCAL_PROT_ERR:		entry->status = IB_WC_LOC_PROT_ERR;		break;	case SYNDROME_WR_FLUSH_ERR:		entry->status = IB_WC_WR_FLUSH_ERR;		break;	case SYNDROME_MW_BIND_ERR:		entry->status = IB_WC_MW_BIND_ERR;		break;	case SYNDROME_BAD_RESP_ERR:		entry->status = IB_WC_BAD_RESP_ERR;		break;	case SYNDROME_LOCAL_ACCESS_ERR:		entry->status = IB_WC_LOC_ACCESS_ERR;		break;	case SYNDROME_REMOTE_INVAL_REQ_ERR:		entry->status = IB_WC_REM_INV_REQ_ERR;		break;	case SYNDROME_REMOTE_ACCESS_ERR:		entry->status = IB_WC_REM_ACCESS_ERR;		break;	case SYNDROME_REMOTE_OP_ERR:		entry->status = IB_WC_REM_OP_ERR;		break;	case SYNDROME_RETRY_EXC_ERR:		entry->status = IB_WC_RETRY_EXC_ERR;		break;	case SYNDROME_RNR_RETRY_EXC_ERR:		entry->status = IB_WC_RNR_RETRY_EXC_ERR;		break;	case SYNDROME_LOCAL_RDD_VIOL_ERR:		entry->status = IB_WC_LOC_RDD_VIOL_ERR;		break;	case SYNDROME_REMOTE_INVAL_RD_REQ_ERR:		entry->status = IB_WC_REM_INV_RD_REQ_ERR;		break;	case SYNDROME_REMOTE_ABORTED_ERR:		entry->status = IB_WC_REM_ABORT_ERR;		break;	case SYNDROME_INVAL_EECN_ERR:		entry->status = IB_WC_INV_EECN_ERR;		break;	case SYNDROME_INVAL_EEC_STATE_ERR:		entry->status = IB_WC_INV_EEC_STATE_ERR;		break;	default:		entry->status = IB_WC_GENERAL_ERR;		break;	}	err = mthca_free_err_wqe(dev, qp, is_send, wqe_index, &dbd, &new_wqe);	if (err)		return err;	/*	 * If we're at the end of the WQE chain, or we've used up our	 * doorbell count, free the CQE.  Otherwise just update it for	 * the next poll operation.	 *	 * This does not apply to mem-free HCAs: they don't use the	 * doorbell count field, and so we should always free the CQE.	 */	if (mthca_is_memfree(dev) ||	    !(new_wqe & cpu_to_be32(0x3f)) || (!cqe->db_cnt && dbd))		return 0;	cqe->db_cnt   = cpu_to_be16(be16_to_cpu(cqe->db_cnt) - dbd);	cqe->wqe      = new_wqe;	cqe->syndrome = SYNDROME_WR_FLUSH_ERR;	*free_cqe = 0;	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/97f52eb438be7caebe026421545619d8a0c1398a/mthca_cq.c/buggy/drivers/infiniband/hw/mthca/mthca_cq.c