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

NAME

6       scsi_sense_key,  scsi_sense_asc, scsi_sense_ascq - retrieve fields from
7       SCSI sense data
8

SYNOPSIS

10       #include <sys/scsi/scsi.h>
11
12
13
14       uint8_t scsi_sense_key(uint8_t *sense_buffer);
15
16
17       uint8_t scsi_sense_asc(uint8_t *sense_buffer);
18
19
20       uint8_t scsi_sense_ascq(uint8_t *sense_buffer);
21
22

INTERFACE LEVEL

24       Solaris DDI specific (Solaris DDI).
25

PARAMETERS

27       sense_buffer    Pointer to a buffer containing  SCSI  sense  data.  The
28                       sense  data  is expected in wire format starting at the
29                       response code. It can be in either fixed or  descriptor
30                       format.
31
32

DESCRIPTION

34       The  scsi_sense_key()  function  returns  the  sense key value from the
35       sense data contained in the sense_buffer.
36
37
38       The scsi_sense_asc() function returns the additional sense  code  (ASC)
39       value from the sense data contained in the sense_buffer.
40
41
42       The scsi_sense_ascq() function returns the additional sense code quali‐
43       fier (ASCQ) value from the sense data contained in the sense_buffer.
44
45
46       The scsi_sense_key(), scsi_sense_asc(), and scsi_sense_ascq() functions
47       are  used to retrieve values from SCSI sense data, regardles of whether
48       the sense data is in fixed format or descriptor format.
49
50
51       Drivers should use scsi_validate_sense(9F) to ensure that  valid  sense
52       key, asc, and ascq values are present in the sense data.
53

RETURN VALUES

55       The  scsi_sense_key()  function  returns  the  sense key value from the
56       sense buffer. The  scsi_sense_asc()  function  returns  the  additional
57       sense  code (ASC) from the sense buffer and the scsi_sense_ascq() func‐
58       tion returns the additional sense code qualifier (ASCQ) from the  sense
59       buffer.
60

CONTEXT

62       The scsi_sense_key(), scsi_sense_asc(), and scsi_sense_ascq() functions
63       can be called from user or interrupt context.
64

SEE ALSO

66       scsi_ext_sense_fields(9F),  scsi_find_sense_descr(9F),  scsi_sense_cmd‐
67       specific_uint64(9F),       scsi_sense_info_uint64(9F),       scsi_vali‐
68       date_sense(9F)
69
70
71
72SunOS 5.11                        28 Jun 2006               scsi_sense_key(9F)
Impressum