• No results found

SEND DIAGNOSTIC command

In document SCSI Commands Reference Manual (Page 185-188)

RETURNED LOGICAL BLOCK ADDRESS

3.43 SEND DIAGNOSTIC command

The SEND DIAGNOSTIC command (see table 134) requests the device server to perform diagnostic opera-tions on the SCSI target device, on the logical unit, or on both. Logical units that support this command shall implement, at a minimum, the default self-test feature (i.e., the SELFTEST bit equal to one and a parameter list length of zero).

SELFTEST bit

1 If the SELFTEST bit is set to one, the SELF-TEST CODE field shall contain 000b.

0 If the SELFTEST bit is set to zero, the contents of SELF-TEST CODE field are specified in table 135.

Table 134 — SEND DIAGNOSTIC command Bit

Byte

7 6 5 4 3 2 1 0

OPERATION CODE (1Dh)

SELF-TEST CODE PF Reserved SELFTEST DEVOFFL UNITOFFL

Reserved

(MSB) PARAMETER LIST LENGTH

(LSB) CONTROL

PF (page format) bit

1 A page format (PF) bit set to one specifies that the SEND DIAGNOSTIC parameters and any parameters returned by a following RECEIVE DIAGNOSTIC RESULTS command with the PCV bit set to zero shall contain a single diag-nostic page as defined in 4.1.1.

Note. Logical units compliant with previous versions of SPC-4 may transfer more than one diagnostic page in the SEND DIAGNOSTIC command’s parameter list and by doing so may request that more than one diagnostic page be transmitted in the RECEIVE DIAGNOSTIC RESULTS command’s parameter data.

0 A PF bit set to zero specifies that all SEND DIAGNOSTIC parameters are vendor specific. If the PARAMETER LIST LENGTH field is set to zero and the SEND DIAGNOSTIC command is not going to be followed by a corresponding RECEIVE DIAGNOSTIC RESULTS command with the PCV bit set to zero, then the application client shall set the PF bit to zero. The implementation of the PF bit is optional.

SELFTEST (Self-test) bit

1 A self-test (SELFTEST) bit set to one specifies that the device server shall perform the logical unit default self-test.

If the self-test successfully passes, the command shall be terminated with GOOD status. If the self-test fails, the command shall be terminated with CHECK CONDITION status, with the sense key set to HARDWARE ERROR.

0 A SELFTEST bit set to zero specifies that the device server shall perform the diagnostic operation specified by the SELF-TEST CODE field or in the parameter list. The diagnostic operation may require the device server to return parameter data that contains diagnostic results. If the return of parameter data is not required, the return of GOOD status indicates successful completion of the diagnostic operation. If the return of parameter data is required, the device server shall either:

Table 135 — SELF-TEST CODE field

Code Name Description

000b This value shall be used when the SELFTEST bit is set to one, or when the SELFT-EST bit is set to zero and the PF bit is set to one.

001b

Background short self-test

The device server shall start its short self-test (see SPC-4 clause 5.5.2) in the back-ground mode (see SPC-4 clause 5.5.3.3). The PARAMETER LIST LENGTH field shall contain zero.

010b

Background extended self-test

The device server shall start its extended self-test (see SPC-4 clause 5.5.2) in the background mode (see SPC-4 clause 5.6.3.3). The PARAMETER LIST LENGTH field shall contain zero.

011b Reserved

100b

Abort background self-test

The device server shall abort the current self-test running in background mode. The PARAMETER LIST LENGTH field shall contain zero. This value is only valid if a pre-vious SEND DIAGNOSTIC command specified a background self-test function and that self-test has not completed. If either of these conditions is not met, the command shall be terminated with CHECK CONDITION status, with the sense key set to ILLE-GAL REQUEST, and the additional sense code set to INVALID FIELD IN CDB.

101b

Foreground short self-test

The device server shall start its short self-test (see SPC-4 clause 5.5.2) in the fore-ground mode (see SPC-4 clause 5.5.3.2). The PARAMETER LIST LENGTH field shall contain zero.

110b

Foreground extended self-test

The device server shall start its extended self-test (see SPC-4 clause 5.5.2) in the foreground mode (see SPC-4 clause 5.5.3.2). The PARAMETER LIST LENGTH field shall contain zero.

111b Reserved

[a] Perform the requested diagnostic operation, prepare the parameter data to be returned and indicate completion by returning GOOD status. The application client issues a RECEIVE DIAGNOSTIC RESULTS command to recover the parameter data; or

[b] Accept the parameter list, and if no errors are detected in the parameter list, return GOOD status. The requested diagnostic operation and the preparation of the parameter data to be returned are per-formed upon receipt of a RECEIVE DIAGNOSTIC RESULTS command.

UNITOFFL (unit offline) bit

1 A unit offline (UNITOFFL) bit set to one specifies that the device server may perform diagnostic operations that may affect the user accessible medium on the logical unit (e.g., write operations to the user accessible medium, or repo-sitioning of the medium on sequential access devices). The device server may ignore the UNITOFFL bit.

0 A UNITOFFL bit set to zero prohibits any diagnostic operations that may be detected by subsequent tasks. When the SELFTEST bit is set to zero, the UNITOFFL bit shall be ignored.

DEVOFFL (SCSI target device offline) bit

1 A SCSI target device offline (DEVOFFL) bit set to one grants permission to the device server to perform diagnostic operations that may affect all the logical units in the SCSI target device (e.g., alteration of reservations, log parame-ters, or sense data). The device server may ignore the DEVOFFL bit.

0 A DEVOFFL bit set to zero prohibits diagnostic operations that may be detected by subsequent tasks. When the SELFTEST bit is set to zero, the DEVOFFL bit shall be ignored.

PARAMETER LIST LENGTH field

The PARAMETER LIST LENGTH field specifies the length in bytes of the parameter list that shall be trans-ferred from the application client Data-Out Buffer to the device server. A parameter list length of zero specifies that no data shall be transferred. This condition shall not be considered an error. If PF bit is set to one and the specified parameter list length results in the truncation of the diagnostic page (e.g., the parameter list length does not match the page length specified in the diagnostic page), then the command shall be terminated with CHECK CONDITION status, with the sense key set to ILLEGAL REQUEST, and the additional sense code set to INVALID FIELD IN CDB.

To ensure that the diagnostic command information is not destroyed by a command sent from another I_T nexus, the logical unit should be reserved.

In document SCSI Commands Reference Manual (Page 185-188)