isp_stds.h (167403) | isp_stds.h (196008) |
---|---|
1/* $FreeBSD: head/sys/dev/isp/isp_stds.h 167403 2007-03-10 02:39:54Z mjacob $ */ | 1/* $FreeBSD: head/sys/dev/isp/isp_stds.h 196008 2009-08-01 01:04:26Z mjacob $ */ |
2/*- | 2/*- |
3 * Copyright (c) 1997-2007 by Matthew Jacob | 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 * 10 * 1. Redistributions of source code must retain the above copyright 11 * notice, this list of conditions and the following disclaimer. --- 7 unchanged lines hidden (view full) --- 19 * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE 20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. | 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 * 10 * 1. Redistributions of source code must retain the above copyright 11 * notice, this list of conditions and the following disclaimer. --- 7 unchanged lines hidden (view full) --- 19 * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE 20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. |
27 * |
|
27 */ 28/* 29 * Structures that derive directly from public standards. 30 */ 31#ifndef _ISP_STDS_H 32#define _ISP_STDS_H 33 34/* 35 * FC Frame Header 36 * 37 * Source: dpANS-X3.xxx-199x, section 18 (AKA FC-PH-2) 38 * 39 */ 40typedef struct { 41 uint8_t r_ctl; 42 uint8_t d_id[3]; 43 uint8_t cs_ctl; 44 uint8_t s_id[3]; 45 uint8_t type; | 28 */ 29/* 30 * Structures that derive directly from public standards. 31 */ 32#ifndef _ISP_STDS_H 33#define _ISP_STDS_H 34 35/* 36 * FC Frame Header 37 * 38 * Source: dpANS-X3.xxx-199x, section 18 (AKA FC-PH-2) 39 * 40 */ 41typedef struct { 42 uint8_t r_ctl; 43 uint8_t d_id[3]; 44 uint8_t cs_ctl; 45 uint8_t s_id[3]; 46 uint8_t type; |
46 uint8_t f_ctl; | 47 uint8_t f_ctl[3]; |
47 uint8_t seq_id; 48 uint8_t df_ctl; 49 uint16_t seq_cnt; 50 uint16_t ox_id; 51 uint16_t rx_id; 52 uint32_t parameter; 53} fc_hdr_t; 54 --- 77 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/* | 48 uint8_t seq_id; 49 uint8_t df_ctl; 50 uint16_t seq_cnt; 51 uint16_t ox_id; 52 uint16_t rx_id; 53 uint32_t parameter; 54} fc_hdr_t; 55 --- 77 unchanged lines hidden (view full) --- 133typedef struct { 134 ct_hdr_t rftid_hdr; 135 uint8_t rftid_reserved; 136 uint8_t rftid_portid[3]; 137 uint32_t rftid_fc4types[8]; 138} rft_id_t; 139 140/* |
141 * FCP Response IU Bits of interest 142 * Source: NCITS T10, Project 1144D, Revision 08 (aka FCP2r08) 143 */ 144#define FCP_CONF_REQ 0x10 145#define FCP_RESID_UNDERFLOW 0x08 146#define FCP_RESID_OVERFLOW 0x04 147#define FCP_SNSLEN_VALID 0x02 148#define FCP_RSPLEN_VALID 0x01 149 150/* |
|
140 * FCP Response Code Definitions | 151 * FCP Response Code Definitions |
141 * Source: NCITS T10, Project 1144D, Revision 07a (aka FCP2r07a) | 152 * Source: NCITS T10, Project 1144D, Revision 08 (aka FCP2r08) |
142 */ 143#define FCP_RSPNS_CODE_OFFSET 3 144 145#define FCP_RSPNS_TMF_DONE 0 146#define FCP_RSPNS_DLBRSTX 1 147#define FCP_RSPNS_BADCMND 2 148#define FCP_RSPNS_EROFS 3 149#define FCP_RSPNS_TMF_REJECT 4 --- 21 unchanged lines hidden (view full) --- 171 * FC ELS Codes- bits 31-24 of the first payload word of an ELS frame. 172 */ 173#define PLOGI 0x03 174#define FLOGI 0x04 175#define LOGO 0x05 176#define ABTX 0x06 177#define PRLI 0x20 178#define PRLO 0x21 | 153 */ 154#define FCP_RSPNS_CODE_OFFSET 3 155 156#define FCP_RSPNS_TMF_DONE 0 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 --- 21 unchanged lines hidden (view full) --- 182 * FC ELS Codes- bits 31-24 of the first payload word of an ELS frame. 183 */ 184#define PLOGI 0x03 185#define FLOGI 0x04 186#define LOGO 0x05 187#define ABTX 0x06 188#define PRLI 0x20 189#define PRLO 0x21 |
190#define SCN 0x22 |
|
179#define TPRLO 0x24 | 191#define TPRLO 0x24 |
192#define PDISC 0x50 193#define ADISC 0x52 |
|
180#define RNC 0x53 181 182/* 183 * FC4 defines 184 */ 185#define FC4_IP 5 /* ISO/EEC 8802-2 LLC/SNAP */ 186#define FC4_SCSI 8 /* SCSI-3 via Fibre Channel Protocol (FCP) */ 187#define FC4_FC_SVC 0x20 /* Fibre Channel Services */ --- 24 unchanged lines hidden --- | 194#define RNC 0x53 195 196/* 197 * FC4 defines 198 */ 199#define FC4_IP 5 /* ISO/EEC 8802-2 LLC/SNAP */ 200#define FC4_SCSI 8 /* SCSI-3 via Fibre Channel Protocol (FCP) */ 201#define FC4_FC_SVC 0x20 /* Fibre Channel Services */ --- 24 unchanged lines hidden --- |