[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]
Technical Reference: Kernel and Subsystems, Volume 2
Serial DASD Concurrent Mode of Operation Interface
The Serial Direct Acess Storage Device (DASD) subsystem
supports the ability to broadcast one-byte message codes from one host to
all other hosts connected to the same DASD. This message-passing capability
can be used to synchronize access to the DASD. The operating system has a
concurrent mode interface to use this hardware functionality.
The concurrent mode of operation requires that a top
kernel extension runs on all hosts sharing a DASD. The top kernel extensions
communicate with each other via the Serial DASD subsystem using the concurrent
mode interface of the Serial DASD subsystem device driver. This interface
allows a top kernel extension to send and receive messages between hosts.
The concurrent mode interface consists of an entry
point in both the Serial DASD device driver and the top kernel extension.
Two ioctls register and unregister the top kernel extension with the Serial
DASD device driver. The Serial DASD device driver's entry point provides
the means to send messages as well as lock, unlock, and test DASD. The top
kernel extension entry point processes interrupts, including receiving messages
from other hosts.
Device Driver Entry Point
The Serial DASD device driver concurrent mode entry
point sends commands from the top kernel extension for a specified Serial
DASD. The top kernel extension calls this entry point directly. The DD_CONC_REGISTER ioctl operation registers entry points.
This entry point function takes one argument, which
is a pointer to a conc_cmd structure, which is defined
in the /usr/include/sys/ddconc.h file. The conc_cmd structures must be allocated by the top kernel extension. The
concurrent mode command operation is specified by the cmd_op field in the conc_cmd structure and can
have the following values. For each operation, the devno field of the conc_cmd structure specifies
the appropriate Serial DASD.
Value |
Description |
DD_CONC_SEND_REFRESH |
Broadcasts the one-byte message code specified by the message field of the conc_cmd structure. The code
is sent to all hosts connected to the Serial DASD. |
DD_CONC_LOCK |
Locks the specified Serial DASD for this host only. No other hosts
will be able to modify data on the DASD. |
DD_CONC_UNLOCK |
Unlocks the Serial DASD. Other hosts can lock and modify data on
the DASD. |
DD_CONC_TEST |
Issues a test DASD command to verify that the Serial DASD is still
accessible to this host. |
The concurrent mode entry point returns a value of
EINVAL if any of the following are true:
- The top kernel extension did not perform
a DD_CONC_REGISTER operation.
- The conc_cmd pointer
is null.
- The devno field
in the conc_cmd structure is invalid.
- The cmd_op field
in the conc_cmd structure is not one of the four valid
values previously listed.
If the concurrent mode entry point accepts the conc_cmd structure, the entry point returns a value of 0.
If the Serial DASD device driver does not have resources to issue the command,
the driver queues the command until resources are available. The concurrent
commands queued in the Serial DASD device driver are issued before any read
or write operations queued by the driver's strategy entry point.
The completion status of the concurrent mode commands
are returned to the top kernel extension's concurrent mode interrupt handler
entry point.
Top Kernel Extension Entry Point
The top kernel extension must have a concurrent mode
command interrupt handler entry point, which is called directly from the
Serial DASD subsystem device driver's interrupt handler. This function can
take four arguments: the conc_cmd pointer, and the cmd_op, message_code,
and devno fields. The conc_cmd pointer points to a conc_cmd structure. These
arguments must be of the same type specified by the conc_intr_addr function pointer field in the dd_conc_register structure.
The following valid concurrent mode commands are defined
in the /usr/include/sys/ddcon.h file. For each, the devno field specifies the appropriate Serial DASD.
Command |
Description |
DD_CONC_SEND_REFRESH |
Indicates the DD_CONC_SEND_REFRESH device driver
entry point completed. The error field in the conc_cmd
structure contains the return code necessary for the completion of this command.
The possible values are defined in the /usr/include/sys/errno.h file. The conc_cmd pointer argument to the top
kernel extension's special interrupt handler entry point is non-null. The
cmd_op, message_code,
and devno fields are 0. |
DD_CONC_LOCK |
Indicates the DD_CONC_SEND_LOCK device driver
entry point completed. The error field in the conc_cmd
structure contains the return code necessary for the completion of this command.
The possible values are defined in the /usr/include/sys/errno.h file. The conc_cmd pointer argument to the top
kernel extension's special interrupt handler entry point is non-null. The
cmd_op, message_code,
and devno fields are zero. |
DD_CONC_UNLOCK |
Indicates the DD_CONC_UNLOCK device driver
entry point completed. The error field in the conc_cmd
structure contains the return code necessary for the completion of this command.
The possible values are defined in the /usr/include/sys/errno.h file. The conc_cmd pointer argument to the top
kernel extension's special interrupt handler entry point is non-null. The
cmd_op, message_code,
and devno fields are zero. |
DD_CONC_TEST |
Indicates the DD_CONC_TEST device driver entry
point completed. The error field in the conc_cmd structure
contains the return code necessary for the completion of this command. The
possible values are defined in the /usr/include/sys/errno.h file. The conc_cmd pointer argument to the top
kernel extension's special interrupt handler entry point is non-null. The
cmd_op, message_code,
and devno fields are zero. |
DD_CONC_RECV_REFRESH |
Indicates a message with message_code was received
for the DASD specified by the devno argument. The conc_cmd argument is null for this operation. |
DD_CONC_RESET |
Indicates the DASD specified by the devno argument
was reset, and all pending messages or commands have been flushed. The argument conc_cmd is null for this operation. |
A kernel extension (referred to as the top kernel
extension), using the concurrent mode of operation with the Serial DASD subsystem
device driver, must meet the following requirements:
- The concurrent command interrupt handler
routine must have a short path length since it will be running on the Serial
DASD subsystem interrupt level. If substantial command processing is needed,
then this routine should schedule an off-level interrupt to its own off-level
interrupt handler.
- The concurrent command interrupt handler
routine must not call the Serial DASD device driver's concurrent entry point
directly. If it is necessary to call the Serial DASD device driver's concurrent
entry point, than this routine (the concurrent command interrupt handler
routine) should schedule an off-level interrupt to it's own off-level interrupt
handler to make the call.
- The top kernel extension must have an interrupt
priority no higher than the DASD device driver's interrupt priority.
- The concurrent command interrupt handler
routine may need to disable interrupts at INTCLASS0 if it is expected to
use concurrent mode on Serial DASD and some DASD of different types. The
other type of DASD needs its own device driver to support the concurrent
mode.
- A kernel extension that uses the DD_CONC_REGISTER ioctl must issue a DD_CONC_UNREGISTER ioctl before closing the device.
Related Information
Serial DASD Subsystem Device Driver.
Device-Dependent Subroutines for
Serial DASD Operations.
Device-Dependent Subroutines for
Serial DASD Adapter Operations.
Device-Dependent Subroutines for
Serial DASD Controller Operations.
Serial DASD Fence Command.
Serial Direct Access Storage
Device (DASD) Overview in AIX 5L Version 5.2 Kernel Extensions and Device Support Programming Concepts.
[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]