Performing SCSI Dumps

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

Note: SCSI 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 SCSI 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 SCSI adapter device driver.

Calls to the SCSI adapter device driver DUMPWRITE option should use the arg parameter as a pointer to the sc_buf structure to be processed. Using this interface, a SCSI write command can be run on a previously started (opened) target device. The uiop parameter is ignored by the SCSI 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 sc_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 sc_buf structure has been processed.

Attention: 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 sc_buf status fields, including the b_error field, are not set by the SCSI 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 SCSI adapter device driver, such as to attempt a DUMPSTART command before successfully executing a DUMPINIT command.
  • An errno value of EIO indicates that the SCSI 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.