Lines Matching refs:iocommand
5982 IOCTL_Command_struct iocommand; in pqi_passthru_ioctl() local
5993 if (copy_from_user(&iocommand, arg, sizeof(iocommand))) in pqi_passthru_ioctl()
5995 if (iocommand.buf_size < 1 && in pqi_passthru_ioctl()
5996 iocommand.Request.Type.Direction != XFER_NONE) in pqi_passthru_ioctl()
5998 if (iocommand.Request.CDBLen > sizeof(request.cdb)) in pqi_passthru_ioctl()
6000 if (iocommand.Request.Type.Type != TYPE_CMD) in pqi_passthru_ioctl()
6003 switch (iocommand.Request.Type.Direction) { in pqi_passthru_ioctl()
6013 if (iocommand.buf_size > 0) { in pqi_passthru_ioctl()
6014 kernel_buffer = kmalloc(iocommand.buf_size, GFP_KERNEL); in pqi_passthru_ioctl()
6017 if (iocommand.Request.Type.Direction & XFER_WRITE) { in pqi_passthru_ioctl()
6018 if (copy_from_user(kernel_buffer, iocommand.buf, in pqi_passthru_ioctl()
6019 iocommand.buf_size)) { in pqi_passthru_ioctl()
6024 memset(kernel_buffer, 0, iocommand.buf_size); in pqi_passthru_ioctl()
6033 memcpy(request.lun_number, iocommand.LUN_info.LunAddrBytes, in pqi_passthru_ioctl()
6035 memcpy(request.cdb, iocommand.Request.CDB, iocommand.Request.CDBLen); in pqi_passthru_ioctl()
6038 switch (iocommand.Request.Type.Direction) { in pqi_passthru_ioctl()
6055 if (iocommand.buf_size > 0) { in pqi_passthru_ioctl()
6056 put_unaligned_le32(iocommand.buf_size, &request.buffer_length); in pqi_passthru_ioctl()
6060 iocommand.buf_size, DMA_BIDIRECTIONAL); in pqi_passthru_ioctl()
6072 if (iocommand.buf_size > 0) in pqi_passthru_ioctl()
6076 memset(&iocommand.error_info, 0, sizeof(iocommand.error_info)); in pqi_passthru_ioctl()
6080 iocommand.error_info.ScsiStatus = ciss_error_info.scsi_status; in pqi_passthru_ioctl()
6081 iocommand.error_info.CommandStatus = in pqi_passthru_ioctl()
6086 sizeof(iocommand.error_info.SenseInfo)) in pqi_passthru_ioctl()
6088 sizeof(iocommand.error_info.SenseInfo); in pqi_passthru_ioctl()
6089 memcpy(iocommand.error_info.SenseInfo, in pqi_passthru_ioctl()
6091 iocommand.error_info.SenseLen = sense_data_length; in pqi_passthru_ioctl()
6095 if (copy_to_user(arg, &iocommand, sizeof(iocommand))) { in pqi_passthru_ioctl()
6100 if (rc == 0 && iocommand.buf_size > 0 && in pqi_passthru_ioctl()
6101 (iocommand.Request.Type.Direction & XFER_READ)) { in pqi_passthru_ioctl()
6102 if (copy_to_user(iocommand.buf, kernel_buffer, in pqi_passthru_ioctl()
6103 iocommand.buf_size)) { in pqi_passthru_ioctl()