
{ DECK: IOT$TAPE_COLLECTED_PP_RESPONSE

  CONST
    ioc$tape_mode_command_index = 1,
    ioc$request_header_length = 4 * 8,
    ioc$min_request_length = 5 * 8;

  TYPE
    iot$tape_collected_pp_response = packed record
      pp_no: ALIGNED [0 MOD 8] 1 .. ioc$pp_count,
      pp_response: ALIGNED [0 MOD 8] iot$pp_response,
      case controller_type: cmt$controller_type of
      = cmc$mt7021_3x, cmc$mt7021_4x, cmc$mt7221_2_s0, cmc$mt7221_1, cmc$mt698_xx =
        block_id_status_area: ALIGNED [0 MOD 8] iot$tape_bid_status_response,
        device_status: ALIGNED [0 MOD 8] iot$tape_device_status,
        extended_device_status: ALIGNED [0 MOD 8] iot$tape_extended_status,
      = cmc$mt5698_xx =
        ipi_block_id_status_area: ALIGNED [0 MOD 8] iot$tape_bid_status_response,
        ipi_tape_status: ALIGNED [0 MOD 8] iot$ipi_tape_status,
      = cmc$mt5680_xx =
        ccc_cart_device_status: ALIGNED [0 MOD 8] iot$ccc_cart_device_status,
        ccc_cart_sense_bytes: ALIGNED [0 MOD 8] iot$ccc_cart_sense_bytes,
        ccc_cart_error_log: ALIGNED [0 MOD 8] iot$ccc_cart_error_log,
      casend,
    recend,

    iot$tape_request = packed record
      write_block_description: ^iot$write_tape_description,
      read_block_description: ^iot$read_tape_description,
      no_of_data_commands: iot$tape_command_index,
      no_of_non_data_commands: iot$tape_command_index,
      max_input_count: iot$transfer_count,
      first_data_command: iot$tape_command_index,
      io_id: iot$io_id,
      recovery_requeue: boolean,
      request_type: iot$tape_request_types,
      transfer_count: 0 .. ioc$tape_max_data_transfer,
      ud: ^iot$tape_job_unit_descriptor,
      error: boolean,
      inhibit_error_recovery: boolean,
      last_command_processed: iot$request_length,
      estimated_address_pair_count: 0 .. mmc$max_rma_list_length,
      tcu_parity_retry_count: iot$max_retry_count,
      parity_retry_count: iot$max_retry_count,
      lost_data_retry_count: iot$max_retry_count,
      busy_retry_count: iot$max_retry_count,
      lateack_retry_count: iot$max_retry_count,
      misc_retry_count: iot$max_retry_count,
      ipi_retry_count: iot$max_retry_count,
      initial_block_count: 0 .. ioc$max_tape_blocks_to_process,
      blocks_accessed: 0 .. ioc$max_tape_blocks_to_process,
      io_status: iot$tape_io_status,
      io_type: iot$io_function,
      pp_response_p: ^iot$tape_collected_pp_response,
      pageable_tape_request_index: 1 .. ioc$max_multiple_tape_requests + 1,
      must_free_pageable_request: boolean,
      ccc_cart_buf_underrun_recovery: boolean,
      request: ALIGNED [0 MOD 8] iot$tape_pp_request,
    recend,

    iot$wired_tape_request = packed record
      address_pair_count: ALIGNED [0 MOD 600] 0 .. mmc$max_rma_list_length,
      allocated_address_pair_count: 0 .. mmc$max_rma_list_length,
      data_pages_locked: boolean,
      list_p: ^mmt$rma_list,
      ijle_p: ^jmt$initiated_job_list_entry,
      no_of_data_commands: iot$tape_command_index,
      max_input_count: iot$transfer_count,
      first_data_command: iot$tape_command_index,
      io_id: iot$io_id,
      recovery_requeue: boolean,
      cache_purge_required_data : boolean,
      cache_purge_required_length: boolean,
      request_type: iot$tape_request_types,
      wired_write_description_p: ^iot$write_tape_description,
      wired_read_description_p: ^iot$read_tape_description,
      wired_command_heap_p: ^iot$tape_command_heap,
      io_type: iot$io_function,
      pp_response_p: ^iot$tape_collected_pp_response,
      tape_request_p: ^iot$tape_request,
      completion_q_index: iot$no_of_tape_units,
      wired_tape_table_index: 1 .. ioc$max_multiple_tape_requests,
      ready_task: boolean,
      task_id: ost$global_task_id,
      request: ALIGNED [0 MOD 8] iot$tape_pp_request,
    recend,

    iot$tape_pp_request = packed record
      fill1: ALIGNED [0 MOD 8] 0 .. 0ffff(16),
      next_pp_request: ^iot$io_request,
      fill2: 0 .. 0ffffffff(16),
      next_pp_request_rma: ost$real_memory_address,
      request_length: iot$request_length,
      logical_unit: iot$logical_unit,
      recovery: iot$request_recovery,
      interrupt: iot$interrupt,
      priority: iot$priority,
      alert_mask: iot$alert_conditions,
      mode: ALIGNED [0 MOD 8] iot$tape_format_parameters,
      tape_command: ALIGNED [0 MOD 8] array [1 .. 61] of iot$command,
    recend,

    iot$request_length = 0 .. 0ffff(16);

*copyc IOT$ALERT_CONDITIONS
*copyc IOT$CCC_CARTRIDGE_TAPE_STATUS
*copyc IOT$COMMAND
*copyc IOT$IO_FUNCTION
*copyc IOT$IO_ID
*copyc IOT$IO_REQUEST
*copyc IOT$IPI_TAPE_STATUS
*copyc IOT$LOGICAL_UNIT
*copyc IOT$NO_OF_TAPE_UNITS
*copyc IOT$READ_TAPE_DESCRIPTION
*copyc IOT$REQUEST_RECOVERY
*copyc IOT$TAPE_BLOCK_COUNT
*copyc IOT$TAPE_COMMAND_HEAP
*copyc iot$tape_device_status
*copyc IOT$TAPE_IO_STATUS
*copyc iot$tape_job_unit_descriptor
*copyc IOT$TAPE_REQUEST_TYPES
*copyc IOC$TAPE_RETRY_LIMITS
*copyc IOT$UNIT_TYPE
*copyc IOT$WRITE_TAPE_DESCRIPTION
*copyc jmt$initiated_job_list_entry
*copyc MMT$IO_TYPE
*copyc MMT$RMA_LIST
*copyc OST$GLOBAL_TASK_ID
*copyc OST$HARDWARE_SUBRANGES
*copyc RMT$DEVICE_CLASS
