Lines Matching refs:maint_io
264 struct rio_mport_maint_io maint_io; in rio_mport_maint_rd() local
270 if (unlikely(copy_from_user(&maint_io, arg, sizeof(maint_io)))) in rio_mport_maint_rd()
273 if ((maint_io.offset % 4) || in rio_mport_maint_rd()
274 (maint_io.length == 0) || (maint_io.length % 4) || in rio_mport_maint_rd()
275 (maint_io.length + maint_io.offset) > RIO_MAINT_SPACE_SZ) in rio_mport_maint_rd()
278 buffer = vmalloc(maint_io.length); in rio_mport_maint_rd()
281 length = maint_io.length/sizeof(u32); in rio_mport_maint_rd()
282 offset = maint_io.offset; in rio_mport_maint_rd()
289 ret = rio_mport_read_config_32(mport, maint_io.rioid, in rio_mport_maint_rd()
290 maint_io.hopcount, offset, &buffer[i]); in rio_mport_maint_rd()
297 if (unlikely(copy_to_user((void __user *)(uintptr_t)maint_io.buffer, in rio_mport_maint_rd()
298 buffer, maint_io.length))) in rio_mport_maint_rd()
309 struct rio_mport_maint_io maint_io; in rio_mport_maint_wr() local
315 if (unlikely(copy_from_user(&maint_io, arg, sizeof(maint_io)))) in rio_mport_maint_wr()
318 if ((maint_io.offset % 4) || in rio_mport_maint_wr()
319 (maint_io.length == 0) || (maint_io.length % 4) || in rio_mport_maint_wr()
320 (maint_io.length + maint_io.offset) > RIO_MAINT_SPACE_SZ) in rio_mport_maint_wr()
323 buffer = vmalloc(maint_io.length); in rio_mport_maint_wr()
326 length = maint_io.length; in rio_mport_maint_wr()
329 (void __user *)(uintptr_t)maint_io.buffer, length))) { in rio_mport_maint_wr()
334 offset = maint_io.offset; in rio_mport_maint_wr()
342 ret = rio_mport_write_config_32(mport, maint_io.rioid, in rio_mport_maint_wr()
343 maint_io.hopcount, in rio_mport_maint_wr()