Performing Dumps

A device driver must have a dddump entry point if it drives a dump device.

A adapter device driver must have a dddump entry point if it is used to access a system dump device. Examples of dump devices are disks and tapes.

Note: Adapter-device-driver writers should be aware that system services providing interrupt and timer services are unavailable for use in the dump routine. Kernel DMA services are assumed to be available for use by the dump routine. The adapter device driver should be designed to ignore extra DUMPINIT and DUMPSTART commands to the dddump entry point.

The DUMPQUERY option should return a minimum transfer size of 0 bytes, and a maximum transfer size equal to the maximum transfer size supported by the adapter device driver.

Calls to the adapter device driver DUMPWRITE option should use the arg parameter as a pointer to the scsi_buf structure to be processed. Using this interface, a write command can be executed on a previously started (opened) target device. The uiop parameter is ignored by the adapter device driver during the DUMPWRITE command. Spanned, or consolidated, commands are not supported using the DUMPWRITE option. Gathered write commands are also not supported using the DUMPWRITE option. No queuing of scsi_buf structures is supported during dump processing because the dump routine runs essentially as a subroutine call from the caller's dump routine. Control is returned when the entire scsi_buf structure has been processed.

Note: Also, both adapter-device-driver and device-driver writers should be aware that any error occurring during the DUMPWRITE option is considered unsuccessful. Therefore, no error recovery is employed during the DUMPWRITE. Return values from the call to the dddump routine indicate the specific nature of the failure.

Successful completion of the selected operation is indicated by a 0 return value to the subroutine. Unsuccessful completion is indicated by a return code set to one of the following values for the errno global variable. The various scsi_buf status fields, including the b_error field, are not set by the adapter device driver at completion of the DUMPWRITE command. Error logging is, of necessity, not supported during the dump.

  • An errno value of EINVAL indicates that a request that was not valid passed to the adapter device driver, such as to attempt a DUMPSTART command before successfully executing a DUMPINIT command.
  • An errno value of EIO indicates that the adapter device driver was unable to complete the command due to a lack of required resources or an I/O error.
  • An errno value of ETIMEDOUT indicates that the adapter did not respond with completion status before the passed command time-out value expired.