mthca_warn(dev, "CQ %s on CQN %08x\n", 
mthca_warn(dev, "CQ %s on CQN %06x\n", 
static int mthca_eq_int(struct mthca_dev *dev, struct mthca_eq *eq){	struct mthca_eqe *eqe;	int disarm_cqn;	int  eqes_found = 0;	while ((eqe = next_eqe_sw(eq))) {		int set_ci = 0;		/*		 * Make sure we read EQ entry contents after we've		 * checked the ownership bit.		 */		rmb();		switch (eqe->type) {		case MTHCA_EVENT_TYPE_COMP:			disarm_cqn = be32_to_cpu(eqe->event.comp.cqn) & 0xffffff;			disarm_cq(dev, eq->eqn, disarm_cqn);			mthca_cq_event(dev, disarm_cqn);			break;		case MTHCA_EVENT_TYPE_PATH_MIG:			mthca_qp_event(dev, be32_to_cpu(eqe->event.qp.qpn) & 0xffffff,				       IB_EVENT_PATH_MIG);			break;		case MTHCA_EVENT_TYPE_COMM_EST:			mthca_qp_event(dev, be32_to_cpu(eqe->event.qp.qpn) & 0xffffff,				       IB_EVENT_COMM_EST);			break;		case MTHCA_EVENT_TYPE_SQ_DRAINED:			mthca_qp_event(dev, be32_to_cpu(eqe->event.qp.qpn) & 0xffffff,				       IB_EVENT_SQ_DRAINED);			break;		case MTHCA_EVENT_TYPE_WQ_CATAS_ERROR:			mthca_qp_event(dev, be32_to_cpu(eqe->event.qp.qpn) & 0xffffff,				       IB_EVENT_QP_FATAL);			break;		case MTHCA_EVENT_TYPE_PATH_MIG_FAILED:			mthca_qp_event(dev, be32_to_cpu(eqe->event.qp.qpn) & 0xffffff,				       IB_EVENT_PATH_MIG_ERR);			break;		case MTHCA_EVENT_TYPE_WQ_INVAL_REQ_ERROR:			mthca_qp_event(dev, be32_to_cpu(eqe->event.qp.qpn) & 0xffffff,				       IB_EVENT_QP_REQ_ERR);			break;		case MTHCA_EVENT_TYPE_WQ_ACCESS_ERROR:			mthca_qp_event(dev, be32_to_cpu(eqe->event.qp.qpn) & 0xffffff,				       IB_EVENT_QP_ACCESS_ERR);			break;		case MTHCA_EVENT_TYPE_CMD:			mthca_cmd_event(dev,					be16_to_cpu(eqe->event.cmd.token),					eqe->event.cmd.status,					be64_to_cpu(eqe->event.cmd.out_param));			/*			 * cmd_event() may add more commands.			 * The card will think the queue has overflowed if			 * we don't tell it we've been processing events.			 */			set_ci = 1;			break;		case MTHCA_EVENT_TYPE_PORT_CHANGE:			port_change(dev,				    (be32_to_cpu(eqe->event.port_change.port) >> 28) & 3,				    eqe->subtype == 0x4);			break;		case MTHCA_EVENT_TYPE_CQ_ERROR:			mthca_warn(dev, "CQ %s on CQN %08x\n",				   eqe->event.cq_err.syndrome == 1 ?				   "overrun" : "access violation",				   be32_to_cpu(eqe->event.cq_err.cqn));			break;		case MTHCA_EVENT_TYPE_EQ_OVERFLOW:			mthca_warn(dev, "EQ overrun on EQN %d\n", eq->eqn);			break;		case MTHCA_EVENT_TYPE_EEC_CATAS_ERROR:		case MTHCA_EVENT_TYPE_SRQ_CATAS_ERROR:		case MTHCA_EVENT_TYPE_LOCAL_CATAS_ERROR:		case MTHCA_EVENT_TYPE_ECC_DETECT:		default:			mthca_warn(dev, "Unhandled event %02x(%02x) on EQ %d\n",				   eqe->type, eqe->subtype, eq->eqn);			break;		};		set_eqe_hw(eqe);		++eq->cons_index;		eqes_found = 1;		if (unlikely(set_ci)) {			/*			 * Conditional on hca_type is OK here because			 * this is a rare case, not the fast path.			 */			set_eq_ci(dev, eq, eq->cons_index);			set_ci = 0;		}	}	/*	 * Rely on caller to set consumer index so that we don't have	 * to test hca_type in our interrupt handling fast path.	 */	return eqes_found;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/b87dcfbacee9c57b39738f43f32834f02ec302d5/mthca_eq.c/clean/drivers/infiniband/hw/mthca/mthca_eq.c