Lines Matching refs:iocommand
259 IOCTL_Command_struct *iocommand);
6374 IOCTL_Command_struct *iocommand)
6383 if ((iocommand->buf_size < 1) &&
6384 (iocommand->Request.Type.Direction != XFER_NONE)) {
6387 if (iocommand->buf_size > 0) {
6388 buff = kmalloc(iocommand->buf_size, GFP_KERNEL);
6391 if (iocommand->Request.Type.Direction & XFER_WRITE) {
6393 if (copy_from_user(buff, iocommand->buf,
6394 iocommand->buf_size)) {
6399 memset(buff, 0, iocommand->buf_size);
6409 if (iocommand->buf_size > 0) { /* buffer to fill */
6416 memcpy(&c->Header.LUN, &iocommand->LUN_info, sizeof(c->Header.LUN));
6419 memcpy(&c->Request, &iocommand->Request,
6423 if (iocommand->buf_size > 0) {
6425 iocommand->buf_size, DMA_BIDIRECTIONAL);
6433 c->SG[0].Len = cpu_to_le32(iocommand->buf_size);
6438 if (iocommand->buf_size > 0)
6447 memcpy(&iocommand->error_info, c->err_info,
6448 sizeof(iocommand->error_info));
6449 if ((iocommand->Request.Type.Direction & XFER_READ) &&
6450 iocommand->buf_size > 0) {
6452 if (copy_to_user(iocommand->buf, buff, iocommand->buf_size)) {
6616 IOCTL_Command_struct iocommand;
6620 if (copy_from_user(&iocommand, argp, sizeof(iocommand)))
6624 rc = hpsa_passthru_ioctl(h, &iocommand);
6626 if (!rc && copy_to_user(argp, &iocommand, sizeof(iocommand)))