brintos

brintos / linux-shallow public Read only

0
0
Text · 1.0 KiB · 0eafd3c Raw
40 lines · c
1/*2 * This file is in the public domain.3 */4#ifndef	_SCSI_SCSI_IU_H5#define _SCSI_SCSI_IU_H 16 7struct scsi_status_iu_header8{9	u_int8_t reserved[2];10	u_int8_t flags;11#define	SIU_SNSVALID 0x212#define	SIU_RSPVALID 0x113	u_int8_t status;14	u_int8_t sense_length[4];15	u_int8_t pkt_failures_length[4];16	u_int8_t pkt_failures[1];17};18 19#define SIU_PKTFAIL_OFFSET(siu) 1220#define SIU_PKTFAIL_CODE(siu) (scsi_4btoul((siu)->pkt_failures) & 0xFF)21#define		SIU_PFC_NONE			022#define		SIU_PFC_CIU_FIELDS_INVALID	223#define		SIU_PFC_TMF_NOT_SUPPORTED	424#define		SIU_PFC_TMF_FAILED		525#define		SIU_PFC_INVALID_TYPE_CODE	626#define		SIU_PFC_ILLEGAL_REQUEST		727#define SIU_SENSE_OFFSET(siu)				\28    (12 + (((siu)->flags & SIU_RSPVALID)		\29	? scsi_4btoul((siu)->pkt_failures_length)	\30	: 0))31 32#define	SIU_TASKMGMT_NONE		0x0033#define	SIU_TASKMGMT_ABORT_TASK		0x0134#define	SIU_TASKMGMT_ABORT_TASK_SET	0x0235#define	SIU_TASKMGMT_CLEAR_TASK_SET	0x0436#define	SIU_TASKMGMT_LUN_RESET		0x0837#define	SIU_TASKMGMT_TARGET_RESET	0x2038#define	SIU_TASKMGMT_CLEAR_ACA		0x4039#endif /*_SCSI_SCSI_IU_H*/40