int write, int group, void *buf, int size)
int write, int group, void *buf, size_t size)
iop_param_op(struct iop_softc *sc, int tid, struct iop_initiator *ii,	     int write, int group, void *buf, int size){	struct iop_msg *im;	struct i2o_util_params_op *mf;	struct i2o_reply *rf;	int rv, func, op;	struct iop_pgop *pgop;	u_int32_t mb[IOP_MAX_MSG_SIZE / sizeof(u_int32_t)];	im = iop_msg_alloc(sc, ii, (ii == NULL ? IM_WAIT : 0) | IM_NOSTATUS);	if ((pgop = malloc(sizeof(*pgop), M_DEVBUF, M_WAITOK)) == NULL) {		iop_msg_free(sc, im);		return (ENOMEM);	}	if ((rf = malloc(sizeof(*rf), M_DEVBUF, M_WAITOK)) == NULL) {		iop_msg_free(sc, im);		free(pgop, M_DEVBUF);		return (ENOMEM);	}	im->im_dvcontext = pgop;	im->im_rb = rf;	if (write) {		func = I2O_UTIL_PARAMS_SET;		op = I2O_PARAMS_OP_FIELD_SET;	} else {		func = I2O_UTIL_PARAMS_GET;		op = I2O_PARAMS_OP_FIELD_GET;	}	mf = (struct i2o_util_params_op *)mb;	mf->msgflags = I2O_MSGFLAGS(i2o_util_params_op);	mf->msgfunc = I2O_MSGFUNC(tid, func);	mf->msgictx = IOP_ICTX;	mf->msgtctx = im->im_tctx;	mf->flags = 0;	pgop->olh.count = htole16(1);	pgop->olh.reserved = htole16(0);	pgop->oat.operation = htole16(op);	pgop->oat.fieldcount = htole16(0xffff);	pgop->oat.group = htole16(group);	if (ii == NULL)		PHOLD(curproc);	memset(buf, 0, size);	iop_msg_map(sc, im, mb, pgop, sizeof(*pgop), 1);	iop_msg_map(sc, im, mb, buf, size, write);	rv = iop_msg_post(sc, im, mb, (ii == NULL ? 30000 : 0));	if (ii == NULL)		PRELE(curproc);	/* Detect errors; let partial transfers to count as success. */	if (ii == NULL && rv == 0) {		if (rf->reqstatus == I2O_STATUS_ERROR_PARTIAL_XFER &&		    letoh16(rf->detail) == I2O_DSC_UNKNOWN_ERROR)			rv = 0;		else			rv = (rf->reqstatus != 0 ? EIO : 0);	}	if (ii == NULL || rv != 0) {		iop_msg_unmap(sc, im);		iop_msg_free(sc, im);		free(pgop, M_DEVBUF);		free(rf, M_DEVBUF);	}	return (rv);}