Deleted Added
full compact
ispmbox.h (237537) ispmbox.h (238869)
1/* $FreeBSD: head/sys/dev/isp/ispmbox.h 237537 2012-06-24 17:30:54Z mjacob $ */
1/* $FreeBSD: head/sys/dev/isp/ispmbox.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 *

--- 413 unchanged lines hidden (view full) ---

423#define ISP_RQDSEG_T2 3
424typedef struct {
425 isphdr_t req_header;
426 uint32_t req_handle;
427 uint8_t req_lun_trn;
428 uint8_t req_target;
429 uint16_t req_scclun;
430 uint16_t req_flags;
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 *

--- 413 unchanged lines hidden (view full) ---

423#define ISP_RQDSEG_T2 3
424typedef struct {
425 isphdr_t req_header;
426 uint32_t req_handle;
427 uint8_t req_lun_trn;
428 uint8_t req_target;
429 uint16_t req_scclun;
430 uint16_t req_flags;
431 uint16_t req_reserved;
431 uint8_t req_crn;
432 uint8_t req_reserved;
432 uint16_t req_time;
433 uint16_t req_seg_count;
434 uint8_t req_cdb[16];
435 uint32_t req_totalcnt;
436 ispds_t req_dataseg[ISP_RQDSEG_T2];
437} ispreqt2_t;
438
439typedef struct {

--- 13 unchanged lines hidden (view full) ---

453#define ISP_RQDSEG_T3 2
454typedef struct {
455 isphdr_t req_header;
456 uint32_t req_handle;
457 uint8_t req_lun_trn;
458 uint8_t req_target;
459 uint16_t req_scclun;
460 uint16_t req_flags;
433 uint16_t req_time;
434 uint16_t req_seg_count;
435 uint8_t req_cdb[16];
436 uint32_t req_totalcnt;
437 ispds_t req_dataseg[ISP_RQDSEG_T2];
438} ispreqt2_t;
439
440typedef struct {

--- 13 unchanged lines hidden (view full) ---

454#define ISP_RQDSEG_T3 2
455typedef struct {
456 isphdr_t req_header;
457 uint32_t req_handle;
458 uint8_t req_lun_trn;
459 uint8_t req_target;
460 uint16_t req_scclun;
461 uint16_t req_flags;
461 uint16_t req_reserved;
462 uint8_t req_crn;
463 uint8_t req_reserved;
462 uint16_t req_time;
463 uint16_t req_seg_count;
464 uint8_t req_cdb[16];
465 uint32_t req_totalcnt;
466 ispds64_t req_dataseg[ISP_RQDSEG_T3];
467} ispreqt3_t;
468#define ispreq64_t ispreqt3_t /* same as.... */
469
470typedef struct {
471 isphdr_t req_header;
472 uint32_t req_handle;
473 uint16_t req_target;
474 uint16_t req_scclun;
475 uint16_t req_flags;
464 uint16_t req_time;
465 uint16_t req_seg_count;
466 uint8_t req_cdb[16];
467 uint32_t req_totalcnt;
468 ispds64_t req_dataseg[ISP_RQDSEG_T3];
469} ispreqt3_t;
470#define ispreq64_t ispreqt3_t /* same as.... */
471
472typedef struct {
473 isphdr_t req_header;
474 uint32_t req_handle;
475 uint16_t req_target;
476 uint16_t req_scclun;
477 uint16_t req_flags;
476 uint16_t req_reserved;
478 uint8_t req_crn;
479 uint8_t req_reserved;
477 uint16_t req_time;
478 uint16_t req_seg_count;
479 uint8_t req_cdb[16];
480 uint32_t req_totalcnt;
481 ispds64_t req_dataseg[ISP_RQDSEG_T3];
482} ispreqt3e_t;
483
484/* req_flag values */

--- 25 unchanged lines hidden (view full) ---

510 uint16_t req_cdblen;
511 uint16_t req_flags;
512 uint16_t req_reserved;
513 uint16_t req_time;
514 uint16_t req_seg_count;
515 uint8_t req_cdb[44];
516} ispextreq_t;
517
480 uint16_t req_time;
481 uint16_t req_seg_count;
482 uint8_t req_cdb[16];
483 uint32_t req_totalcnt;
484 ispds64_t req_dataseg[ISP_RQDSEG_T3];
485} ispreqt3e_t;
486
487/* req_flag values */

--- 25 unchanged lines hidden (view full) ---

