tddmapi.h revision 285242
190792Sgshapiro/******************************************************************************* 290792Sgshapiro*Copyright (c) 2014 PMC-Sierra, Inc. All rights reserved. 390792Sgshapiro* 490792Sgshapiro*Redistribution and use in source and binary forms, with or without modification, are permitted provided 590792Sgshapiro*that the following conditions are met: 690792Sgshapiro*1. Redistributions of source code must retain the above copyright notice, this list of conditions and the 790792Sgshapiro*following disclaimer. 890792Sgshapiro*2. Redistributions in binary form must reproduce the above copyright notice, 990792Sgshapiro*this list of conditions and the following disclaimer in the documentation and/or other materials provided 1090792Sgshapiro*with the distribution. 1190792Sgshapiro* 1290792Sgshapiro*THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED 1390792Sgshapiro*WARRANTIES,INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 1490792Sgshapiro*FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 1590792Sgshapiro*FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 1690792Sgshapiro*NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 1790792Sgshapiro*BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 1890792Sgshapiro*LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 1990792Sgshapiro*SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE 2090792Sgshapiro* 2190792Sgshapiro* $FreeBSD: projects/pms/sys/dev/pms/RefTisa/discovery/api/tddmapi.h 285242 2015-07-07 13:17:02Z achim $ 2290792Sgshapiro* 2390792Sgshapiro********************************************************************************/ 2490792Sgshapiro/******************************************************************************** 2590792Sgshapiro* tmdmapi.h 2690792Sgshapiro* 2790792Sgshapiro* Abstract: This module contains function prototype of the Discovery 2890792Sgshapiro* Module (DM) API callback for initiator. 2990792Sgshapiro*******************************************************************************/ 3090792Sgshapiro 3190792Sgshapiro#ifndef TDDMAPI_H 3290792Sgshapiro 3390792Sgshapiro#define TDDMAPI_H 3490792Sgshapiro 3590792SgshapiroosGLOBAL void tddmCacheFlush( 3690792Sgshapiro dmRoot_t *dmRoot, 3790792Sgshapiro void *tdMemHandle, 3890792Sgshapiro void *virtPtr, 3990792Sgshapiro bit32 length 4090792Sgshapiro ); 4190792Sgshapiro 4290792SgshapiroosGLOBAL void tddmCacheInvalidate( 4390792Sgshapiro dmRoot_t *dmRoot, 4490792Sgshapiro void *tdMemHandle, 4590792Sgshapiro void *virtPtr, 4690792Sgshapiro bit32 length 4790792Sgshapiro ); 4890792Sgshapiro 4990792SgshapiroosGLOBAL void tddmCachePreFlush( 5090792Sgshapiro dmRoot_t *dmRoot, 5190792Sgshapiro void *tdMemHandle, 5290792Sgshapiro void *virtPtr, 5390792Sgshapiro bit32 length 5490792Sgshapiro ); 5590792Sgshapiro 5690792SgshapiroosGLOBAL void tddmDiscoverCB( 5790792Sgshapiro dmRoot_t *dmRoot, 5890792Sgshapiro dmPortContext_t *dmPortContext, 5990792Sgshapiro bit32 eventStatus 6090792Sgshapiro ); 6190792Sgshapiro 6290792SgshapiroosGLOBAL void tddmQueryDiscoveryCB( 6390792Sgshapiro dmRoot_t *dmRoot, 6490792Sgshapiro dmPortContext_t *dmPortContext, 6590792Sgshapiro bit32 discType, 6690792Sgshapiro bit32 discState 6790792Sgshapiro ); 6890792Sgshapiro 6990792SgshapiroosGLOBAL void tddmReportDevice( 7090792Sgshapiro dmRoot_t *dmRoot, 7190792Sgshapiro dmPortContext_t *dmPortContext, 7290792Sgshapiro dmDeviceInfo_t *dmDeviceInfo, 7390792Sgshapiro dmDeviceInfo_t *dmExpDeviceInfo, 7490792Sgshapiro bit32 flag 7590792Sgshapiro ); 7690792Sgshapiro 7790792SgshapiroosGLOBAL bit8 tddmSATADeviceTypeDecode(bit8 * pSignature); 7890792Sgshapiro 7990792SgshapiroosGLOBAL void tddmSingleThreadedEnter( 8090792Sgshapiro dmRoot_t *dmRoot, 8190792Sgshapiro bit32 syncLockId 8290792Sgshapiro ); 8390792Sgshapiro 8490792SgshapiroosGLOBAL void tddmSingleThreadedLeave( 8590792Sgshapiro dmRoot_t *dmRoot, 8690792Sgshapiro bit32 syncLockId 8790792Sgshapiro ); 8890792SgshapiroosGLOBAL bit32 tddmGetTransportParam( 8990792Sgshapiro dmRoot_t *dmRoot, 9090792Sgshapiro char *key, 9190792Sgshapiro char *subkey1, 9290792Sgshapiro char *subkey2, 9390792Sgshapiro char *subkey3, 9490792Sgshapiro char *subkey4, 9590792Sgshapiro char *subkey5, 9690792Sgshapiro char *valueName, 9790792Sgshapiro char *buffer, 9890792Sgshapiro bit32 bufferLen, 9990792Sgshapiro bit32 *lenReceived 10090792Sgshapiro ); 10190792SgshapiroosGLOBAL bit32 10290792SgshapirotddmRotateQnumber( 10390792Sgshapiro dmRoot_t *dmRoot, 10490792Sgshapiro agsaDevHandle_t *agDevHandle 10590792Sgshapiro ); 10690792Sgshapiro#ifndef tddmLogDebugString 10790792SgshapiroGLOBAL void tddmLogDebugString( 10890792Sgshapiro dmRoot_t *dmRoot, 10990792Sgshapiro bit32 level, 11090792Sgshapiro char *string, 111 void *ptr1, 112 void *ptr2, 113 bit32 value1, 114 bit32 value2 115 ); 116#endif 117 118 119#endif /* TDDMAPI_H */ 120