scic_sds_library.h revision 330897
162587Sitojun/*- 295023Ssuz * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 362587Sitojun * 4139823Simp * This file is provided under a dual BSD/GPLv2 license. When using or 562587Sitojun * redistributing this file, you may do so under either license. 662587Sitojun * 762587Sitojun * GPL LICENSE SUMMARY 862587Sitojun * 962587Sitojun * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved. 1062587Sitojun * 1162587Sitojun * This program is free software; you can redistribute it and/or modify 1262587Sitojun * it under the terms of version 2 of the GNU General Public License as 1362587Sitojun * published by the Free Software Foundation. 1462587Sitojun * 1562587Sitojun * This program is distributed in the hope that it will be useful, but 1662587Sitojun * WITHOUT ANY WARRANTY; without even the implied warranty of 1762587Sitojun * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1862587Sitojun * General Public License for more details. 1962587Sitojun * 2062587Sitojun * You should have received a copy of the GNU General Public License 2162587Sitojun * along with this program; if not, write to the Free Software 2262587Sitojun * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. 2362587Sitojun * The full GNU General Public License is included in this distribution 2462587Sitojun * in the file called LICENSE.GPL. 2562587Sitojun * 2662587Sitojun * BSD LICENSE 2762587Sitojun * 2862587Sitojun * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved. 2962587Sitojun * All rights reserved. 3062587Sitojun * 3162587Sitojun * Redistribution and use in source and binary forms, with or without 3262587Sitojun * modification, are permitted provided that the following conditions 3362587Sitojun * are met: 3478064Sume * 3562587Sitojun * * Redistributions of source code must retain the above copyright 3662587Sitojun * notice, this list of conditions and the following disclaimer. 3762587Sitojun * * Redistributions in binary form must reproduce the above copyright 3862587Sitojun * notice, this list of conditions and the following disclaimer in 3962587Sitojun * the documentation and/or other materials provided with the 4062587Sitojun * distribution. 4162587Sitojun * 4262587Sitojun * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 4362587Sitojun * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 4462587Sitojun * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 4562587Sitojun * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 4662587Sitojun * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 4762587Sitojun * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 4862587Sitojun * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 4962587Sitojun * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 5062587Sitojun * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 5162587Sitojun * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 5262587Sitojun * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 5362587Sitojun * 5462587Sitojun * $FreeBSD: stable/11/sys/dev/isci/scil/scic_sds_library.h 330897 2018-03-14 03:19:51Z eadler $ 5562587Sitojun */ 5662587Sitojun#ifndef _SCIC_SDS_LIBRARY_H_ 5762587Sitojun#define _SCIC_SDS_LIBRARY_H_ 5862587Sitojun 5962587Sitojun/** 6062587Sitojun * @file 6162587Sitojun * 6262587Sitojun * @brief This file contains the structures used by the core library object. 6378064Sume * All of the functionality for the core library is in the 6478064Sume * sci_base_library.h file. 6578064Sume */ 6678064Sume 6778064Sume#ifdef __cplusplus 6878064Sumeextern "C" { 6978064Sume#endif // __cplusplus 7062587Sitojun 7162587Sitojun#include <dev/isci/scil/sci_base_library.h> 7262587Sitojun#include <dev/isci/scil/scic_sds_pci.h> 7362587Sitojun 7462587Sitojun// Forward declar the controllers 7562587Sitojunstruct SCIC_SDS_CONTROLLER; 7662587Sitojun 7762587Sitojun/** 7862587Sitojun * @struct SCIC_SDS_LIBRARY 7962587Sitojun * 8062587Sitojun * This structure contains data used by the core library. 8162587Sitojun */ 8262587Sitojuntypedef struct SCIC_SDS_LIBRARY 8383655Sbrooks{ 84286001Sae /* 85129880Sphk * The SCI_BASE_LIBRARY is the parent object for the SCIC_SDS_LIBRARY 8662587Sitojun * object. 87178888Sjulian */ 8883655Sbrooks SCI_BASE_LIBRARY_T parent; 89286001Sae 90183351Sdwmalone /** 9162587Sitojun * This is the count of the maximum number of controllers that this library 9262587Sitojun * can contain. 9362587Sitojun */ 9462587Sitojun U32 max_controller_count; 9562587Sitojun 96257176Sglebius /** 97130933Sbrooks * The PCI header for this library object all libraries must have the same 9862587Sitojun * pci device id. 9962587Sitojun */ 10062587Sitojun U16 pci_device; 101196019Srwatson U8 pci_revision; 10262587Sitojun 10362587Sitojun /** 104292331Smelifaro * This field is the array of controllers that are contained within the 10562587Sitojun * library object. 10662587Sitojun */ 10762587Sitojun struct SCIC_SDS_CONTROLLER *controllers; 10862587Sitojun 10962587Sitojun} SCIC_SDS_LIBRARY_T; 11062587Sitojun 11162587SitojunU8 scic_sds_library_get_controller_index( 11262587Sitojun struct SCIC_SDS_LIBRARY * library, 11362587Sitojun struct SCIC_SDS_CONTROLLER * controller 11462587Sitojun); 11562587Sitojun 11662587Sitojun#ifdef __cplusplus 11762587Sitojun} 11862587Sitojun#endif // __cplusplus 11962587Sitojun 12062587Sitojun#endif // _SCIC_SDS_LIBRARY_H_ 121163606Srwatson