ctl_error.h (229997) | ctl_error.h (230334) |
---|---|
1/*- 2 * Copyright (c) 2003 Silicon Graphics International Corp. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 14 unchanged lines hidden (view full) --- 23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 26 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 27 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * POSSIBILITY OF SUCH DAMAGES. 29 * 30 * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl_error.h#1 $ | 1/*- 2 * Copyright (c) 2003 Silicon Graphics International Corp. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 14 unchanged lines hidden (view full) --- 23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 26 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 27 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * POSSIBILITY OF SUCH DAMAGES. 29 * 30 * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl_error.h#1 $ |
31 * $FreeBSD: head/sys/cam/ctl/ctl_error.h 229997 2012-01-12 00:34:33Z ken $ | 31 * $FreeBSD: head/sys/cam/ctl/ctl_error.h 230334 2012-01-19 18:42:03Z ken $ |
32 */ 33/* 34 * Function definitions for various error reporting routines used both 35 * within CTL and various CTL clients. 36 * 37 * Author: Ken Merry <ken@FreeBSD.org> 38 */ 39 40#include <machine/stdarg.h> 41 42#ifndef _CTL_ERROR_H_ 43#define _CTL_ERROR_H_ 44 | 32 */ 33/* 34 * Function definitions for various error reporting routines used both 35 * within CTL and various CTL clients. 36 * 37 * Author: Ken Merry <ken@FreeBSD.org> 38 */ 39 40#include <machine/stdarg.h> 41 42#ifndef _CTL_ERROR_H_ 43#define _CTL_ERROR_H_ 44 |
45typedef enum { 46 CTL_SENSE_NOT_SPECIFIED, 47 CTL_SENSE_FIXED, 48 CTL_SENSE_DESCRIPTOR 49} ctl_sense_format; 50 | |
51void ctl_set_sense_data_va(struct scsi_sense_data *sense_data, void *lun, 52 scsi_sense_data_type sense_format, int current_error, 53 int sense_key, int asc, int ascq, va_list ap); 54void ctl_set_sense_data(struct scsi_sense_data *sense_data, void *lun, 55 scsi_sense_data_type sense_format, int current_error, 56 int sense_key, int asc, int ascq, ...); 57void ctl_set_sense(struct ctl_scsiio *ctsio, int current_error, int sense_key, 58 int asc, int ascq, ...); 59void ctl_sense_to_desc(struct scsi_sense_data_fixed *sense_src, 60 struct scsi_sense_data_desc *sense_dest); 61void ctl_sense_to_fixed(struct scsi_sense_data_desc *sense_src, 62 struct scsi_sense_data_fixed *sense_dest); | 45void ctl_set_sense_data_va(struct scsi_sense_data *sense_data, void *lun, 46 scsi_sense_data_type sense_format, int current_error, 47 int sense_key, int asc, int ascq, va_list ap); 48void ctl_set_sense_data(struct scsi_sense_data *sense_data, void *lun, 49 scsi_sense_data_type sense_format, int current_error, 50 int sense_key, int asc, int ascq, ...); 51void ctl_set_sense(struct ctl_scsiio *ctsio, int current_error, int sense_key, 52 int asc, int ascq, ...); 53void ctl_sense_to_desc(struct scsi_sense_data_fixed *sense_src, 54 struct scsi_sense_data_desc *sense_dest); 55void ctl_sense_to_fixed(struct scsi_sense_data_desc *sense_src, 56 struct scsi_sense_data_fixed *sense_dest); |
63ctl_sense_format ctl_get_sense_format(struct scsi_sense_data *sense_data); | |
64void ctl_set_ua(struct ctl_scsiio *ctsio, int asc, int ascq); 65ctl_ua_type ctl_build_ua(ctl_ua_type ua_type, struct scsi_sense_data *sense, | 57void ctl_set_ua(struct ctl_scsiio *ctsio, int asc, int ascq); 58ctl_ua_type ctl_build_ua(ctl_ua_type ua_type, struct scsi_sense_data *sense, |
66 ctl_sense_format sense_format); | 59 scsi_sense_data_type sense_format); |
67void ctl_set_overlapped_cmd(struct ctl_scsiio *ctsio); 68void ctl_set_overlapped_tag(struct ctl_scsiio *ctsio, uint8_t tag); 69void ctl_set_invalid_field(struct ctl_scsiio *ctsio, int sks_valid, int command, 70 int field, int bit_valid, int bit); 71void ctl_set_invalid_opcode(struct ctl_scsiio *ctsio); 72void ctl_set_param_len_error(struct ctl_scsiio *ctsio); 73void ctl_set_already_locked(struct ctl_scsiio *ctsio); 74void ctl_set_unsupported_lun(struct ctl_scsiio *ctsio); --- 18 unchanged lines hidden --- | 60void ctl_set_overlapped_cmd(struct ctl_scsiio *ctsio); 61void ctl_set_overlapped_tag(struct ctl_scsiio *ctsio, uint8_t tag); 62void ctl_set_invalid_field(struct ctl_scsiio *ctsio, int sks_valid, int command, 63 int field, int bit_valid, int bit); 64void ctl_set_invalid_opcode(struct ctl_scsiio *ctsio); 65void ctl_set_param_len_error(struct ctl_scsiio *ctsio); 66void ctl_set_already_locked(struct ctl_scsiio *ctsio); 67void ctl_set_unsupported_lun(struct ctl_scsiio *ctsio); --- 18 unchanged lines hidden --- |