┌──────────────┐
│ pDeviceTable ├───DEVICETABLE
└──────────────┘

           ┌─────────────────┐
       ┌───┤   pAdapter[0]   │
       │   ├─────────────────┤
       │┌──┤   pAdapter[1]   │
       ││  ├─────────────────┤
       ││  │     . . .       │
       ││  ├─────────────────┤
       ││┌─┤   pAdapter[N]   │
       │││ ├─────────────────┤    ┌───────────┐
       └┼┼│  ADAPTERINFO 0  ├────┤ ADAPTER 0 ├┐ ┌────────┐
        ││ ├─────────────────┤    └───────────┘├─┤ UNIT 0 │
        ││ │   UNITINFO[0]   │                 │ └────────┘
        ││ │   UNITINFO[1]   │                 │   . . .
        ││ │     . . .       │                 │ ┌────────┐
        ││ │   UNITINFO[N]   │                 └─┤ UNIT N │
        ││ ├─────────────────┤                   └────────┘
        ││ ├─────────────────┤
        ││ ├─────────────────┤    ┌───────────┐
        └┼│  ADAPTERINFO 1  ├────┤ ADAPTER 1 ├┐ ┌────────┐
         │ ├─────────────────┤    └───────────┘├─┤ UNIT 0 │
         │ │   UNITINFO[0]   │                 │ └────────┘
         │ │   UNITINFO[1]   │                 │   . . .
         │ │     . . .       │                 │ ┌────────┐
         │ │   UNITINFO[N]   │                 └─┤ UNIT N │
         │ ├─────────────────┤                   └────────┘
         │ ├─────────────────┤
         │ ├─────────────────┤    ┌───────────┐
         └│  ADAPTERINFO N  ├────┤ ADAPTER N ├┐ ┌────────┐
           ├─────────────────┤    └───────────┘├─┤ UNIT 0 │
           │   UNITINFO[0]   │                 │ └────────┘
           │   UNITINFO[1]   │                 │   . . .
           │     . . .       │                 │ ┌────────┐
           │   UNITINFO[N]   │                 └─┤ UNIT N │
           └─────────────────┘                   └────────┘

IORB_CONFIGURATION

┌─────────────────┬─────────────────┬─────────┬─────────────────┐
│Field Name       │C Type           │Length   │Description      │
├─────────────────┼─────────────────┼─────────┼─────────────────┤
│iorbh            │IORBH            │DB(68)   │IORB header      │
├─────────────────┼─────────────────┼─────────┼─────────────────┤
│pDeviceTable     │FAR *PDEVICETABLE│DD       │Device table     │
├─────────────────┼─────────────────┼─────────┼─────────────────┤
│DeviceTableLen   │USHORT           │DW       │Length of table  │
└─────────────────┴─────────────────┴─────────┴─────────────────┘

On entry to the driver:

iorbh
See IORB General Format.

pDeviceTable
contains a far pointer to a block of storage (length = DeviceTableLen), allocated by the caller, for the driver to return the DEVICETABLE.

DeviceTableLen
contains the length of the block of storage, in bytes, for the driver to return the DEVICETABLE (pDeviceTable).

DEVICETABLE

┌─────────────────┬─────────────────┬─────────┬─────────────────┐
│Field Name       │C Type           │Length   │Description      │
├─────────────────┼─────────────────┼─────────┼─────────────────┤
│ADDLevelMajor    │UCHAR            │DB       │ADD major level  │
├─────────────────┼─────────────────┼─────────┼─────────────────┤
│ADDLevelMinor    │UCHAR            │DB       │ADD minor level  │
├─────────────────┼─────────────────┼─────────┼─────────────────┤
│ADDHandle        │USHORT           │DW       │ADD index        │
├─────────────────┼─────────────────┼─────────┼─────────────────┤
│TotalAdapters    │USHORT           │DW       │Number of        │
│                 │                 │         │adapters         │
├─────────────────┼─────────────────┼─────────┼─────────────────┤
│pAdapter[N]      │NPADAPTERINFO    │DW(N)    │AdapterInfo      │
│                 │                 │         │pointers         │
└─────────────────┴─────────────────┴─────────┴─────────────────┘

