static int i2o_parm_issue(struct i2o_device *i2o_dev, int cmd, void *oplist, 
int i2o_parm_issue(struct i2o_device *i2o_dev, int cmd, void *oplist, 
static int i2o_parm_issue(struct i2o_device *i2o_dev, int cmd, void *oplist,			  int oplen, void *reslist, int reslen){	struct i2o_message __iomem *msg;	u32 m;	u32 *res32 = (u32 *) reslist;	u32 *restmp = (u32 *) reslist;	int len = 0;	int i = 0;	int rc;	struct i2o_dma res;	struct i2o_controller *c = i2o_dev->iop;	struct device *dev = &c->pdev->dev;	res.virt = NULL;	if (i2o_dma_alloc(dev, &res, reslen, GFP_KERNEL))		return -ENOMEM;	m = i2o_msg_get_wait(c, &msg, I2O_TIMEOUT_MESSAGE_GET);	if (m == I2O_QUEUE_EMPTY) {		i2o_dma_free(dev, &res);		return -ETIMEDOUT;	}	i = 0;	writel(cmd << 24 | HOST_TID << 12 | i2o_dev->lct_data.tid,	       &msg->u.head[1]);	writel(0, &msg->body[i++]);	writel(0x4C000000 | oplen, &msg->body[i++]);	/* OperationList */	memcpy_toio(&msg->body[i], oplist, oplen);	i += (oplen / 4 + (oplen % 4 ? 1 : 0));	writel(0xD0000000 | res.len, &msg->body[i++]);	/* ResultList */	writel(res.phys, &msg->body[i++]);	writel(I2O_MESSAGE_SIZE(i + sizeof(struct i2o_message) / 4) |	       SGL_OFFSET_5, &msg->u.head[0]);	rc = i2o_msg_post_wait_mem(c, m, 10, &res);	/* This only looks like a memory leak - don't "fix" it. */	if (rc == -ETIMEDOUT)		return rc;	memcpy(reslist, res.virt, res.len);	i2o_dma_free(dev, &res);	/* Query failed */	if (rc)		return rc;	/*	 * Calculate number of bytes of Result LIST	 * We need to loop through each Result BLOCK and grab the length	 */	restmp = res32 + 1;	len = 1;	for (i = 0; i < (res32[0] & 0X0000FFFF); i++) {		if (restmp[0] & 0x00FF0000) {	/* BlockStatus != SUCCESS */			printk(KERN_WARNING			       "%s - Error:\n  ErrorInfoSize = 0x%02x, "			       "BlockStatus = 0x%02x, BlockSize = 0x%04x\n",			       (cmd ==				I2O_CMD_UTIL_PARAMS_SET) ? "PARAMS_SET" :			       "PARAMS_GET", res32[1] >> 24,			       (res32[1] >> 16) & 0xFF, res32[1] & 0xFFFF);			/*			 *      If this is the only request,than we return an error			 */			if ((res32[0] & 0x0000FFFF) == 1) {				return -((res32[1] >> 16) & 0xFF);	/* -BlockStatus */			}		}		len += restmp[0] & 0x0000FFFF;	/* Length of res BLOCK */		restmp += restmp[0] & 0x0000FFFF;	/* Skip to next BLOCK */	}	return (len << 2);	/* bytes used by result list */}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/f52bdbe9fcf2453d402376e22de1eca6dfc96890/device.c/clean/drivers/message/i2o/device.c