1scsi_validate_sense(9F)  Kernel Functions for Drivers  scsi_validate_sense(9F)
2
3
4

NAME

6       scsi_validate_sense - find descriptor in SCSI sense data
7

SYNOPSIS

9       #include <sys/scsi/scsi.h>
10
11
12
13       int scsi_validate_sense(uint8_t *sense_buffer, int sense_buf_len,
14            int *flags);
15
16

INTERFACE LEVEL

18       Solaris DDI specific (Solaris DDI).
19

PARAMETERS

21       sense_buffer     Pointer  to  a  buffer containing SCSI sense data. The
22                        sense data is expected in wire format starting at  the
23                        response code.
24
25
26       sense_buf_len    Length of sense buffer in bytes.
27
28
29       flags            Returns additional properties of the sense data.
30
31

DESCRIPTION

33       The scsi_validate_sense() function returns the format of the sense data
34       contained in the provided sense buffer. If the response code  field  in
35       the  sense  data is not recognized or if there is not enough sense data
36       to include sense key, asc, and ascq then scsi_validate_sense()  returns
37       SENSE_UNUSABLE.  If the buffer contains usable sense data in fixed for‐
38       mat, the function returns SENSE_FIXED_FORMAT. If  the  buffer  contains
39       usable   sense   data   in  descriptor  format,  the  function  returns
40       SENSE_DESCR_FORMAT.
41
42
43       The following flags may be set as appropriate depending  on  the  sense
44       data:
45
46       SNS_BUF_OVERFLOW    The  sense  data buffer provided for the request is
47                           too small to hold all the sense data.
48
49
50       SNS_BUF_DEFERRED    The sense data contained in the buffer  relates  to
51                           an error that has occurred during the processing of
52                           a successfully completed command, such as a  cached
53                           write that could not be commited to the media.
54
55

RETURN VALUES

57       SENSE_UNUSABLE        The response code from the sense data is unrecog‐
58                             nized or not enough sense data present to provide
59                             the sense key, asc, and ascq.
60
61
62       SENSE_FIXED_FORMAT    The  sense  data  in the buffer is in "fixed for‐
63                             mat".
64
65
66       SENSE_DESCR_FORMAT    The sense data in the buffer  is  in  "descriptor
67                             format".
68
69

CONTEXT

71       The scsi_validate_sense() function can be called from user or interrupt
72       context.
73

SEE ALSO

75       scsi_ext_sense_fields(9F),                   scsi_find_sense_descr(9F),
76       scsi_sense_asc(9F),       scsi_sense_ascq(9F),       scsi_sense_cmdspe‐
77       cific_uint64(9F), scsi_sense_info_uint64(9F), scsi_sense_key(9F)
78
79
80
81SunOS 5.11                        29 Jun 2006          scsi_validate_sense(9F)
Impressum