Index Index for
Section 9
Index Alphabetical
listing for D
Bottom of page Bottom of
page

device_config(9s)

NAME

device_config - General: Contains information needed to create a device data structure

SYNOPSIS

struct device_config { long revision; char device_type[NAME_SIZE_REG]; char device_name[NAME_SIZE_REG]; char controller_name[NAME_SIZE_REG]; int phys_unit_num; int logical_unit_number; int controller_num; ulong flags; };

MEMBERS

revision Specifies the version number of the device_config structure. You set this member to the constant DEVICE_CONFIG_REV_V1. Compaq defines this constant to the appropriate version number in the /usr/sys/include/io/common/devdriver.h file. device_type Specifies the device type (for example, disk or tape). You can set this member to the strings disk and tape to represent disk and tape devices. However, you can set this member to any string to represent other device types. The device type can be a maximum of 30 characters. device_name Specifies the name associated with the device type. You can set this member to any string (maximum 8 characters). For devices supported by Compaq, the device name is one of the valid device definition keywords associated with the device. See the System Administration guide (specifically, the section that discusses how to build the kernel to add support for a new device) for information on how to obtain the device definition keywords asssociated with devices supported by Compaq. Third-party driver writers who write drivers that operate on non-Compaq devices can select a string that might include the vendor and product names. The string could also include version and release numbers. This type of naming scheme reduces the chance of name conflicts with other vendors. controller_name Specifies the name of the controller to which this device (the device associated with this device_config structure) is connected. You can pass any string up to a maximum of 30 characters). For controllers supported by Compaq, the controller name is one of the valid controller definition keywords associated with the controller. For example, the keyword hsc represents an HSC controller. See the System Administration guide (specifically, the section that discusses how to build the kernel to add support for a new device) for information on how to obtain the device definition keywords asssociated with devices supported by Compaq. Third-party driver writers who write drivers for non-Compaq controllers can select a string that might include the vendor and product names. The string could also include version and release numbers. This type of naming scheme reduces the chance of name conflicts with other vendors. phys_unit_num Specifies the device physical unit number. logical_unit_number Specifies the device logical unit number. The logical unit number for a disk drive is any positive integer, for example, 0 or 1. controller_num Specifies the number of the controller to which this device (the device associated with this device_config structure) is connected. Typically, you set this member to a number, for example, 0, 1, 2, and so forth. flags Used to pass structure configure information to the create_device_struct() routine.

DESCRIPTION

The device_config data structure contains the information needed to create a device data structure and to integrate it into the system (hardware) configuration tree. To create a device data structure, you set the members of the device_config data structure to appropriate values and call the create_device_struct routine. This routine takes as an argument a pointer to the filled-in device_config structure.

FILES

<io/common/devdriver.h>

SEE ALSO

Routines: create_device_struct(9r) Data Structures: controller(9s), controller_config(9s), device(9s)

Index Index for
Section 9
Index Alphabetical
listing for D
Top of page Top of
page