## Physical Device Driver Reference

[prev][next][parent][TOC]

### Device Adapter Keys

Each adapter device node contains text describing the adapter or device. To facilitate searching for a particular node, the beginning characters of the descriptive text are assumed to be keys. Keys are subject to the following rules:

Any sibling nodes, such as nodes connected to the same parent, must have unique keys.

Keys end at the first blank character or the 16th consecutive non-blank character.

Keys are part of the descriptive text and must consist of printable ASCII characters.

Assign unique keys to adapter nodes based on their product name or function . For example:

CPU_0 CPU x486
IDE_0 Generic IDE Channel Adapter
AHA154X_0 AHA154X_0
AHA154X_1 Adaptec** 154X SCSI Adapters
PAS16 Pro AudioSpectrum** Audio Adapter

If multiple occurrences of the same type of adapter occurs, keys must be made unique by appending a _0, _1, ..., suffix to the key.

The Resource Manager services can automatically generate the _0, _1, ... suffix based on the adapter number supplied. Refer to RMCreateAdapter for further information.

Assign the following the naming conventions for device nodes:

COMM_0 Serial Port
DISK_0 DASD Device
CDROM_0 CDROM Device
TAPE_0 Tape Device
PRINTER_0 Printer Device
SCANNER_0 Scanner Device

The Resource Manager services can automatically generate the _0, _1, ... suffix based on the device number supplied. This is done by including a "#" character at the end of the key. The RMCreateAdapter service and the RMCreateDevice service will replace the "#" character with the adapter or device number indicated. For example:

          DSKT_#  - 1.44MB diskette drive

will be converted to:

          DSKT_0  - 1.44 MB diskette drive

This process will occur provided that an adjunct structure containing the device number (ADJ_DEVICE_NUMBER) is passed on the RMCreateDevice service call. Adjunct data structures are discussed in Adjunct Data. Keys for SCSI devices should use the above device types followed by _(t,l) corresponding to the Target/Lun SCSI device. For example:

        DISK_(0,0)

        CDROM_(3,0)

RMParseSCSIInquiry automatically generates appropriate keys for SCSI devices. An adjunct structure containing the Target/Lun device (ADJ_SCSI_ TARGET_LUN) should be passed on the RMCreateDevice service call.