513 uint16_t req_cdblen;
514 uint16_t req_flags;
515 uint16_t req_reserved;
516 uint16_t req_time;
517 uint16_t req_seg_count;
518 uint8_t req_cdb[44];
519} ispextreq_t;
520
518/* 24XX only */
519typedef struct {
520 uint16_t fcd_length;
521 uint16_t fcd_a1500;
522 uint16_t fcd_a3116;
523 uint16_t fcd_a4732;
524 uint16_t fcd_a6348;
525} fcp_cmnd_ds_t;
526
521
522/*
523 * ISP24XX structures
524 */
527typedef struct {
528 isphdr_t req_header;
529 uint32_t req_handle;
530 uint16_t req_nphdl;
531 uint16_t req_time;
532 uint16_t req_seg_count;
525typedef struct {
526 isphdr_t req_header;
527 uint32_t req_handle;
528 uint16_t req_nphdl;
529 uint16_t req_time;
530 uint16_t req_seg_count;
533 uint16_t req_fc_rsp_dsd_length;
534 uint8_t req_lun[8];
535 uint16_t req_flags;
536 uint16_t req_fc_cmnd_dsd_length;
537 uint16_t req_fc_cmnd_dsd_a1500;
538 uint16_t req_fc_cmnd_dsd_a3116;
539 uint16_t req_fc_cmnd_dsd_a4732;
540 uint16_t req_fc_cmnd_dsd_a6348;
541 uint16_t req_fc_rsp_dsd_a1500;
542 uint16_t req_fc_rsp_dsd_a3116;
543 uint16_t req_fc_rsp_dsd_a4732;
544 uint16_t req_fc_rsp_dsd_a6348;
545 uint32_t req_totalcnt;
546 uint16_t req_tidlo;
547 uint8_t req_tidhi;
548 uint8_t req_vpidx;
549 ispds64_t req_dataseg;
550} ispreqt6_t;
551
552typedef struct {
553 isphdr_t req_header;
554 uint32_t req_handle;
555 uint16_t req_nphdl;
556 uint16_t req_time;
557 uint16_t req_seg_count;
558 uint16_t req_reserved;
559 uint8_t req_lun[8];
560 uint8_t req_alen_datadir;
561 uint8_t req_task_management;
562 uint8_t req_task_attribute;
563 uint8_t req_crn;
564 uint8_t req_cdb[16];
565 uint32_t req_dl;

--- 374 unchanged lines hidden (view full) ---

940#define ICBOPT_EXTENDED 0x8000
941#define ICBOPT_BOTH_WWNS 0x4000
942#define ICBOPT_FULL_LOGIN 0x2000
943#define ICBOPT_STOP_ON_QFULL 0x1000 /* 2200/2100 only */
944#define ICBOPT_PREVLOOP 0x0800
945#define ICBOPT_SRCHDOWN 0x0400
946#define ICBOPT_NOLIP 0x0200
947#define ICBOPT_PDBCHANGE_AE 0x0100
531 uint16_t req_reserved;
532 uint8_t req_lun[8];
533 uint8_t req_alen_datadir;
534 uint8_t req_task_management;
535 uint8_t req_task_attribute;
536 uint8_t req_crn;
537 uint8_t req_cdb[16];
538 uint32_t req_dl;

--- 374 unchanged lines hidden (view full) ---

913#define ICBOPT_EXTENDED 0x8000
914#define ICBOPT_BOTH_WWNS 0x4000
915#define ICBOPT_FULL_LOGIN 0x2000
916#define ICBOPT_STOP_ON_QFULL 0x1000 /* 2200/2100 only */
917#define ICBOPT_PREVLOOP 0x0800
918#define ICBOPT_SRCHDOWN 0x0400
919#define ICBOPT_NOLIP 0x0200
920#define ICBOPT_PDBCHANGE_AE 0x0100
948#define ICBOPT_INI_TGTTYPE 0x0080
921#define ICBOPT_TGT_TYPE 0x0080
949#define ICBOPT_INI_ADISC 0x0040
950#define ICBOPT_INI_DISABLE 0x0020
951#define ICBOPT_TGT_ENABLE 0x0010
952#define ICBOPT_FAST_POST 0x0008
953#define ICBOPT_FULL_DUPLEX 0x0004
954#define ICBOPT_FAIRNESS 0x0002
955#define ICBOPT_HARD_ADDRESS 0x0001
956

--- 82 unchanged lines hidden (view full) ---

1039#define ICB_MAX_FRMLEN 2112
1040#define ICB_DFLT_FRMLEN 1024
1041#define ICB_DFLT_ALLOC 256
1042#define ICB_DFLT_THROTTLE 16
1043#define ICB_DFLT_RDELAY 5
1044#define ICB_DFLT_RCOUNT 3
1045
1046#define ICB_LOGIN_TOV 30
922#define ICBOPT_INI_ADISC 0x0040
923#define ICBOPT_INI_DISABLE 0x0020
924#define ICBOPT_TGT_ENABLE 0x0010
925#define ICBOPT_FAST_POST 0x0008
926#define ICBOPT_FULL_DUPLEX 0x0004
927#define ICBOPT_FAIRNESS 0x0002
928#define ICBOPT_HARD_ADDRESS 0x0001
929

--- 82 unchanged lines hidden (view full) ---

1012#define ICB_MAX_FRMLEN 2112
1013#define ICB_DFLT_FRMLEN 1024
1014#define ICB_DFLT_ALLOC 256
1015#define ICB_DFLT_THROTTLE 16
1016#define ICB_DFLT_RDELAY 5
1017#define ICB_DFLT_RCOUNT 3
1018
1019#define ICB_LOGIN_TOV 30
1047#define ICB_LUN_ENABLE_TOV 180
1020#define ICB_LUN_ENABLE_TOV 15
1048
1049
1050/*
1051 * And somebody at QLogic had a great idea that you could just change
1052 * the structure *and* keep the version number the same as the other cards.
1053 */
1054typedef struct {
1055 uint16_t icb_version;

--- 211 unchanged lines hidden (view full) ---

1267#define PDB_STATE_PRLI_ACK 5
1268#define PDB_STATE_LOGGED_IN 6
1269#define PDB_STATE_PORT_UNAVAIL 7
1270#define PDB_STATE_PRLO 8
1271#define PDB_STATE_PRLO_ACK 9
1272#define PDB_STATE_PLOGO 10
1273#define PDB_STATE_PLOG_ACK 11
1274
1021
1022
1023/*
1024 * And somebody at QLogic had a great idea that you could just change
1025 * the structure *and* keep the version number the same as the other cards.
1026 */
1027typedef struct {
1028 uint16_t icb_version;

--- 211 unchanged lines hidden (view full) ---

1240#define PDB_STATE_PRLI_ACK 5
1241#define PDB_STATE_LOGGED_IN 6
1242#define PDB_STATE_PORT_UNAVAIL 7
1243#define PDB_STATE_PRLO 8
1244#define PDB_STATE_PRLO_ACK 9
1245#define PDB_STATE_PLOGO 10
1246#define PDB_STATE_PLOG_ACK 11
1247
1275#define SVC3_TGT_ROLE 0x10
1276#define SVC3_INI_ROLE 0x20
1277#define SVC3_ROLE_MASK 0x30
1278#define SVC3_ROLE_SHIFT 4
1248#define SVC3_ROLE_MASK 0x30
1249#define SVC3_ROLE_SHIFT 4
1279
1280#define BITS2WORD(x) ((x)[0] << 16 | (x)[3] << 8 | (x)[2])
1281#define BITS2WORD_24XX(x) ((x)[0] << 16 | (x)[1] << 8 | (x)[2])
1282
1283/*
1284 * Port Data Base Element- 24XX cards
1285 */
1286typedef struct {

--- 29 unchanged lines hidden (view full) ---

1316#define PDB2400_STATE_PRLO_PEND 0x09
1317#define PDB2400_STATE_LOGO_PEND 0x0B
1318
1319/*
1320 * Common elements from the above two structures that are actually useful to us.
1321 */
1322typedef struct {
1323 uint16_t handle;
1250
1251#define BITS2WORD(x) ((x)[0] << 16 | (x)[3] << 8 | (x)[2])
1252#define BITS2WORD_24XX(x) ((x)[0] << 16 | (x)[1] << 8 | (x)[2])
1253
1254/*
1255 * Port Data Base Element- 24XX cards
1256 */
1257typedef struct {

--- 29 unchanged lines hidden (view full) ---

1287#define PDB2400_STATE_PRLO_PEND 0x09
1288#define PDB2400_STATE_LOGO_PEND 0x0B
1289
1290/*
1291 * Common elements from the above two structures that are actually useful to us.
1292 */
1293typedef struct {
1294 uint16_t handle;
1324 uint16_t reserved;
1325 uint32_t s3_role : 8,
1295 uint16_t prli_word3;
1296 uint32_t : 8,
1326 portid : 24;
1327 uint8_t portname[8];
1328 uint8_t nodename[8];
1329} isp_pdb_t;
1330
1331/*
1332 * Port Database Changed Async Event information for 24XX cards
1333 */

--- 442 unchanged lines hidden (view full) ---

1776#define IN_IDE_RECEIVED 0x33 /* Initiator Detected Error msg received */
1777#define IN_RSRC_UNAVAIL 0x34 /* resource unavailable */
1778#define IN_MSG_RECEIVED 0x36 /* SCSI message received */
1779#define IN_ABORT_TASK 0x20 /* task named in RX_ID is being aborted (FC) */
1780#define IN_PORT_LOGOUT 0x29 /* port has logged out (FC) */
1781#define IN_PORT_CHANGED 0x2A /* port changed */
1782#define IN_GLOBAL_LOGO 0x2E /* all ports logged out */
1783#define IN_NO_NEXUS 0x3B /* Nexus not established */
1297 portid : 24;
1298 uint8_t portname[8];
1299 uint8_t nodename[8];
1300} isp_pdb_t;
1301
1302/*
1303 * Port Database Changed Async Event information for 24XX cards
1304 */

--- 442 unchanged lines hidden (view full) ---

1747#define IN_IDE_RECEIVED 0x33 /* Initiator Detected Error msg received */
1748#define IN_RSRC_UNAVAIL 0x34 /* resource unavailable */
1749#define IN_MSG_RECEIVED 0x36 /* SCSI message received */
1750#define IN_ABORT_TASK 0x20 /* task named in RX_ID is being aborted (FC) */
1751#define IN_PORT_LOGOUT 0x29 /* port has logged out (FC) */
1752#define IN_PORT_CHANGED 0x2A /* port changed */
1753#define IN_GLOBAL_LOGO 0x2E /* all ports logged out */
1754#define IN_NO_NEXUS 0x3B /* Nexus not established */
1755#define IN_SRR_RCVD 0x45 /* SRR received */
1784
1785/*
1786 * Values for the in_task_flags field- should only get one at a time!
1787 */
1788#define TASK_FLAGS_RESERVED_MASK (0xe700)
1789#define TASK_FLAGS_CLEAR_ACA (1<<14)
1790#define TASK_FLAGS_TARGET_RESET (1<<13)
1791#define TASK_FLAGS_LUN_RESET (1<<12)

--- 14 unchanged lines hidden (view full) ---

1806 uint8_t in_status_subcode;
1807 uint8_t in_reserved2;
1808 uint32_t in_rxid;
1809 uint16_t in_srr_reloff_lo;
1810 uint16_t in_srr_reloff_hi;
1811 uint16_t in_srr_iu;
1812 uint16_t in_srr_oxid;
1813 /*
1756
1757/*
1758 * Values for the in_task_flags field- should only get one at a time!
1759 */
1760#define TASK_FLAGS_RESERVED_MASK (0xe700)
1761#define TASK_FLAGS_CLEAR_ACA (1<<14)
1762#define TASK_FLAGS_TARGET_RESET (1<<13)
1763#define TASK_FLAGS_LUN_RESET (1<<12)

--- 14 unchanged lines hidden (view full) ---

1778 uint8_t in_status_subcode;
1779 uint8_t in_reserved2;
1780 uint32_t in_rxid;
1781 uint16_t in_srr_reloff_lo;
1782 uint16_t in_srr_reloff_hi;
1783 uint16_t in_srr_iu;
1784 uint16_t in_srr_oxid;
1785 /*
1814 * If bit 2 is set in in_flags, the following
1815 * two tags are valid. If the received ELS is
1786 * If bit 2 is set in in_flags, the N-Port and
1787 * handle tags are valid. If the received ELS is
1816 * a LOGO, then these tags contain the N Port ID
1817 * from the LOGO payload. If the received ELS
1818 * request is TPRLO, these tags contain the
1819 * Third Party Originator N Port ID.
1820 */
1821 uint16_t in_nport_id_hi;
1788 * a LOGO, then these tags contain the N Port ID
1789 * from the LOGO payload. If the received ELS
1790 * request is TPRLO, these tags contain the
1791 * Third Party Originator N Port ID.
1792 */
1793 uint16_t in_nport_id_hi;
1794#define in_prli_options in_nport_id_hi
1822 uint8_t in_nport_id_lo;
1823 uint8_t in_reserved3;
1795 uint8_t in_nport_id_lo;
1796 uint8_t in_reserved3;
1824 /*
1825 * If bit 2 is set in in_flags, the following
1826 * tag is valid. If the received ELS is a LOGO,
1827 * then this tag contains the n-port handle
1828 * from the LOGO payload. If the received ELS
1829 * request is TPRLO, this tag contain the
1830 * n-port handle for the Third Party Originator.
1831 */
1832 uint16_t in_np_handle;
1833 uint8_t in_reserved4[12];
1834 uint8_t in_reserved5;
1835 uint8_t in_vpidx;
1836 uint32_t in_reserved6;
1837 uint16_t in_portid_lo;
1838 uint8_t in_portid_hi;
1839 uint8_t in_reserved7;

--- 338 unchanged lines hidden (view full) ---

2178 uint8_t ct_reserved2;
2179 uint8_t ct_tgt; /* our target id */
2180 uint32_t ct_flags;
2181 uint8_t ct_status; /* isp status */
2182 uint8_t ct_scsi_status; /* scsi status */
2183 uint8_t ct_tag_val; /* tag value */
2184 uint8_t ct_tag_type; /* tag type */
2185 uint32_t ct_xfrlen; /* transfer length */
1797 uint16_t in_np_handle;
1798 uint8_t in_reserved4[12];
1799 uint8_t in_reserved5;
1800 uint8_t in_vpidx;
1801 uint32_t in_reserved6;
1802 uint16_t in_portid_lo;
1803 uint8_t in_portid_hi;
1804 uint8_t in_reserved7;

--- 338 unchanged lines hidden (view full) ---

2143 uint8_t ct_reserved2;
2144 uint8_t ct_tgt; /* our target id */
2145 uint32_t ct_flags;
2146 uint8_t ct_status; /* isp status */
2147 uint8_t ct_scsi_status; /* scsi status */
2148 uint8_t ct_tag_val; /* tag value */
2149 uint8_t ct_tag_type; /* tag type */
2150 uint32_t ct_xfrlen; /* transfer length */
2186 int32_t ct_resid; /* residual length */
2151 uint32_t ct_resid; /* residual length */
2187 uint16_t ct_timeout;
2188 uint16_t ct_seg_count;
2189 ispds_t ct_dataseg[ISP_RQDSEG];
2190} ct_entry_t;
2191
2192/*
2193 * For some of the dual port SCSI adapters, port (bus #) is reported
2194 * in the MSbit of ct_iid. Bit fields are a bit too awkward here.

--- 6 unchanged lines hidden (view full) ---

2201#define GET_BUS_VAL(x) ((x >> 7) & 0x1)
2202#define SET_IID_VAL(y, x) y = ((y & ~0x3f) | (x & 0x3f))
2203#define SET_BUS_VAL(y, x) y = ((y & 0x3f) | ((x & 0x1) << 7))
2204
2205/*
2206 * ct_flags values
2207 */
2208#define CT_TQAE 0x00000002 /* bit 1, Tagged Queue Action enable */
2152 uint16_t ct_timeout;
2153 uint16_t ct_seg_count;
2154 ispds_t ct_dataseg[ISP_RQDSEG];
2155} ct_entry_t;
2156
2157/*
2158 * For some of the dual port SCSI adapters, port (bus #) is reported
2159 * in the MSbit of ct_iid. Bit fields are a bit too awkward here.

--- 6 unchanged lines hidden (view full) ---

2166#define GET_BUS_VAL(x) ((x >> 7) & 0x1)
2167#define SET_IID_VAL(y, x) y = ((y & ~0x3f) | (x & 0x3f))
2168#define SET_BUS_VAL(y, x) y = ((y & 0x3f) | ((x & 0x1) << 7))
2169
2170/*
2171 * ct_flags values
2172 */
2173#define CT_TQAE 0x00000002 /* bit 1, Tagged Queue Action enable */
2209#define CT_DATA_IN 0x00000040 /* bits 6&7, Data direction */
2210#define CT_DATA_OUT 0x00000080 /* bits 6&7, Data direction */
2174#define CT_DATA_IN 0x00000040 /* bits 6&7, Data direction - *to* initiator */
2175#define CT_DATA_OUT 0x00000080 /* bits 6&7, Data direction - *from* initiator */
2211#define CT_NO_DATA 0x000000C0 /* bits 6&7, Data direction */
2212#define CT_CCINCR 0x00000100 /* bit 8, autoincrement atio count */
2213#define CT_DATAMASK 0x000000C0 /* bits 6&7, Data direction */
2214#define CT_INISYNCWIDE 0x00004000 /* bit 14, Do Sync/Wide Negotiation */
2215#define CT_NODISC 0x00008000 /* bit 15, Disconnects disabled */
2216#define CT_DSDP 0x01000000 /* bit 24, Disable Save Data Pointers */
2217#define CT_SENDRDP 0x04000000 /* bit 26, Send Restore Pointers msg */
2218#define CT_SENDSTATUS 0x80000000 /* bit 31, Send SCSI status byte */

--- 54 unchanged lines hidden (view full) ---

2273 uint8_t ct_lun; /* lun */
2274 uint8_t ct_iid; /* initiator id */
2275 uint16_t ct_rxid; /* response ID */
2276 uint16_t ct_flags;
2277 uint16_t ct_status; /* isp status */
2278 uint16_t ct_timeout;
2279 uint16_t ct_seg_count;
2280 uint32_t ct_reloff; /* relative offset */
2176#define CT_NO_DATA 0x000000C0 /* bits 6&7, Data direction */
2177#define CT_CCINCR 0x00000100 /* bit 8, autoincrement atio count */
2178#define CT_DATAMASK 0x000000C0 /* bits 6&7, Data direction */
2179#define CT_INISYNCWIDE 0x00004000 /* bit 14, Do Sync/Wide Negotiation */
2180#define CT_NODISC 0x00008000 /* bit 15, Disconnects disabled */
2181#define CT_DSDP 0x01000000 /* bit 24, Disable Save Data Pointers */
2182#define CT_SENDRDP 0x04000000 /* bit 26, Send Restore Pointers msg */
2183#define CT_SENDSTATUS 0x80000000 /* bit 31, Send SCSI status byte */

--- 54 unchanged lines hidden (view full) ---

2238 uint8_t ct_lun; /* lun */
2239 uint8_t ct_iid; /* initiator id */
2240 uint16_t ct_rxid; /* response ID */
2241 uint16_t ct_flags;
2242 uint16_t ct_status; /* isp status */
2243 uint16_t ct_timeout;
2244 uint16_t ct_seg_count;
2245 uint32_t ct_reloff; /* relative offset */
2281 int32_t ct_resid; /* residual length */
2246 uint32_t ct_resid; /* residual length */
2282 union {
2283 /*
2284 * The three different modes that the target driver
2285 * can set the CTIO{2,3,4} up as.
2286 *
2287 * The first is for sending FCP_DATA_IUs as well as
2288 * (optionally) sending a terminal SCSI status FCP_RSP_IU.
2289 *

--- 22 unchanged lines hidden (view full) ---

2312 uint16_t ct_resplen;
2313 uint8_t ct_resp[MAXRESPLEN];
2314 } m1;
2315 struct {
2316 uint32_t _reserved;
2317 uint16_t _reserved2;
2318 uint16_t _reserved3;
2319 uint32_t ct_datalen;
2247 union {
2248 /*
2249 * The three different modes that the target driver
2250 * can set the CTIO{2,3,4} up as.
2251 *
2252 * The first is for sending FCP_DATA_IUs as well as
2253 * (optionally) sending a terminal SCSI status FCP_RSP_IU.
2254 *

--- 22 unchanged lines hidden (view full) ---

2277 uint16_t ct_resplen;
2278 uint8_t ct_resp[MAXRESPLEN];
2279 } m1;
2280 struct {
2281 uint32_t _reserved;
2282 uint16_t _reserved2;
2283 uint16_t _reserved3;
2284 uint32_t ct_datalen;
2320 ispds_t ct_fcp_rsp_iudata;
2285 union {
2286 ispds_t ct_fcp_rsp_iudata_32;
2287 ispds64_t ct_fcp_rsp_iudata_64;
2288 } u;
2321 } m2;
2322 } rsp;
2323} ct2_entry_t;
2324
2325typedef struct {
2326 isphdr_t ct_header;
2327 uint32_t ct_syshandle;
2328 uint16_t ct_iid; /* initiator id */
2329 uint16_t ct_rxid; /* response ID */
2330 uint16_t ct_flags;
2331 uint16_t ct_status; /* isp status */
2332 uint16_t ct_timeout;
2333 uint16_t ct_seg_count;
2334 uint32_t ct_reloff; /* relative offset */
2289 } m2;
2290 } rsp;
2291} ct2_entry_t;
2292
2293typedef struct {
2294 isphdr_t ct_header;
2295 uint32_t ct_syshandle;
2296 uint16_t ct_iid; /* initiator id */
2297 uint16_t ct_rxid; /* response ID */
2298 uint16_t ct_flags;
2299 uint16_t ct_status; /* isp status */
2300 uint16_t ct_timeout;
2301 uint16_t ct_seg_count;
2302 uint32_t ct_reloff; /* relative offset */
2335 int32_t ct_resid; /* residual length */
2303 uint32_t ct_resid; /* residual length */
2336 union {
2337 struct {
2338 uint32_t _reserved;
2339 uint16_t _reserved2;
2340 uint16_t ct_scsi_status;
2341 uint32_t ct_xfrlen;
2342 union {
2343 ispds_t ct_dataseg[ISP_RQDSEG_T2];

--- 9 unchanged lines hidden (view full) ---

2353 uint16_t ct_resplen;
2354 uint8_t ct_resp[MAXRESPLEN];
2355 } m1;
2356 struct {
2357 uint32_t _reserved;
2358 uint16_t _reserved2;
2359 uint16_t _reserved3;
2360 uint32_t ct_datalen;
2304 union {
2305 struct {
2306 uint32_t _reserved;
2307 uint16_t _reserved2;
2308 uint16_t ct_scsi_status;
2309 uint32_t ct_xfrlen;
2310 union {
2311 ispds_t ct_dataseg[ISP_RQDSEG_T2];

--- 9 unchanged lines hidden (view full) ---

2321 uint16_t ct_resplen;
2322 uint8_t ct_resp[MAXRESPLEN];
2323 } m1;
2324 struct {
2325 uint32_t _reserved;
2326 uint16_t _reserved2;
2327 uint16_t _reserved3;
2328 uint32_t ct_datalen;
2361 ispds_t ct_fcp_rsp_iudata;
2329 union {
2330 ispds_t ct_fcp_rsp_iudata_32;
2331 ispds64_t ct_fcp_rsp_iudata_64;
2332 } u;
2362 } m2;
2363 } rsp;
2364} ct2e_entry_t;
2365
2366/*
2367 * ct_flags values for CTIO2
2368 */
2369#define CT2_FLAG_MODE0 0x0000
2370#define CT2_FLAG_MODE1 0x0001
2371#define CT2_FLAG_MODE2 0x0002
2372#define CT2_FLAG_MMASK 0x0003
2333 } m2;
2334 } rsp;
2335} ct2e_entry_t;
2336
2337/*
2338 * ct_flags values for CTIO2
2339 */
2340#define CT2_FLAG_MODE0 0x0000
2341#define CT2_FLAG_MODE1 0x0001
2342#define CT2_FLAG_MODE2 0x0002
2343#define CT2_FLAG_MMASK 0x0003
2373#define CT2_DATA_IN 0x0040
2374#define CT2_DATA_OUT 0x0080
2344#define CT2_DATA_IN 0x0040 /* *to* initiator */
2345#define CT2_DATA_OUT 0x0080 /* *from* initiator */
2375#define CT2_NO_DATA 0x00C0
2376#define CT2_DATAMASK 0x00C0
2377#define CT2_CCINCR 0x0100
2378#define CT2_FASTPOST 0x0200
2379#define CT2_CONFIRM 0x2000
2380#define CT2_TERMINATE 0x4000
2381#define CT2_SENDSTATUS 0x8000
2382

--- 24 unchanged lines hidden (view full) ---

2407 uint8_t ct_vpidx;
2408 uint8_t ct_xflags;
2409 uint16_t ct_iid_lo; /* low 16 bits of portid */
2410 uint8_t ct_iid_hi; /* hi 8 bits of portid */
2411 uint8_t ct_reserved;
2412 uint32_t ct_rxid;
2413 uint16_t ct_senselen; /* mode 1 only */
2414 uint16_t ct_flags;
2346#define CT2_NO_DATA 0x00C0
2347#define CT2_DATAMASK 0x00C0
2348#define CT2_CCINCR 0x0100
2349#define CT2_FASTPOST 0x0200
2350#define CT2_CONFIRM 0x2000
2351#define CT2_TERMINATE 0x4000
2352#define CT2_SENDSTATUS 0x8000
2353

--- 24 unchanged lines hidden (view full) ---

2378 uint8_t ct_vpidx;
2379 uint8_t ct_xflags;
2380 uint16_t ct_iid_lo; /* low 16 bits of portid */
2381 uint8_t ct_iid_hi; /* hi 8 bits of portid */
2382 uint8_t ct_reserved;
2383 uint32_t ct_rxid;
2384 uint16_t ct_senselen; /* mode 1 only */
2385 uint16_t ct_flags;
2415 int32_t ct_resid; /* residual length */
2386 uint32_t ct_resid; /* residual length */
2416 uint16_t ct_oxid;
2417 uint16_t ct_scsi_status; /* modes 0 && 1 only */
2418 union {
2419 struct {
2420 uint32_t reloff;
2421 uint32_t reserved0;
2422 uint32_t ct_xfrlen;
2423 uint32_t reserved1;
2424 ispds64_t ds;
2425 } m0;
2426 struct {
2427 uint16_t ct_resplen;
2428 uint16_t reserved;
2429 uint8_t ct_resp[MAXRESPLEN_24XX];
2430 } m1;
2431 struct {
2432 uint32_t reserved0;
2387 uint16_t ct_oxid;
2388 uint16_t ct_scsi_status; /* modes 0 && 1 only */
2389 union {
2390 struct {
2391 uint32_t reloff;
2392 uint32_t reserved0;
2393 uint32_t ct_xfrlen;
2394 uint32_t reserved1;
2395 ispds64_t ds;
2396 } m0;
2397 struct {
2398 uint16_t ct_resplen;
2399 uint16_t reserved;
2400 uint8_t ct_resp[MAXRESPLEN_24XX];
2401 } m1;
2402 struct {
2403 uint32_t reserved0;
2433 uint32_t ct_datalen;
2434 uint32_t reserved1;
2404 uint32_t reserved1;
2405 uint32_t ct_datalen;
2406 uint32_t reserved2;
2435 ispds64_t ct_fcp_rsp_iudata;
2436 } m2;
2437 } rsp;
2438} ct7_entry_t;
2439
2440/*
2441 * ct_flags values for CTIO7
2442 */
2407 ispds64_t ct_fcp_rsp_iudata;
2408 } m2;
2409 } rsp;
2410} ct7_entry_t;
2411
2412/*
2413 * ct_flags values for CTIO7
2414 */
2443#define CT7_DATA_IN 0x0002
2444#define CT7_DATA_OUT 0x0001
2445#define CT7_NO_DATA 0x0000
2415#define CT7_NO_DATA 0x0000
2446#define CT7_DATAMASK 0x003
2416#define CT7_DATA_OUT 0x0001 /* *from* initiator */
2417#define CT7_DATA_IN 0x0002 /* *to* initiator */
2418#define CT7_DATAMASK 0x3
2447#define CT7_DSD_ENABLE 0x0004
2448#define CT7_CONF_STSFD 0x0010
2449#define CT7_EXPLCT_CONF 0x0020
2450#define CT7_FLAG_MODE0 0x0000
2451#define CT7_FLAG_MODE1 0x0040
2452#define CT7_FLAG_MODE2 0x0080
2453#define CT7_FLAG_MMASK 0x00C0
2419#define CT7_DSD_ENABLE 0x0004
2420#define CT7_CONF_STSFD 0x0010
2421#define CT7_EXPLCT_CONF 0x0020
2422#define CT7_FLAG_MODE0 0x0000
2423#define CT7_FLAG_MODE1 0x0040
2424#define CT7_FLAG_MODE2 0x0080
2425#define CT7_FLAG_MMASK 0x00C0
2454#define CT7_NOACK 0x0100
2426#define CT7_NOACK 0x0100
2455#define CT7_TASK_ATTR_SHIFT 9
2427#define CT7_TASK_ATTR_SHIFT 9
2456#define CT7_CONFIRM 0x2000
2428#define CT7_CONFIRM 0x2000
2457#define CT7_TERMINATE 0x4000
2458#define CT7_SENDSTATUS 0x8000
2459
2460/*
2461 * Type 7 CTIO status codes
2462 */
2463#define CT7_OK 0x01 /* completed without error */
2464#define CT7_ABORTED 0x02 /* aborted by host */

--- 126 unchanged lines hidden ---
2429#define CT7_TERMINATE 0x4000
2430#define CT7_SENDSTATUS 0x8000
2431
2432/*
2433 * Type 7 CTIO status codes
2434 */
2435#define CT7_OK 0x01 /* completed without error */
2436#define CT7_ABORTED 0x02 /* aborted by host */

--- 126 unchanged lines hidden ---