fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER START
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * The contents of this file are subject to the terms of the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Common Development and Distribution License (the "License").
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You may not use this file except in compliance with the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * or http://www.opensolaris.org/os/licensing.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * See the License for the specific language governing permissions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * and limitations under the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * When distributing Covered Code, include this CDDL HEADER in each
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * If applicable, add the following below this CDDL HEADER, with the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * fields enclosed by brackets "[]" replaced with your own identifying
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * information: Portions Copyright [yyyy] [name of copyright owner]
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER END
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Use is subject to license terms.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include "sun_fc.h"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#include "Trace.h"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/**
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @memo Entry points for the V2 API
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @postcondition entrypoints contains the function pointers to this API
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @return HBA_STATUS_OK if entrypoints updated
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * @param entrypoints The user-allocated buffer to store the API
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte *
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteHBA_STATUS HBA_RegisterLibraryV2(PHBA_ENTRYPOINTSV2 entrypoints) {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Trace log("HBA_RegisterLibrary");
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->GetVersionHandler = Sun_fcGetVersion;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->LoadLibraryHandler = Sun_fcLoadLibrary;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->FreeLibraryHandler = Sun_fcFreeLibrary;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->GetNumberOfAdaptersHandler = Sun_fcGetNumberOfAdapters;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->GetAdapterNameHandler = Sun_fcGetAdapterName;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->OpenAdapterHandler = Sun_fcOpenAdapter;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->CloseAdapterHandler = Sun_fcCloseAdapter;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->GetAdapterAttributesHandler = Sun_fcGetAdapterAttributes;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->GetAdapterPortAttributesHandler =
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Sun_fcGetAdapterPortAttributes;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->GetPortStatisticsHandler = Sun_fcGetPortStatistics;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->GetDiscoveredPortAttributesHandler =
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Sun_fcGetDiscoveredPortAttributes;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->GetPortAttributesByWWNHandler = Sun_fcGetPortAttributesByWWN;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->SendCTPassThruHandler = Sun_fcSendCTPassThru;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->RefreshInformationHandler = Sun_fcRefreshInformation;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->ResetStatisticsHandler = Sun_fcResetStatistics;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->GetFcpTargetMappingHandler = Sun_fcGetFcpTargetMapping;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->GetFcpPersistentBindingHandler = Sun_fcGetFcpPersistentBinding;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->GetEventBufferHandler = Sun_fcGetEventBuffer;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->SetRNIDMgmtInfoHandler = Sun_fcSetRNIDMgmtInfo;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->GetRNIDMgmtInfoHandler = Sun_fcGetRNIDMgmtInfo;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->SendRNIDHandler = Sun_fcSendRNID;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->ScsiInquiryHandler = Sun_fcSendScsiInquiry;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->ReportLUNsHandler = Sun_fcSendReportLUNs;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->ReadCapacityHandler = Sun_fcSendReadCapacity;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->OpenAdapterByWWNHandler = Sun_fcOpenAdapterByWWN;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->GetFcpTargetMappingV2Handler = Sun_fcGetFcpTargetMappingV2;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->SendCTPassThruV2Handler = Sun_fcSendCTPassThruV2;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->RefreshAdapterConfigurationHandler =
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Sun_fcRefreshAdapterConfiguration;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->GetBindingCapabilityHandler = Sun_fcGetBindingCapability;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->GetBindingSupportHandler = Sun_fcGetBindingSupport;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->SetBindingSupportHandler = Sun_fcSetBindingSupport;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->SetPersistentBindingV2Handler = Sun_fcSetPersistentBindingV2;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->GetPersistentBindingV2Handler = Sun_fcGetPersistentBindingV2;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->RemovePersistentBindingHandler = Sun_fcRemovePersistentBinding;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->RemoveAllPersistentBindingsHandler =
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Sun_fcRemoveAllPersistentBindings;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->SendRNIDV2Handler = Sun_fcSendRNIDV2;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->ScsiInquiryV2Handler = Sun_fcScsiInquiryV2;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->ScsiReportLUNsV2Handler = Sun_fcScsiReportLUNsV2;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->ScsiReadCapacityV2Handler = Sun_fcScsiReadCapacityV2;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->GetVendorLibraryAttributesHandler =
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Sun_fcGetVendorLibraryAttributes;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->RemoveCallbackHandler = Sun_fcRemoveCallback;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->RegisterForAdapterAddEventsHandler =
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Sun_fcRegisterForAdapterAddEvents;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->RegisterForAdapterEventsHandler =
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Sun_fcRegisterForAdapterEvents;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->RegisterForAdapterPortEventsHandler =
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Sun_fcRegisterForAdapterPortEvents;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->RegisterForAdapterPortStatEventsHandler =
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte Sun_fcRegisterForAdapterPortStatEvents;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->RegisterForTargetEventsHandler = Sun_fcRegisterForTargetEvents;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->RegisterForLinkEventsHandler = Sun_fcRegisterForLinkEvents;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->SendRLSHandler = Sun_fcSendRLS;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->SendRPLHandler = Sun_fcSendRPL;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->SendRPSHandler = Sun_fcSendRPS;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->SendSRLHandler = Sun_fcSendSRL;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->SendLIRRHandler = Sun_fcSendLIRR;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->GetFC4StatisticsHandler = Sun_fcGetFC4Statistics;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte entrypoints->GetFCPStatisticsHandler = Sun_fcGetFCPStatistics;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte return (HBA_STATUS_OK);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte}