• No results found

READ DEFECT DATA (10) command

In document SCSI Commands Reference Manual (Page 150-153)

RETURNED LOGICAL BLOCK ADDRESS

3.27 READ DEFECT DATA (10) command

3.27.1 READ DEFECT DATA (10) command overview

The READ DEFECT DATA (10) command (see table 102) requests that the device server transfer the medium defect data to the data-in buffer.

If the device server is unable to access the medium defect data, it shall terminate the command with CHECK CONDITION status. The sense key shall be set to either MEDIUM ERROR, if a medium error occurred, or NO SENSE, if medium defect data does not exist. The additional sense code shall be set to DEFECT LIST NOT FOUND.

Note. Some device servers may not be able to return medium defect data until after a FORMAT UNIT command (see 3.5) has been completed successfully.

REQ_PLIST (request primary defect list) bit

0 A request primary defect list (REQ_PLIST) bit set to zero specifies that the device server shall not return the PLIST.

1 A REQ_PLIST bit set to one specifies that the device server shall return the PLIST, if any.

REQ_GLIST (request grown defect list) bit

0 A request grown defect list (REQ_GLIST) bit set to zero specifies that the device server shall not return the GLIST.

1 A REQ_GLIST bit set to one specifies that the device server shall return the GLIST, if any.

A REQ_PLIST bit set to zero and a REQ_GLIST bit set to zero specifies that the device server shall return only the defect list header (i.e., the first four bytes of the defect list).

A REQ_PLIST bit set to one and a REQ_GLIST bit set to one specifies that the device server shall return both the PLIST and GLIST, if any. The order the lists are returned in is vendor-specific. Whether the lists are merged or not is vendor-specific.

DEFECT LIST FORMAT field

The DEFECT LIST FORMAT field specifies the preferred format for the defect list. This field is intended for those device servers capable of returning more than one format, as defined in the FORMAT UNIT command (see 3.5.5). A device server unable to return the requested format shall return the defect list in its default format and indicate that format in the DEFECT LIST FORMAT field in the defect list header (see table 103).

Table 102 — READ DEFECT DATA (10) command Bit

Byte

7 6 5 4 3 2 1 0

0 OPERATION CODE (37h)

1 Reserved

2 Reserved REQ_PLIST REQ_GLIST DEFECT LIST FORMAT

3 Reserved

6

7 (MSB) ALLOCATION LENGTH

8 (LSB)

9 CONTROL

If the requested defect list format and the returned defect list format are not the same, the device server shall transfer the defect data and then terminate the command with CHECK CONDITION status with the sense key set to RECOVERED ERROR and the additional sense code set to DEFECT LIST NOT FOUND.

ALLOCATION LENGTH field

The ALLOCATION LENGTH field is defined in the READ CAPACITY (16) command (see 3.27). The application client is responsible for comparing the allocation length requested in the CDB with the defect list length returned in the parameter data to determine whether a partial list was received. If the number of address descriptors the device server has to report exceeds the maximum value that is able to be specified in the ALLOCATION LENGTH field, the device server shall transfer no data and return CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN CDB.

3.27.2 READ DEFECT DATA (10) parameter data

The READ DEFECT DATA (10) parameter data (see table 103) contains a four-byte header, followed by zero or more address descriptors.

PLISTV (PLIST valid) bit

0 A PLIST valid (PLISTV) bit set to zero indicates that the data returned does not contain the PLIST.

1 A PLISTV bit set to one indicates that the data returned contains the PLIST.

GLISTV (GLIST valid) bit

0 A GLIST valid (GLISTV) bit set to zero indicates that the data returned does not contain the GLIST.

1 A GLISTV bit set to one indicates that the data returned contains the GLIST.

DEFECT LIST FORMAT field

The DEFECT LIST FORMAT field indicates the format of the address descriptors returned by the device server. This field is defined in the FORMAT UNIT command.

If the device server returns short block format address descriptors or long block format address descriptors, the address descriptors contain vendor-specific values.

Note. The use of the short block format and the long block format is not recommended for this command.

There is no standard model that defines the meaning of the block address of a defect. In the usual case, a defect that has been reassigned no longer has an LBA.

Table 103 — READ DEFECT DATA (10) parameter data Bit

Byte

7 6 5 4 3 2 1 0

0 Reserved

1 Reserved PLISTV GLISTV DEFECT LIST FORMAT

2 (MSB) DEFECT LIST LENGTH (N - 3)

3 (LSB)

Defect list (if any)

4 ADDRESS DESCRIPTOR(S) (IF ANY)

n

If the device server returns physical sector format address descriptors, it may or may not include defects in parts of the medium not accessible to the application client. If the device server returns bytes from index format address descriptors, it shall return a complete list of the defects. A complete list of the defects may include defects in areas not within the capacity returned in the READ CAPACITY command.

The DEFECT LIST LENGTH field indicates the length in bytes of the address descriptors that follow. The DEFECT LIST LENGTH is equal to four or eight times the number of the address descriptors, depending on the format of the returned address descriptors.

The address descriptors may or may not be sent in ascending order.

In document SCSI Commands Reference Manual (Page 150-153)