be32_to_cpu(((u32 *) mailbox->buf)[i + 2]));
be32_to_cpu(((__be32 *) mailbox->buf)[i + 2]));
int mthca_MODIFY_QP(struct mthca_dev *dev, int trans, u32 num,		    int is_ee, struct mthca_mailbox *mailbox, u32 optmask,		    u8 *status){	static const u16 op[] = {		[MTHCA_TRANS_RST2INIT]  = CMD_RST2INIT_QPEE,		[MTHCA_TRANS_INIT2INIT] = CMD_INIT2INIT_QPEE,		[MTHCA_TRANS_INIT2RTR]  = CMD_INIT2RTR_QPEE,		[MTHCA_TRANS_RTR2RTS]   = CMD_RTR2RTS_QPEE,		[MTHCA_TRANS_RTS2RTS]   = CMD_RTS2RTS_QPEE,		[MTHCA_TRANS_SQERR2RTS] = CMD_SQERR2RTS_QPEE,		[MTHCA_TRANS_ANY2ERR]   = CMD_2ERR_QPEE,		[MTHCA_TRANS_RTS2SQD]   = CMD_RTS2SQD_QPEE,		[MTHCA_TRANS_SQD2SQD]   = CMD_SQD2SQD_QPEE,		[MTHCA_TRANS_SQD2RTS]   = CMD_SQD2RTS_QPEE,		[MTHCA_TRANS_ANY2RST]   = CMD_ERR2RST_QPEE	};	u8 op_mod = 0;	int my_mailbox = 0;	int err;	if (trans < 0 || trans >= ARRAY_SIZE(op))		return -EINVAL;	if (trans == MTHCA_TRANS_ANY2RST) {		op_mod = 3;	/* don't write outbox, any->reset */		/* For debugging */		if (!mailbox) {			mailbox = mthca_alloc_mailbox(dev, GFP_KERNEL);			if (!IS_ERR(mailbox)) {				my_mailbox = 1;				op_mod     = 2;	/* write outbox, any->reset */			} else				mailbox = NULL;		}	} else {		if (0) {			int i;			mthca_dbg(dev, "Dumping QP context:\n");			printk("  opt param mask: %08x\n", be32_to_cpup(mailbox->buf));			for (i = 0; i < 0x100 / 4; ++i) {				if (i % 8 == 0)					printk("  [%02x] ", i * 4);				printk(" %08x",				       be32_to_cpu(((u32 *) mailbox->buf)[i + 2]));				if ((i + 1) % 8 == 0)					printk("\n");			}		}	}	if (trans == MTHCA_TRANS_ANY2RST) {		err = mthca_cmd_box(dev, 0, mailbox ? mailbox->dma : 0,				    (!!is_ee << 24) | num, op_mod,				    op[trans], CMD_TIME_CLASS_C, status);		if (0 && mailbox) {			int i;			mthca_dbg(dev, "Dumping QP context:\n");			printk(" %08x\n", be32_to_cpup(mailbox->buf));			for (i = 0; i < 0x100 / 4; ++i) {				if (i % 8 == 0)					printk("[%02x] ", i * 4);				printk(" %08x",				       be32_to_cpu(((u32 *) mailbox->buf)[i + 2]));				if ((i + 1) % 8 == 0)					printk("\n");			}		}	} else		err = mthca_cmd(dev, mailbox->dma, (!!is_ee << 24) | num,				op_mod, op[trans], CMD_TIME_CLASS_C, status);	if (my_mailbox)		mthca_free_mailbox(dev, mailbox);	return err;}