isp_stds.h (197373) | isp_stds.h (238869) |
---|---|
1/* $FreeBSD: head/sys/dev/isp/isp_stds.h 197373 2009-09-21 01:41:19Z mjacob $ */ | 1/* $FreeBSD: head/sys/dev/isp/isp_stds.h 238869 2012-07-28 20:06:29Z mjacob $ */ |
2/*- 3 * Copyright (c) 1997-2009 by Matthew Jacob 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * --- 122 unchanged lines hidden (view full) --- 132typedef struct { 133 ct_hdr_t rftid_hdr; 134 uint8_t rftid_reserved; 135 uint8_t rftid_portid[3]; 136 uint32_t rftid_fc4types[8]; 137} rft_id_t; 138 139/* | 2/*- 3 * Copyright (c) 1997-2009 by Matthew Jacob 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * --- 122 unchanged lines hidden (view full) --- 132typedef struct { 133 ct_hdr_t rftid_hdr; 134 uint8_t rftid_reserved; 135 uint8_t rftid_portid[3]; 136 uint32_t rftid_fc4types[8]; 137} rft_id_t; 138 139/* |
140 * FCP Response IU Bits of interest 141 * Source: NCITS T10, Project 1144D, Revision 08 (aka FCP2r08) | 140 * FCP Response IU and bits of interest 141 * Source: NCITS T10, Project 1828D, Revision 02b (aka FCP4r02b) |
142 */ | 142 */ |
143typedef struct { 144 uint8_t fcp_rsp_reserved[8]; 145 uint16_t fcp_rsp_status_qualifier; /* SAM-5 Status Qualifier */ 146 uint8_t fcp_rsp_bits; 147 uint8_t fcp_rsp_scsi_status; /* SAM-5 SCSI Status Byte */ 148 uint32_t fcp_rsp_resid; 149 uint32_t fcp_rsp_snslen; 150 uint32_t fcp_rsp_rsplen; 151 /* 152 * In the bytes that follow, it's going to be 153 * FCP RESPONSE INFO (max 8 bytes, possibly 0) 154 * FCP SENSE INFO (if any) 155 * FCP BIDIRECTIONAL READ RESID (if any) 156 */ 157 uint8_t fcp_rsp_extra[0]; 158} fcp_rsp_iu_t; 159#define MIN_FCP_RESPONSE_SIZE 24 160 161#define FCP_BIDIR_RSP 0x80 /* Bi-Directional response */ 162#define FCP_BIDIR_RESID_UNDERFLOW 0x40 163#define FCP_BIDIR_RESID_OVERFLOW 0x20 |
|
143#define FCP_CONF_REQ 0x10 144#define FCP_RESID_UNDERFLOW 0x08 145#define FCP_RESID_OVERFLOW 0x04 146#define FCP_SNSLEN_VALID 0x02 147#define FCP_RSPLEN_VALID 0x01 148 149#define FCP_MAX_RSPLEN 0x08 150/* --- 6 unchanged lines hidden (view full) --- 157#define FCP_RSPNS_DLBRSTX 1 158#define FCP_RSPNS_BADCMND 2 159#define FCP_RSPNS_EROFS 3 160#define FCP_RSPNS_TMF_REJECT 4 161#define FCP_RSPNS_TMF_FAILED 5 162#define FCP_RSPNS_TMF_SUCCEEDED 8 163#define FCP_RSPNS_TMF_INCORRECT_LUN 9 164 | 164#define FCP_CONF_REQ 0x10 165#define FCP_RESID_UNDERFLOW 0x08 166#define FCP_RESID_OVERFLOW 0x04 167#define FCP_SNSLEN_VALID 0x02 168#define FCP_RSPLEN_VALID 0x01 169 170#define FCP_MAX_RSPLEN 0x08 171/* --- 6 unchanged lines hidden (view full) --- 178#define FCP_RSPNS_DLBRSTX 1 179#define FCP_RSPNS_BADCMND 2 180#define FCP_RSPNS_EROFS 3 181#define FCP_RSPNS_TMF_REJECT 4 182#define FCP_RSPNS_TMF_FAILED 5 183#define FCP_RSPNS_TMF_SUCCEEDED 8 184#define FCP_RSPNS_TMF_INCORRECT_LUN 9 185 |
186/* 187 * R_CTL field definitions 188 * 189 * Bits 31-28 are ROUTING 190 * Bits 27-24 are INFORMATION 191 * 192 * These are nibble values, not bits 193 */ 194#define R_CTL_ROUTE_DATA 0x00 195#define R_CTL_ROUTE_ELS 0x02 196#define R_CTL_ROUTE_FC4_LINK 0x03 197#define R_CTL_ROUTE_VDATA 0x04 198#define R_CTL_ROUTE_EXENDED 0x05 199#define R_CTL_ROUTE_BASIC 0x08 200#define R_CTL_ROUTE_LINK 0x0c 201#define R_CTL_ROUTE_EXT_ROUTING 0x0f |
|
165 | 202 |
203#define R_CTL_INFO_UNCATEGORIZED 0x00 204#define R_CTL_INFO_SOLICITED_DATA 0x01 205#define R_CTL_INFO_UNSOLICITED_CONTROL 0x02 206#define R_CTL_INFO_SOLICITED_CONTROL 0x03 207#define R_CTL_INFO_UNSOLICITED_DATA 0x04 208#define R_CTL_INFO_DATA_DESCRIPTOR 0x05 209#define R_CTL_INFO_UNSOLICITED_COMMAND 0x06 210#define R_CTL_INFO_COMMAND_STATUS 0x07 211 212#define MAKE_RCTL(a, b) (((a) << 4) | (b)) 213 |
|
166/* unconverted miscellany */ 167/* 168 * Basic FC Link Service defines 169 */ | 214/* unconverted miscellany */ 215/* 216 * Basic FC Link Service defines 217 */ |
170/* 171 * These are in the R_CTL field. 172 */ 173#define ABTS 0x81 174#define BA_ACC 0x84 /* of ABORT SEQUENCE */ 175#define BA_RJT 0x85 /* of ABORT SEQUENCE */ | 218/* #define ABTS MAKE_RCTL(R_CTL_ROUTE_BASIC, R_CTL_INFO_SOLICITED_DATA) */ 219#define BA_ACC MAKE_RCTL(R_CTL_ROUTE_BASIC, R_CTL_INFO_UNSOLICITED_DATA) /* of ABORT */ 220#define BA_RJT MAKE_RCTL(R_CTL_ROUTE_BASIC, R_CTL_INFO_DATA_DESCRIPTOR) /* of ABORT */ |
176 177/* 178 * Link Service Accept/Reject 179 */ 180#define LS_ACC 0x8002 181#define LS_RJT 0x8001 182 183/* --- 7 unchanged lines hidden (view full) --- 191#define PRLO 0x21 192#define SCN 0x22 193#define TPRLO 0x24 194#define PDISC 0x50 195#define ADISC 0x52 196#define RNC 0x53 197 198/* | 221 222/* 223 * Link Service Accept/Reject 224 */ 225#define LS_ACC 0x8002 226#define LS_RJT 0x8001 227 228/* --- 7 unchanged lines hidden (view full) --- 236#define PRLO 0x21 237#define SCN 0x22 238#define TPRLO 0x24 239#define PDISC 0x50 240#define ADISC 0x52 241#define RNC 0x53 242 243/* |
244 * PRLI Word 3 definitions 245 * FPC4-r02b January, 2011 246 */ 247#define PRLI_WD3_ENHANCED_DISCOVERY (1 << 11) 248#define PRLI_WD3_REC_SUPPORT (1 << 10) 249#define PRLI_WD3_TASK_RETRY_IDENTIFICATION_REQUESTED (1 << 9) 250#define PRLI_WD3_RETRY (1 << 8) 251#define PRLI_WD3_CONFIRMED_COMPLETION_ALLOWED (1 << 7) 252#define PRLI_WD3_DATA_OVERLAY_ALLOWED (1 << 6) 253#define PRLI_WD3_INITIATOR_FUNCTION (1 << 5) 254#define PRLI_WD3_TARGET_FUNCTION (1 << 4) 255#define PRLI_WD3_READ_FCP_XFER_RDY_DISABLED (1 << 1) /* definitely supposed to be set */ 256#define PRLI_WD3_WRITE_FCP_XFER_RDY_DISABLED (1 << 0) 257 258 259 260/* |
|
199 * FC4 defines 200 */ 201#define FC4_IP 5 /* ISO/EEC 8802-2 LLC/SNAP */ 202#define FC4_SCSI 8 /* SCSI-3 via Fibre Channel Protocol (FCP) */ 203#define FC4_FC_SVC 0x20 /* Fibre Channel Services */ 204 205#ifndef MSG_ABORT 206#define MSG_ABORT 0x06 --- 21 unchanged lines hidden --- | 261 * FC4 defines 262 */ 263#define FC4_IP 5 /* ISO/EEC 8802-2 LLC/SNAP */ 264#define FC4_SCSI 8 /* SCSI-3 via Fibre Channel Protocol (FCP) */ 265#define FC4_FC_SVC 0x20 /* Fibre Channel Services */ 266 267#ifndef MSG_ABORT 268#define MSG_ABORT 0x06 --- 21 unchanged lines hidden --- |