scsi_da.h (268151) | scsi_da.h (273323) |
---|---|
1/* 2 * Structures and definitions for SCSI commands to Direct Access Devices 3 */ 4 5/*- 6 * Some lines of this file come from a file of the name "scsi.h" 7 * distributed by OSF as part of mach2.5, 8 * so the following disclaimer has been kept. --- 32 unchanged lines hidden (view full) --- 41 * organisations permission to use or modify this software. 42 * 43 * TFS supplies this software to be publicly redistributed 44 * on the understanding that TFS is not responsible for the correct 45 * functioning of this software in any circumstances. 46 * 47 * Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992 48 * | 1/* 2 * Structures and definitions for SCSI commands to Direct Access Devices 3 */ 4 5/*- 6 * Some lines of this file come from a file of the name "scsi.h" 7 * distributed by OSF as part of mach2.5, 8 * so the following disclaimer has been kept. --- 32 unchanged lines hidden (view full) --- 41 * organisations permission to use or modify this software. 42 * 43 * TFS supplies this software to be publicly redistributed 44 * on the understanding that TFS is not responsible for the correct 45 * functioning of this software in any circumstances. 46 * 47 * Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992 48 * |
49 * $FreeBSD: stable/10/sys/cam/scsi/scsi_da.h 268151 2014-07-02 10:45:31Z mav $ | 49 * $FreeBSD: stable/10/sys/cam/scsi/scsi_da.h 273323 2014-10-20 08:07:29Z mav $ |
50 */ 51 52#ifndef _SCSI_SCSI_DA_H 53#define _SCSI_SCSI_DA_H 1 54 55#include <sys/cdefs.h> 56 57struct scsi_rezero_unit --- 29 unchanged lines hidden (view full) --- 87 u_int8_t opcode; 88 u_int8_t byte2; 89 u_int8_t unused[3]; 90 u_int8_t control; 91}; 92 93struct scsi_read_defect_data_10 94{ | 50 */ 51 52#ifndef _SCSI_SCSI_DA_H 53#define _SCSI_SCSI_DA_H 1 54 55#include <sys/cdefs.h> 56 57struct scsi_rezero_unit --- 29 unchanged lines hidden (view full) --- 87 u_int8_t opcode; 88 u_int8_t byte2; 89 u_int8_t unused[3]; 90 u_int8_t control; 91}; 92 93struct scsi_read_defect_data_10 94{ |
95 u_int8_t opcode; 96 97 /* 98 * The most significant 3 bits are the LUN, the other 5 are 99 * reserved. 100 */ 101#define SRDD10_LUN_MASK 0xE0 102 u_int8_t byte2; | 95 uint8_t opcode; 96 uint8_t byte2; |
103#define SRDD10_GLIST 0x08 104#define SRDD10_PLIST 0x10 105#define SRDD10_DLIST_FORMAT_MASK 0x07 106#define SRDD10_BLOCK_FORMAT 0x00 107#define SRDD10_BYTES_FROM_INDEX_FORMAT 0x04 108#define SRDD10_PHYSICAL_SECTOR_FORMAT 0x05 | 97#define SRDD10_GLIST 0x08 98#define SRDD10_PLIST 0x10 99#define SRDD10_DLIST_FORMAT_MASK 0x07 100#define SRDD10_BLOCK_FORMAT 0x00 101#define SRDD10_BYTES_FROM_INDEX_FORMAT 0x04 102#define SRDD10_PHYSICAL_SECTOR_FORMAT 0x05 |
109 u_int8_t format; 110 111 u_int8_t reserved[4]; 112 113 u_int8_t alloc_length[2]; | 103 uint8_t format; 104 uint8_t reserved[4]; 105 uint8_t alloc_length[2]; |
114#define SRDD10_MAX_LENGTH 0xffff | 106#define SRDD10_MAX_LENGTH 0xffff |
115 116 u_int8_t control; | 107 uint8_t control; |
117}; 118 119struct scsi_sanitize 120{ 121 u_int8_t opcode; 122 u_int8_t byte2; 123#define SSZ_SERVICE_ACTION_OVERWRITE 0x01 124#define SSZ_SERVICE_ACTION_BLOCK_ERASE 0x02 --- 13 unchanged lines hidden (view full) --- 138 u_int8_t reserved; 139 u_int8_t length[2]; 140 /* Variable length initialization pattern. */ 141#define SSZPL_MAX_PATTERN_LENGTH 65535 142}; 143 144struct scsi_read_defect_data_12 145{ | 108}; 109 110struct scsi_sanitize 111{ 112 u_int8_t opcode; 113 u_int8_t byte2; 114#define SSZ_SERVICE_ACTION_OVERWRITE 0x01 115#define SSZ_SERVICE_ACTION_BLOCK_ERASE 0x02 --- 13 unchanged lines hidden (view full) --- 129 u_int8_t reserved; 130 u_int8_t length[2]; 131 /* Variable length initialization pattern. */ 132#define SSZPL_MAX_PATTERN_LENGTH 65535 133}; 134 135struct scsi_read_defect_data_12 136{ |
146 u_int8_t opcode; 147 148 /* 149 * The most significant 3 bits are the LUN, the other 5 are 150 * reserved. 151 */ 152#define SRDD12_LUN_MASK 0xE0 153 u_int8_t byte2; 154 | 137 uint8_t opcode; |
155#define SRDD12_GLIST 0x08 156#define SRDD12_PLIST 0x10 157#define SRDD12_DLIST_FORMAT_MASK 0x07 158#define SRDD12_BLOCK_FORMAT 0x00 159#define SRDD12_BYTES_FROM_INDEX_FORMAT 0x04 160#define SRDD12_PHYSICAL_SECTOR_FORMAT 0x05 | 138#define SRDD12_GLIST 0x08 139#define SRDD12_PLIST 0x10 140#define SRDD12_DLIST_FORMAT_MASK 0x07 141#define SRDD12_BLOCK_FORMAT 0x00 142#define SRDD12_BYTES_FROM_INDEX_FORMAT 0x04 143#define SRDD12_PHYSICAL_SECTOR_FORMAT 0x05 |
161 u_int8_t format; 162 163 u_int8_t reserved[4]; 164 165 u_int8_t alloc_length[4]; 166 167 u_int8_t control; 168 | 144 uint8_t format; 145 uint8_t address_descriptor_index[4]; 146 uint8_t alloc_length[4]; 147 uint8_t reserved; 148 uint8_t control; |
169}; 170 171 172/* 173 * Opcodes 174 */ 175#define REZERO_UNIT 0x01 176#define FORMAT_UNIT 0x04 --- 194 unchanged lines hidden (view full) --- 371 u_int8_t reserved; 372#define SRDDH12_GLIST 0x08 373#define SRDDH12_PLIST 0x10 374#define SRDDH12_DLIST_FORMAT_MASK 0x07 375#define SRDDH12_BLOCK_FORMAT 0x00 376#define SRDDH12_BYTES_FROM_INDEX_FORMAT 0x04 377#define SRDDH12_PHYSICAL_SECTOR_FORMAT 0x05 378 u_int8_t format; | 149}; 150 151 152/* 153 * Opcodes 154 */ 155#define REZERO_UNIT 0x01 156#define FORMAT_UNIT 0x04 --- 194 unchanged lines hidden (view full) --- 351 u_int8_t reserved; 352#define SRDDH12_GLIST 0x08 353#define SRDDH12_PLIST 0x10 354#define SRDDH12_DLIST_FORMAT_MASK 0x07 355#define SRDDH12_BLOCK_FORMAT 0x00 356#define SRDDH12_BYTES_FROM_INDEX_FORMAT 0x04 357#define SRDDH12_PHYSICAL_SECTOR_FORMAT 0x05 358 u_int8_t format; |
359 u_int8_t generation[2]; |
|
379 u_int8_t length[4]; 380}; 381 382union disk_pages /* this is the structure copied from osf */ 383{ 384 struct format_device_page { 385 u_int8_t pg_code; /* page code (should be 3) */ 386#define SMS_FORMAT_DEVICE_PAGE 0x03 /* only 6 bits valid */ --- 191 unchanged lines hidden --- | 360 u_int8_t length[4]; 361}; 362 363union disk_pages /* this is the structure copied from osf */ 364{ 365 struct format_device_page { 366 u_int8_t pg_code; /* page code (should be 3) */ 367#define SMS_FORMAT_DEVICE_PAGE 0x03 /* only 6 bits valid */ --- 191 unchanged lines hidden --- |