Example #1
0
/*
 * vpoio_instr()
 */
static int
vpoio_instr(struct vpoio_data *vpo, char *buffer, int size)
{
	device_t ppbus = device_get_parent(vpo->vpo_dev);
	int error = 0;

	ppb_MS_exec(ppbus, vpo->vpo_dev, MS_OP_GET, (union ppb_insarg)buffer,
		(union ppb_insarg)size, (union ppb_insarg)MS_UNKNOWN, &error);

	ppb_ecp_sync(ppbus);

	return (error);
}
Example #2
0
/*
 * vpoio_instr()
 */
static int
vpoio_instr(struct vpoio_data *vpo, char *_buffer, int _size)
{
	union ppb_insarg buffer = { .c = _buffer };
	union ppb_insarg size = { .i = _size };
	union ppb_insarg unknown = { .i = MS_UNKNOWN };
	device_t ppbus = device_get_parent(vpo->vpo_dev);
	int error = 0;

	ppb_MS_exec(ppbus, vpo->vpo_dev, MS_OP_GET, buffer, size, unknown,
	    &error);

	ppb_ecp_sync(ppbus);

	return (error);
}