On exit from the driver:

ADDLevelMajor/ADDLevelMinor
defines the level of support the adapter device driver is written to. A driver written to this specification (IBM 0S/2 2.0 Support Level), should set the fields as follows:

┌────────────────────────┬────────────────────────────────────┐
│Field Name              │Value                               │
├────────────────────────┼────────────────────────────────────┤
│ADD_Level_Major         │ADD_LEVEL_MAJOR                     │
├────────────────────────┼────────────────────────────────────┤
│ADD_Level_Minor         │ADD_LEVEL_MINOR                     │
└────────────────────────┴────────────────────────────────────┘

ADDHandle
contains the adapter device driver's index returned by the RegisterDeviceClass DevHlp.

TotalAdapters
defines the number of adapters the device driver supports.

pAdapter[N]
contains an array of near ADAPTERINFO pointers. The number of elements in the array is determined by the TotalAdapters field.

AdapterInfo

┌────────────────────┬──────────────┬─────────┬─────────────────┐
│Field Name          │C Type        │Length   │Description      │
├────────────────────┼──────────────┼─────────┼─────────────────┤
│AdapterName[17]     │UCHAR         │DB(17)   │ASCIIZ name      │
├────────────────────┼──────────────┼─────────┼─────────────────┤
│Reserved            │UCHAR         │DB       │Reserved.  Must  │
│                    │              │         │be 0.            │
├────────────────────┼──────────────┼─────────┼─────────────────┤
│AdapterUnits        │USHORT        │DW       │Number of units  │
├────────────────────┼──────────────┼─────────┼─────────────────┤
│AdapterDevBus       │USHORT        │DW       │Device bus types │
├────────────────────┼──────────────┼─────────┼─────────────────┤
│AdapterIOAccess     │UCHAR         │DB       │Host I/O type    │
├────────────────────┼──────────────┼─────────┼─────────────────┤
│AdapterHostBus      │UCHAR         │DB       │Host bus type    │
├────────────────────┼──────────────┼─────────┼─────────────────┤
│AdapterSCSITargetID │UCHAR         │DB       │Target ID        │
├────────────────────┼──────────────┼─────────┼─────────────────┤
│AdapterSCSILUN      │UCHAR         │DB       │Logical unit     │
│                    │              │         │number           │
├────────────────────┼──────────────┼─────────┼─────────────────┤
│AdapterFlags        │USHORT        │DW       │Flags            │
├────────────────────┼──────────────┼─────────┼─────────────────┤
│MaxHWSGList         │USHORT        │DW       │Max HW s/g       │
│                    │              │         │elements         │
├────────────────────┼──────────────┼─────────┼─────────────────┤
│MaxCDBTransferLength│ULONG         │DD       │Max CDB data     │
│                    │              │         │transfer length  │
├────────────────────┼──────────────┼─────────┼─────────────────┤
│UnitInfo[N]         │UNITINFO      │DD(N)    │Unit information │
└────────────────────┴──────────────┴─────────┴─────────────────┘

On exit from the driver:

AdapterName[17]
contains the ASCIIZ name string of the adapter. This name is used by the caller for diagnostic purposes.

Reserved
contains a 0. This is a 16-bit alignment byte.

AdapterUnits
contains the number of units supported by this adapter.

AdapterDevBus
defines the adapter-to-device bus protocol used, as shown in the following table.

