Error Conditions for USB Tape Client Device Driver
In addition to the listed errors, the ioctl
, open
, read
,
and write
subroutines for USB tape device are unsuccessful
in the following circumstances:
Value | Description |
---|---|
EAGAIN | Indicates that an attempt is made to open a device, which is already open. |
EBUSY | Indicates that the target device is reserved by another initiator. |
EINVAL |
|
EIO |
|
EMEDIA | Indicates an open operation is attempted for an adapter that already has the maximum permissible number of opened devices. |
ENOTREADY | Indicates that there is no tape in the drive or the drive is not ready. |
ENXIO | Indicates that there was an attempt to write to a tape, which has already reached EOM. |
EPERM | Indicates that the subroutine requires appropriate authority. |
ETIMEDOUT | Indicates that a command has timed out. |
EWRPROTECT |
|
Reliability and serviceability information
The following errors are returned from the tape devices:
Error | Description |
---|---|
ABORTED COMMAND | Indicates that the device ended the command. |
BLANK CHECK | Indicates that a read command encountered a blank tape. |
DATA PROTECT | Indicates that a write operation was attempted on a write-protected tape. |
GOOD COMPLETION | Indicates the command completed successfully. |
HARDWARE ERROR | Indicates that an unrecoverable hardware failure occurred during the command execution or during a self-test. |
ILLEGAL REQUEST | Indicates an invalid command or an invalid command parameter. |
MEDIUM ERROR | Indicates that the command ended with an unrecoverable media error condition. This condition can be caused by a tape flaw or a dirty head. |
NOT READY | Indicates that the logical unit is offline. |
RECOVERED ERROR | Indicates the command is successful after some recovery operations were applied. |
UNIT ATTENTION | Indicates that the device is reset or the power is turned on. |
Medium, hardware, and unsuccessful command errors from
the preceding list must be logged every time they occur. The ABORTED
COMMAND
error might be recoverable, but the error is logged
if recovery fails. For the RECOVERED ERROR
and recovered ABORTED
COMMAND
error types, thresholds are maintained; when they
are exceeded, an error is logged. The thresholds are then cleared.
/* Bulk transfer cmd and status blocks */
typedef struct mstor_cbw {
uint32_t cbw_signature; /* Always "USBC" little endian */
uint32_t cbw_tag; /* Command identification */
fld32_t cbw_dlen; /* Data length */
uchar cbw_flags; /* Indicates data in or data out */
uchar cbw_lun; /* Logical unit number, 0-15 */
uchar cbw_cblen; /* Significant bytes of the cmd blk */
uchar cbw_cb[16]; /* Command block itself */
uchar cbw_rsvd;
} mstor_cbw_t;
/* For error logging */
struct usbtape_err_rec {
struct err_rec0 log;
uint cmd_error;
mstor_cbw_t cbw;
char sense_data[168];
uint dd1; /* reserved for dd use */
uint dd2; /* reserved for dd use */
uint dd3; /* reserved for dd use */
uint dd4; /* reserved for dd use */
uint dd5; /* reserved for dd use */
uint dd6; /* reserved for dd use */
uint dd7; /* reserved for dd use */
uint dd8; /* reserved for dd use */
};
LABEL: SC_TAPE_ERRx
IDENTIFIER: xxxxxxxx
Date/Time: Thu Mar 12 05:20:27 CDT 2009
Sequence Number: 3829
Machine Id: 0000097AD400
Node Id: sitar04
Class: H
Type: PERM
Resource Name: rmt0
Resource Class: tape
Resource Type: 0806500c
Location:
Description
Probable Causes
Failure Causes
Recommended Actions
Detail Data
SENSE DATA
1111 1111 2222 2222 3333 3333 4444 4444 5566 7788 8888 8888 8888 8888 8888 8888
8888 8899 aaaa kkaa aaaa aaaa aaaa aaaa ccqq aaaa aaaa aaaa aaaa aaaa aaaa aaaa
aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa
aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa
aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa bbbb bbbb cccc cccc dddd dddd
Data Representation Legend
--------------------------
cmd_error 1 Command Error Value
(cmd_error values can be negative which are logged as 2's complement.
For these USB specific error values refer below or /usr/include/sys/usbdi.h.
For error values which are positive Please refer to /usr/include/sys/errno.h file for error description)
Bulk transfer Command and Status Blocks
cbw_signature 2 Always .USBC. in ASCII – “5553 4243”
cbw_tag 3 Command Identification
cbw_dlen 4 Data Length
cbw_flags 5 Indicates Data IN or OUT
cbw_lun 6 LUN Id
cbw_cblen 7 CDB (Command Descriptor Bytes) length
cbw_cb 8 CDB
cbw_rsvd 9 Reserved
Sense data
Sense data a
Sense key k
ASC c
ASCQ q
Read Transfer Count b In bytes
Write Transfer Count c In bytes
Location d Device Driver log location
Error record values for tape device errors
The following table lists the fields that are defined in the error record template for tape device errors:
Error ID | Description |
---|---|
SC_TAPE_ERR1 | Permanent tape error. This error is logged when tape medium error is encountered. |
SC_TAPE_ERR2 | Permanent tape hardware error. This error is logged when tape hardware error is encountered or command is aborted by the drive and all attempts to resolve the error have failed. |
SC_TAPE_ERR3 | Temporary tape drive failure. This error is not logged in Universal Serial Bus (USB) tape driver. |
SC_TAPE_ERR4 | Permanent tape drive failure. This error is logged when adapter failure is detected and all attempts have failed. |
SC_TAPE_ERR5 | Unknown tape error. This error is logged when tape returns a check condition but the sense data does not contain valid information. |
SC_TAPE_ERR6 | Temporary tape operation error. Tape drive needs to be cleaned. |
SC_TAPE_ERR7 | Informational error. Remote Access Service (RAS) related error logs due to internal driver sanity check failures. |
SC_TAPE_ERR8 | Temporary tape drive failure. This error is not logged in USB tape driver. |
Error record values for tape device media errors
The following table lists the fields that are defined in the error record template for tape device media errors:
Item | Description |
---|---|
Comment | The tape media error. |
Class | A value of H that indicates a hardware error. |
Report | A value of True that indicates this error must be included when an error report is generated. |
Log | A value of True that indicates an error log entry must be created when this error occurs. |
Alert | A value of False that indicates this error cannot be alerted. |
Err_Type | A value of Perm that indicates a permanent failure. |
Err_Desc | A value of 1332 that indicates a tape operation failure. |
Prob_Causes | A value of 5003 that indicates tape media. |
User_Causes | A value of 5100 that indicates an error with the tape device and a value of 7401 that indicates an error with the defective media. |
User_Actions | A value of 1601 that indicates that the removable
media must be replaced and the operation must be tried again. Or, it equals a value of 0000 that indicates that problem determination procedures must be performed. |
Inst_Causes | None. |
Inst_Actions | None. |
Fail_Causes | A value of 5003 that indicates tape media. |
Fail_Actions | A value of 1601 that indicates that the removable
media must be replaced and the operation must be tried again. Or, it equals a value of 0000 that indicates that problem determination procedures must be performed. |
The Detail_Data
field contains the command
type, device and adapter status, and the request-sense information
from the particular device in error. The Detail_Data
field
is contained in the err_rec
structure. This structure
is defined in the /usr/include/sys/errids.h file.
Error record values for tape or hardware aborted command errors
The
following fields in the err_hdr
structure are defined
in the /usr/include/sys/erec.h file for hardware
errors and aborted command errors:
Item | Description |
---|---|
Comment | A value of tape hardware or aborted command error. |
Class | A value of H that indicates a hardware error. |
Report | A value of True that indicates this error must be included when an error report is generated. |
Log | A value of True that indicates an error log entry must be created when this error occurs. |
Alert | A value of FALSE that indicates this error cannot be alerted. |
Err_Type | A value of Perm that indicates a permanent failure. |
Err_Desc | A value of 1331 that indicates a tape drive failure. |
Prob_Causes | A value of 6314 that indicates a tape drive error. |
User_Causes | None. |
User_Actions | A value of 0000 that indicates that problem determination procedures must be performed. |
Inst_Actions | None. |
Fail_Causes | A value of 5003 that indicates the failure case is the tape and a value of 6314 that indicates the failure case is the tape drive. |
Fail_Actions | A value of 0000 that indicates that problem determination procedures must be performed. |
The Detail_Data
field contains the command
type, device and adapter status, and the request-sense information
from the particular device in error. The Detail_Data
field
is contained in the err_rec
structure. This structure
is defined in the /usr/include/sys/errids.h file.
The usbtape_err_rec
structure describes information
that is contained in the Detail_Data
field.
Error record values for tape-recovered error threshold exceeded
The
following fields are defined in the err_hdr
structure
that are defined in the /usr/include/sys/erec.h file
for recovered errors that have exceeded the threshold counter:
Item | Description |
---|---|
Comment | Indicates that the threshold for the tape-recovered errors is exceeded. |
Class | A value of H that indicates a hardware error. |
Report | A value of True that indicates this error must be included when an error report is generated. |
Log | A value of True that indicates an error-log entry must be created when this error occurs. |
Alert | A value of False that indicates this error cannot be alerted. |
Err_Type | A value of TEMP that indicates a temporary failure. |
Err_Desc | A value of 1331 that indicates a tape drive failure. |
Prob_Causes | A value of 6314 that indicates the probable cause is the tape drive. |
User_Causes | A value of 5100 that indicates the media is defective and a value of 7401 that indicates the read/write head is dirty. |
User_Actions | A value of 1601 that indicates that the removable
media must be replaced and the operation must be tried again. Or, it equals a value of 0000 that indicates that problem determination procedures must be performed. |
Inst_Causes | None. |
Inst_Actions | None. |
Fail_Causes | A value of 5003 that indicates the failure cause is the tape and a value of 6314 that indicates the failure cause is tape drive. |
Fail_Actions | A value of 0000 that indicates problem-determination procedures must be performed. |
The Detail_Data
field contains the command
type, device and adapter status, and the request-sense information
from the particular device in error. This field is contained in the err_rec
structure.
The err_rec
structure is defined in the /usr/include/sys/errids.h file.
The Detail_Data
field also specifies the error type
of the threshold exceeded. The usbtape_err_rec
structure
describes information contained in the Detail_Data
field.
Error record values for tape USB adapter-detected errors
The following
fields in the err_hdr
structure are defined in the /usr/include/sys/erec.h file
for adapter-detected errors:
Item | Description |
---|---|
Comment | A tape Fibre Channel adapter-detected error. |
Class | A value of H that indicates a hardware error. |
Report | A value of True that indicates this error must be included when an error report is generated. |
Log | A value of True that indicates an error log entry must be created when this error occurs. |
Alert | A value of FALSE that indicates this error cannot be alerted. |
Err_Type | A value of PERM that indicates a permanent failure. |
Err_Desc | A value of 1331 that indicates a tape drive failure. |
Prob_Causes | The values of 3300 that indicates adapter failure and a value of 6314 that indicates tape drive failure. |
User_Causes | None. |
User_Actions | A value of 0000 that indicates that problem determination procedures must be performed. |
Inst_Causes | None. |
Inst_Actions | None. |
Fail_Causes | A value of 3300 that indicates adapter failure and a value of 6314 that indicates tape drive failure. |
Fail_Actions | A value of 0000 that indicates problem-determination procedures must be performed. |
The Detail_Data
field contains the command
type and adapter status. This field is contained in the err_rec
structure
that is defined by the /usr/include/sys/err_rec.h file.
Request-sense information is not available with this type of error.
The usbtape_err_rec
structure describes information
contained in the Detail_Data
field.
Error record values for tape drive cleaning errors
Some tape drives return errors when they need cleaning. Errors that occur when the drive needs cleaning are grouped under this class.
Item | Description |
---|---|
Comment | Indicates that the tape drive needs cleaning. |
Class | A value of H that indicates a hardware error. |
Report | A value of True that indicates this error must be included when an error report is generated. |
Log | A value of True that indicates an error log entry must be created when this error occurs. |
Alert | A value of FALSE that indicates this error cannot be alerted. |
Err_Type | A value of TEMP that indicates a temporary failure. |
Err_Desc | A value of 1332 that indicates a tape operation error. |
Prob_Causes | A value of 6314 that indicates that the probable cause is the tape drive. |
User_Causes | A value of 7401 that indicates a dirty read/write head. |
User_Actions | A value of 0000 that indicates that problem determination procedures must be performed. |
Inst_Causes | None. |
Inst_Actions | None. |
Fail_Causes | A value of 6314 that indicates that the cause is the tape drive. |
Fail_Actions | A value of 0000 that indicates problem-determination procedures must be performed. |
The Detail_Data
field contains the command
type and adapter status, and also the request-sense information from
the particular device in error. This field is contained in the err_rec
structure
that is defined by the /usr/include/sys/errids.h file.
The usbtape_err_rec
structure describes information
contained in the Detail_Data
field.
Error record values for unknown errors
Errors that occur for unknown reasons are grouped in this class. Data-protect errors fall into this class. These errors, which are detected by the tape device driver, are never seen at the tape drive.
The err_hdr structure for unknown errors describes the following fields:
Item | Description |
---|---|
Comment | A tape unknown error. |
Class | All error classes. |
Report | A value of True that indicates this error must be included when an error report is generated. |
Log | A value of True that indicates an error log entry must be created when this error occurs. |
Alert | A value of FALSE that indicates this error cannot be alerted. |
Err_Type | A value of UNKN that indicates the type of error is unknown. |
Err_Desc | A value of 0xFE00 that indicates the error description is unknown. |
Prob_Causes | Specifies the following values:
|
User_Causes | None. |
User_Actions | None. |
Inst_Causes | None. |
Inst_Actions | None. |
Fail_Causes | A value of 0xFFFF that indicates the causes for failure are unknown. |
Fail_Actions | A value of 0000 that indicates that problem-determination procedures must be performed. |
The Detail_Data
field contains the command
type and adapter status, and the request-sense information from the
particular device in error. The Detail_Data
field
is contained in the err_rec
structure. This field
is contained in the /usr/include/sys/errids.h file.
The usbtape_err_rec
structure describes information
that is contained in the Detail_Data
field.
Refer to the SCSI specification for the applicable device for the format of the particular request-sense information.