Kernel Functions for Drivers scsivalidatesense(9F)
NAME
scsivalidatesense - find descriptor in SCSI sense data
SYNOPSIS
#include
int scsivalidatesense(uint8t *sensebuffer, int sensebuflen,
int *flags);
INTERFACE LEVEL
Solaris DI specific (Solaris DI).
PARAMETERS
sensebuffer Pointer to a buffer containing SCSI sense
data. The sense data is expected in wire
format starting at the response code.
sensebuflen Length of sense buffer in bytes.
flags Returns additional properties of the sense
data.
DESCRIPTION
The scsivalidatesense() function returns the format of the
sense data contained in the provided sense buffer. If the
response code field in the sense data is not recognized or
if there is not enough sense data to include sense key, asc,
and ascq then scsivalidatesense() returns SENSEUNUSABLE.
If the buffer contains usable sense data in fixed format,
the function returns SENSEFIXEDFORMAT. If the buffer con-
tains usable sense data in descriptor format, the function
returns SENSEDESCRFORMAT.
The following flags may be set as appropriate depending on
the sense data:
SNSBUFOVERFLOW The sense data buffer provided for the
request is too small to hold all the
sense data.
SNSBUFDEFERED The sense data contained in the buffer
relates to an error that has occurred
during the processing of a successfully
completed command, such as a cached
SunOS 5.11 Last change: 29 Jun 2006 1
Kernel Functions for Drivers scsivalidatesense(9F)
write that could not be commited to the
media.
RETURN VALUES
SENSEUNUSABLE The response code from the sense data
is unrecognized or not enough sense
data present to provide the sense key,
asc, and ascq.
SENSEFIXEDFORMAT The sense data in the buffer is in
"fixed format".
SENSEDESCRFORMAT The sense data in the buffer is in
"descriptor format".
CONTEXT
The scsivalidatesense() function can be called from user
or interrupt context.
SEE ALSO
scsiextsensefields(9F), scsifindsensedescr(9F),
scsisenseasc(9F), scsisenseascq(9F),
scsisensecmdspecificuint64(9F),
scsisenseinfouint64(9F), scsisensekey(9F)
SunOS 5.11 Last change: 29 Jun 2006 2
|