1 /******************************************************************************* 2 ** 3 *Copyright (c) 2014 PMC-Sierra, Inc. All rights reserved. 4 * 5 *Redistribution and use in source and binary forms, with or without modification, are permitted provided 6 *that the following conditions are met: 7 *1. Redistributions of source code must retain the above copyright notice, this list of conditions and the 8 *following disclaimer. 9 *2. Redistributions in binary form must reproduce the above copyright notice, 10 *this list of conditions and the following disclaimer in the documentation and/or other materials provided 11 *with the distribution. 12 * 13 *THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED 14 *WARRANTIES,INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 15 *FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 16 *FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 17 *NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 18 *BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 19 *LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 20 *SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE 21 ** 22 * 23 ********************************************************************************/ 24 /******************************************************************************** 25 * dmapi.h 26 * 27 * Abstract: This module contains function prototype of the Discovery 28 * Module (DM) API for initiator. 29 *******************************************************************************/ 30 31 #ifndef DMAPI_H 32 #define DMAPI_H 33 34 #include <dev/pms/RefTisa/discovery/api/dm.h> 35 #include <dev/pms/RefTisa/sallsdk/api/sa.h> 36 37 osGLOBAL bit32 dmCreatePort( 38 dmRoot_t *dmRoot, 39 dmPortContext_t *dmPortContext, 40 dmPortInfo_t *dmPortInfo); 41 42 osGLOBAL bit32 dmDestroyPort( 43 dmRoot_t *dmRoot, 44 dmPortContext_t *dmPortContext, 45 dmPortInfo_t *dmPortInfo); 46 47 osGLOBAL bit32 dmRegisterDevice( 48 dmRoot_t *dmRoot, 49 dmPortContext_t *dmPortContext, 50 dmDeviceInfo_t *dmDeviceInfo, 51 agsaDevHandle_t *agDevHandle); 52 53 osGLOBAL bit32 dmDiscover( 54 dmRoot_t *dmRoot, 55 dmPortContext_t *dmPortContext, 56 bit32 option); 57 58 osGLOBAL void dmGetRequirements( 59 dmRoot_t *dmRoot, 60 dmSwConfig_t *swConfig, 61 dmMemoryRequirement_t *memoryRequirement, 62 bit32 *usecsPerTick, 63 bit32 *maxNumLocks); 64 65 osGLOBAL void dmNotifyBC( 66 dmRoot_t *dmRoot, 67 dmPortContext_t *dmPortContext, 68 bit32 type); 69 70 osGLOBAL bit32 dmQueryDiscovery( 71 dmRoot_t *dmRoot, 72 dmPortContext_t *dmPortContext); 73 74 osGLOBAL bit32 75 dmResetFailedDiscovery( 76 dmRoot_t *dmRoot, 77 dmPortContext_t *dmPortContext); 78 79 osGLOBAL bit32 dmInitialize( 80 dmRoot_t *dmRoot, 81 agsaRoot_t *agRoot, 82 dmMemoryRequirement_t *memoryAllocated, 83 dmSwConfig_t *swConfig, 84 bit32 usecsPerTick ); 85 86 osGLOBAL void dmTimerTick ( dmRoot_t *dmRoot ); 87 88 #endif /* DMAPI_H */ 89