Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

scsi_find_sense_descr(9f) [opensolaris man page]

scsi_find_sense_descr(9F)				   Kernel Functions for Drivers 				 scsi_find_sense_descr(9F)

NAME
scsi_find_sense_descr - find descriptor in SCSI sense data SYNOPSIS
#include <sys/scsi/scsi.h> uint8_t *scsi_find_sense_descr(uint8_t *sense_buffer, int sense_buf_len, int req_descr_type); INTERFACE LEVEL
Solaris DDI specific (Solaris DDI). PARAMETERS
sense_buffer Pointer to a buffer containing SCSI descriptor sense data. The data is expected in wire format starting at the response code. sense_buf_len Integer that contains the length of sense buffer in bytes. req_descr_type Integer that contains the descriptor type value for the desired sense descriptor. DESCRIPTION
The scsi_find_sense_descr() function is used to obtain a pointer to a specific descriptor type, specified by req_descr_type, within a descriptor sense buffer. Before returning the pointer, scsi_find_sense_descr() verifies that the entire descriptor is present based on the length provided in sense_buf_len. Any value for req_descr_type can be requested. The following descriptor types are already defined: #define DESCR_INFORMATION 0x00 #define DESCR_COMMAND_SPECIFIC 0x01 #define DESCR_SENSE_KEY_SPECIFIC 0x02 #define DESCR_FRU 0x03 #define DESCR_STREAM_COMMANDS 0x04 #define DESCR_BLOCK_COMMANDS 0x05 #define DESCR_OSD_OID 0x06 #define DESCR_OSD_RESP_INTEGRITY 0x07 #define DESCR_OSD_ATTR_ID 0x08 Drivers should use scsi_validate_sense(9F) to ensure that the sense buffer contains valid descriptor sense data. RETURN VALUES
The scsi_find_sense_descr() function returns a pointer to a sense descriptor of the requested type if a descriptor of that type exists. If no such descriptor exists, scsi_find_sense_descr() returns NULL. CONTEXT
The scsi_find_sense_descr() function can be called from user or interrupt context. SEE ALSO
scsi_ext_sense_fields(9F), scsi_sense_asc(9F), scsi_sense_ascq(9F), scsi_sense_cmdspecific_uint64(9F), scsi_sense_info_uint64(9F), scsi_sense_key(9F), scsi_validate_sense(9F) SunOS 5.11 30 Jun 2006 scsi_find_sense_descr(9F)

Check Out this Related Man Page

scsi_arq_status(9S)					    Data Structures for Drivers 				       scsi_arq_status(9S)

NAME
scsi_arq_status - SCSI auto request sense structure SYNOPSIS
#include <sys/scsi/scsi.h> INTERFACE LEVEL
Solaris DDI specific (Solaris DDI) DESCRIPTION
When auto request sense has been enabled using scsi_ifsetcap(9F) and the "auto-rqsense" capability, the target driver must allocate a sta- tus area in the SCSI packet structure for the auto request sense structure (see scsi_pkt(9S)). In the event of a check condition, the transport layer automatically executes a request sense command. This check ensures that the request sense information does not get lost. The auto request sense structure supplies the SCSI status of the original command, the transport information pertaining to the request sense command, and the request sense data. STRUCTURE MEMBERS
struct scsi_status sts_status; /* SCSI status */ struct scsi_status sts_rqpkt_status; /* SCSI status of request sense cmd */ uchar_t sts_rqpkt_reason; /* reason completion */ uchar_t sts_rqpkt_resid; /* residue */ uint_t sts_rqpkt_state; /* state of command */ uint_t sts_rqpkt_statistics;/* statistics */ struct scsi_extended_sense sts_sensedata; /* actual sense data */ sts_status is the SCSI status of the original command. If the status indicates a check condition, the transport layer might have performed an auto request sense command. sts_rqpkt_status is the SCSI status of the request sense command. sts_rqpkt_reason is the completion reason of the request sense command. If the reason is not CMD_CMPLT, then the request sense command did not complete normally. sts_rqpkt_resid is the residual count of the data transfer and indicates the number of data bytes that have not been transferred. The auto request sense command requests SENSE_LENGTH bytes. sts_rqpkt_state has bit positions representing the five most important statuses that a SCSI command can go obtain. sts_rqpkt_statistics maintains transport-related statistics of the request sense command. sts_sensedata contains the actual sense data if the request sense command completed normally. SEE ALSO
scsi_ifgetcap(9F), scsi_init_pkt(9F), scsi_extended_sense(9S), scsi_pkt(9S) Writing Device Drivers SunOS 5.11 30 Sep 1996 scsi_arq_status(9S)
Man Page