1 /*******************************************************************************
2 *Copyright (c) 2014 PMC-Sierra, Inc. All rights reserved.
4 *Redistribution and use in source and binary forms, with or without modification, are permitted provided
5 *that the following conditions are met:
6 *1. Redistributions of source code must retain the above copyright notice, this list of conditions and the
8 *2. Redistributions in binary form must reproduce the above copyright notice,
9 *this list of conditions and the following disclaimer in the documentation and/or other materials provided
10 *with the distribution.
12 *THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED
13 *WARRANTIES,INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
14 *FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
15 *FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16 *NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
17 *BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
18 *LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
19 *SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
21 ********************************************************************************/
22 /*******************************************************************************/
25 * $RCSfile: ttdtxchg.h,v $
27 * Copyright 2006 PMC-Sierra, Inc.
30 * #define and data structures for SAS target in SAS/SATA TD layer
34 typedef struct sas_resp_s
36 agsaSSPResponseInfoUnit_t agResp;
41 typedef struct smp_resp_s
43 bit8 RespData[1024]; /* SAS Spec */
53 } ttdsaDmaMemoryArea_t;
55 struct tdsaDeviceData_s;
58 typedef struct ttdsaXchg_s
61 tdIORequestBody_t IORequestBody; /* has to be at the top */
62 tdssSMPRequestBody_t SMPRequestBody; /* has to be at the second top */
65 /* pointer to device(initiator) for which the I/O was initiated */
66 struct tdsaDeviceData_s *DeviceData;
67 struct ttdsaXchg_s *pTMResp;
70 bit32 oslayerAborting;
72 bit32 index; /* index of structure */
73 agsaSSPCmdInfoUnit_t agSSPCmndIU;
74 agsaSSPScsiTaskMgntReq_t agTMIU;
75 /* SSPTargetRead/SSPTargetWrite */
77 bit32 FrameType; /* cmnd or TM */
80 /* indicates that at the completion of this data phase, this
81 exchange structure will be freed */
84 bit32 readRspCollapsed : 1;
85 bit32 wrtRspCollapsed : 1;
86 bit32 readWrtCollapsedRes : 30;
87 tiTargetScsiCmnd_t tiTgtScsiCmnd;
89 /* initiator tag a target received */
94 ttdsaDmaMemoryArea_t resp; /* sas response */
95 ttdsaDmaMemoryArea_t smpresp; /* sas smp response */
97 /* for abort task io which is not founded in TD */
99 /* for debugging only */
104 bit32 TLR; /* Transport Layer Retransmit bits */
105 bit32 retries; /* retries */
106 tiIORequest_t *tiIOToBeAbortedRequest; /* IO to be aborted */
107 struct ttdsaXchg_s *XchgToBeAborted; /* Xchg to be aborted */
110 /*************************************************************************
111 ** now ttdssIOData_t and old tgtXchgData_t -
112 **************************************************************************/
114 typedef struct ttdsaXchgData_s
117 tdList_t xchgFreeList;
118 tdList_t xchgBusyList;