sci_base_port.c revision 256281
196263Sobrien/*- 296263Sobrien * This file is provided under a dual BSD/GPLv2 license. When using or 396263Sobrien * redistributing this file, you may do so under either license. 496263Sobrien * 596263Sobrien * GPL LICENSE SUMMARY 696263Sobrien * 796263Sobrien * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved. 896263Sobrien * 996263Sobrien * This program is free software; you can redistribute it and/or modify 1096263Sobrien * it under the terms of version 2 of the GNU General Public License as 1196263Sobrien * published by the Free Software Foundation. 1296263Sobrien * 1396263Sobrien * This program is distributed in the hope that it will be useful, but 1496263Sobrien * WITHOUT ANY WARRANTY; without even the implied warranty of 1596263Sobrien * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1696263Sobrien * General Public License for more details. 1796263Sobrien * 1896263Sobrien * You should have received a copy of the GNU General Public License 1996263Sobrien * along with this program; if not, write to the Free Software 2096263Sobrien * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. 2196263Sobrien * The full GNU General Public License is included in this distribution 2296263Sobrien * in the file called LICENSE.GPL. 2396263Sobrien * 2496263Sobrien * BSD LICENSE 25169689Skan * 26169689Skan * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved. 2796263Sobrien * All rights reserved. 2896263Sobrien * 2996263Sobrien * Redistribution and use in source and binary forms, with or without 3096263Sobrien * modification, are permitted provided that the following conditions 3196263Sobrien * are met: 3296263Sobrien * 3396263Sobrien * * Redistributions of source code must retain the above copyright 3496263Sobrien * notice, this list of conditions and the following disclaimer. 3596263Sobrien * * Redistributions in binary form must reproduce the above copyright 3696263Sobrien * notice, this list of conditions and the following disclaimer in 3796263Sobrien * the documentation and/or other materials provided with the 3896263Sobrien * distribution. 3996263Sobrien * 4096263Sobrien * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 4196263Sobrien * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 4296263Sobrien * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 4396263Sobrien * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 4496263Sobrien * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 4596263Sobrien * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 4696263Sobrien * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 4796263Sobrien * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 4896263Sobrien * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 4996263Sobrien * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 5096263Sobrien * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 5196263Sobrien */ 5296263Sobrien 5396263Sobrien#include <sys/cdefs.h> 5496263Sobrien__FBSDID("$FreeBSD: stable/10/sys/dev/isci/scil/sci_base_port.c 231136 2012-02-07 17:43:58Z jimharris $"); 55 56/** 57 * @file 58 * 59 * @brief This file contains the base port method implementations and 60 * any constants or structures private to the base port object. 61 */ 62 63#include <dev/isci/scil/sci_base_port.h> 64 65//****************************************************************************** 66//* P R O T E C T E D M E T H O D S 67//****************************************************************************** 68 69void sci_base_port_construct( 70 SCI_BASE_PORT_T *this_port, 71 SCI_BASE_LOGGER_T *logger, 72 SCI_BASE_STATE_T *state_table 73) 74{ 75 sci_base_object_construct(&this_port->parent, logger); 76 77 sci_base_state_machine_construct( 78 &this_port->state_machine, 79 &this_port->parent, 80 state_table, 81 SCI_BASE_PORT_STATE_STOPPED 82 ); 83 84 sci_base_state_machine_start( 85 &this_port->state_machine 86 ); 87} 88 89