scsi_errmsg() interprets the request sense information in the sensep pointer and generates a standard message that is displayed using scsi_log(9F). The first line of the message is always a CE_WARN, with the continuation
lines being CE_CONT. sensep may be NULL, in which case no sense key or vendor information is displayed.
The driver should make the determination as to when to call this function based on the severity of the failure and the severity level that the driver wants to report.
The scsi_device(9S) structure denoted by devp supplies the identification of the device that requested the display. severity selects which string is used in the "Error Level:" reporting, according to the
following table:
Severity Value:
String:
SCSI_ERR_ALL
All
SCSI_ERR_UNKNOWN
Unknown
SCSI_ERR_INFO
Informational
SCSI_ERR_RECOVERE
Recovered
SCSI_ERR_RETRYABL
Retryable
SCSI_ERR_FATAL
Fatal
blkno is the block number of the original request that generated the error. err_blkno is the block number where the error occurred. cmdlist is a mapping table for translating the SCSI command code in pktp to the actual command string.
The cmdlist is described in the structure below:
struct scsi_key_strings {
int key;
char *message;
};
For a basic SCSI disk, the following list is appropriate: