sci_base_remote_device.c revision 230557
1238106Sdes/*- 2238106Sdes * This file is provided under a dual BSD/GPLv2 license. When using or 3238106Sdes * redistributing this file, you may do so under either license. 4238106Sdes * 5238106Sdes * GPL LICENSE SUMMARY 6238106Sdes * 7238106Sdes * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved. 8238106Sdes * 9238106Sdes * This program is free software; you can redistribute it and/or modify 10238106Sdes * it under the terms of version 2 of the GNU General Public License as 11238106Sdes * published by the Free Software Foundation. 12238106Sdes * 13238106Sdes * This program is distributed in the hope that it will be useful, but 14238106Sdes * WITHOUT ANY WARRANTY; without even the implied warranty of 15238106Sdes * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16238106Sdes * General Public License for more details. 17238106Sdes * 18238106Sdes * You should have received a copy of the GNU General Public License 19238106Sdes * along with this program; if not, write to the Free Software 20238106Sdes * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. 21238106Sdes * The full GNU General Public License is included in this distribution 22238106Sdes * in the file called LICENSE.GPL. 23238106Sdes * 24238106Sdes * BSD LICENSE 25238106Sdes * 26238106Sdes * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved. 27238106Sdes * All rights reserved. 28238106Sdes * 29238106Sdes * Redistribution and use in source and binary forms, with or without 30238106Sdes * modification, are permitted provided that the following conditions 31238106Sdes * are met: 32238106Sdes * 33238106Sdes * * Redistributions of source code must retain the above copyright 34238106Sdes * notice, this list of conditions and the following disclaimer. 35238106Sdes * * Redistributions in binary form must reproduce the above copyright 36238106Sdes * notice, this list of conditions and the following disclaimer in 37238106Sdes * the documentation and/or other materials provided with the 38238106Sdes * distribution. 39238106Sdes * 40238106Sdes * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 41238106Sdes * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 42238106Sdes * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 43238106Sdes * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 44238106Sdes * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 45238106Sdes * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 46238106Sdes * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 47238106Sdes * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 48238106Sdes * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 49238106Sdes * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 50238106Sdes * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 51238106Sdes */ 52238106Sdes 53238106Sdes#include <sys/cdefs.h> 54238106Sdes__FBSDID("$FreeBSD$"); 55238106Sdes 56238106Sdes#include <dev/isci/scil/sci_base_remote_device.h> 57238106Sdes 58238106Sdesvoid sci_base_remote_device_construct( 59238106Sdes SCI_BASE_REMOTE_DEVICE_T *this_device, 60238106Sdes SCI_BASE_LOGGER_T *logger, 61238106Sdes SCI_BASE_STATE_T *state_table 62238106Sdes) 63238106Sdes{ 64238106Sdes sci_base_object_construct( 65238106Sdes &this_device->parent, 66238106Sdes logger 67238106Sdes ); 68238106Sdes 69238106Sdes sci_base_state_machine_construct( 70238106Sdes &this_device->state_machine, 71238106Sdes &this_device->parent, 72238106Sdes state_table, 73238106Sdes SCI_BASE_REMOTE_DEVICE_STATE_INITIAL 74238106Sdes ); 75238106Sdes 76238106Sdes sci_base_state_machine_start( 77238106Sdes &this_device->state_machine 78238106Sdes ); 79238106Sdes} 80238106Sdes 81238106Sdes