┌────────────────────────┬────────────────────────────────────┐
│Protocol                │Description                         │
├────────────────────────┼────────────────────────────────────┤
│AI_DEVBUS_ST506         │DASD - ST506 CAM-I                  │
├────────────────────────┼────────────────────────────────────┤
│AI_DEVBUS_ST506_II      │DASD - ST506 CAM-II                 │
├────────────────────────┼────────────────────────────────────┤
│AI_DEVBUS_ESDI          │DASD -ESDI                          │
├────────────────────────┼────────────────────────────────────┤
│AI_DEVBUS_FLOPPY        │DASD - Diskette                     │
├────────────────────────┼────────────────────────────────────┤
│AI_DEVBUS_SCSI_1        │SCSI - Version-I                    │
├────────────────────────┼────────────────────────────────────┤
│AI_DEVBUS_SCSI_2        │SCSI -Version-II                    │
├────────────────────────┼────────────────────────────────────┤
│AI_DEVBUS_SCSI_3        │SCSI - Version-III                  │
├────────────────────────┼────────────────────────────────────┤
│AI_DEVBUS_OTHER         │Protocol not listed.                │
├────────────────────────┼────────────────────────────────────┤
│AI_DEVBUS_NONSCSI_CDROM │non-SCSI CD-ROM interface           │
└────────────────────────┴────────────────────────────────────┘

One protocol should be elected. The AdapterDevBus protocol values can be OR'd with one or more modifier bits as listed in the following table.

┌────────────────────────┬────────────────────────────────────┐
│Modifier                │Description                         │
├────────────────────────┼────────────────────────────────────┤
│AI_DEVBUS_FAST_SCSI     │Fast SCSI bus timings               │
├────────────────────────┼────────────────────────────────────┤
│AI_DEVBUS_8BIT          │8-bit bus width                     │
├────────────────────────┼────────────────────────────────────┤
│AI_DEVBUS_16BIT         │16-bit bus width                    │
├────────────────────────┼────────────────────────────────────┤
│AI_DEVBUS_32BIT         │32-bit bus width                    │
└────────────────────────┴────────────────────────────────────┘

AdapterIOAccess
defines the adapter-to-host I/O data transfer capabilities, as shown in the following table.

┌────────────────────────┬────────────────────────────────────┐
│Flag                    │Description                         │
├────────────────────────┼────────────────────────────────────┤
│AI_IOACCESS_BUS_MASTER  │1st-party DMA adapter               │
├────────────────────────┼────────────────────────────────────┤
│AI_IOACCESS_PIO         │Programmed INs/OUTs                 │
├────────────────────────┼────────────────────────────────────┤
│AI_IOACCESS_DMA_SLAVE   │2nd-party DMA adapter               │
├────────────────────────┼────────────────────────────────────┤
│AI_IOACCESS_MEMORY_MAP  │Memory-mapped I/O                   │
├────────────────────────┼────────────────────────────────────┤
│AI_IOACCESS_OTHER       │I/O access not listed.              │
└────────────────────────┴────────────────────────────────────┘

AdapterHostBus
defines the adapter-to-host bus type used, as shown in the following table.

┌────────────────────────┬────────────────────────────────────┐
│Type                    │Device Connection                   │
├────────────────────────┼────────────────────────────────────┤
│AI_HOSTBUS_ISA          │ISA                                 │
├────────────────────────┼────────────────────────────────────┤
│AI_HOSTBUS_EISA         │Extended ISA                        │
├────────────────────────┼────────────────────────────────────┤
│AI_HOSTBUS_uCHNL        │Micro-channel                       │
├────────────────────────┼────────────────────────────────────┤
│AI_HOSTBUS_OTHER        │Bus type not listed.                │
├────────────────────────┼────────────────────────────────────┤
│AI_HOSTBUS_UNKNOWN      │Bus type unknown.                   │
└────────────────────────┴────────────────────────────────────┘
┌────────────────────────┬────────────────────────────────────┐
│Width                   │Description                         │
├────────────────────────┼────────────────────────────────────┤
│AI_HOSTBUS_8BIT         │8-bit bus                           │
├────────────────────────┼────────────────────────────────────┤
│AI_HOSTBUS_16BIT        │16-bit bus                          │
├────────────────────────┼────────────────────────────────────┤
│AI_HOSTBUS_32BIT        │32-bit bus                          │
├────────────────────────┼────────────────────────────────────┤
│AI_HOSTBUS_64BIT        │64-bit bus                          │
├────────────────────────┼────────────────────────────────────┤
│AI_HOSTBUS_UNKNOWN      │Bus width unknown.                  │
└────────────────────────┴────────────────────────────────────┘

Note: One bus type should be set with one bus width OR'd in.