device_desc_ops(D3X)device_desc_ops(D3X)NAME
device_desc_ops: device_desc_dup, device_desc_free,
device_desc_default_get, device_desc_default_set,
device_desc_intr_target_get, device_desc_intr_target_set - operations on
device descriptors
SYNOPSIS
#include <sys/types.h>
#include <sys/iobus.h>
device_desc_t
device_desc_dup(vertex_hdl_t dev);
void
device_desc_free(device_desc_t device_desc);
device_desc_t
device_desc_default_get(vertex_hdl_t dev);
void
device_desc_default_set(vertex_hdl_t dev, device_desc_t device_desc);
vertex_hdl_t
device_desc_intr_target_get(device_desc_t device_desc);
void
device_desc_intr_target_set(device_desc_t device_desc, vertex_hdl_t dev);
int
device_desc_flags_get(device_desc_t device_desc);
void
device_desc_flags_set(device_desc_t device_desc, int flags);
Arguments
dev A hwgraph vertex representing a device.
device_desc Handle to a device descriptor object.
flags Device descriptor configuration flags
DESCRIPTION
For an overview, see device_desc(D4X).
Call device_desc_dup() to obtain the handle of a writeable copy of the
default device descriptor for a given hwgraph vertex. If the
administrator did not specify any information for dev, the returned
descriptor contains all NULL values, indicating defaults. It is the
caller's responsibility to free the device descriptor when it is no
longer needed.
Page 1
device_desc_ops(D3X)device_desc_ops(D3X)
Free a descriptor by calling device_desc_free(). The memory is reclaimed
if the descriptor is not currently associated with a device.
Call device_desc_default_get() to obtain a handle to a read-only copy of
a device descriptor. It is illegal for a driver to attempt any set
operation on a read-only device descriptor. This interface allows a
driver to query the current device descriptor information associated with
a device using the get operations.
Calling device_desc_default_set() establishes a new default device
descriptor for the specified device. The information will be used as the
new defaults for this device unless they are explicitly overridden. If
device_desc is NULL, the default device descriptor information associated
with dev is removed, and the device descriptor is freed (thus it can no
longer be used for any purpose!). If device_desc is non-NULL, it must
have been created by a previous invocation of device_desc_dup().
device_desc_default_set() should be used only on a quiesced device.
Call device_desc_intr_target_get() to query a (non-NULL) device_desc
handle. The returned value is a dev_t that represents the interrupt
target for this device (a vertex in the hwgraph representing a CPU).
Call device_desc_intr_target_set() to set the interrupt target (usually a
CPU dev_t) in the specified device descriptor. Subsequently, the caller
can use the modified device_desc in an I/O infrastructure call, or can
associate it with the device using device_desc_default_set().
Call device_desc_flags_get() to return the configuration flags for the
specified device descriptor.
Call device_desc_flags_set() to set the configuration flags for the
specified device descriptor. The previous flags will be replaced by the
passed set, so the call is usually preceded by a call to
device_desc_flags_get() to return the current settings which should be
logically modified by the new. The only flag currently available to
driver authors is D_INTR_NOTHREAD which configures the device's interrupt
handler to not be threaded and instead execute on the interrupt stack.
SEE ALSOdevice_desc(D4X), IRIX Device Driver Programmer's Guide.
Page 2