scif_sas_task_request.h revision 231136
1226584Sdim/*- 2226584Sdim * This file is provided under a dual BSD/GPLv2 license. When using or 3226584Sdim * redistributing this file, you may do so under either license. 4226584Sdim * 5226584Sdim * GPL LICENSE SUMMARY 6226584Sdim * 7226584Sdim * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved. 8226584Sdim * 9226584Sdim * This program is free software; you can redistribute it and/or modify 10226584Sdim * it under the terms of version 2 of the GNU General Public License as 11226584Sdim * published by the Free Software Foundation. 12226584Sdim * 13226584Sdim * This program is distributed in the hope that it will be useful, but 14226584Sdim * WITHOUT ANY WARRANTY; without even the implied warranty of 15249423Sdim * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16249423Sdim * General Public License for more details. 17226584Sdim * 18226584Sdim * You should have received a copy of the GNU General Public License 19226584Sdim * along with this program; if not, write to the Free Software 20226584Sdim * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. 21263508Sdim * The full GNU General Public License is included in this distribution 22263508Sdim * in the file called LICENSE.GPL. 23226584Sdim * 24263508Sdim * BSD LICENSE 25263508Sdim * 26263508Sdim * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved. 27263508Sdim * All rights reserved. 28263508Sdim * 29263508Sdim * Redistribution and use in source and binary forms, with or without 30263508Sdim * modification, are permitted provided that the following conditions 31263508Sdim * are met: 32226584Sdim * 33226584Sdim * * Redistributions of source code must retain the above copyright 34226584Sdim * notice, this list of conditions and the following disclaimer. 35226584Sdim * * Redistributions in binary form must reproduce the above copyright 36226584Sdim * notice, this list of conditions and the following disclaimer in 37226584Sdim * the documentation and/or other materials provided with the 38226584Sdim * distribution. 39226584Sdim * 40226584Sdim * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 41226584Sdim * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 42226584Sdim * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 43226584Sdim * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 44226584Sdim * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 45226584Sdim * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 46226584Sdim * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 47226584Sdim * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 48226584Sdim * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 49226584Sdim * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 50226584Sdim * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 51226584Sdim * 52226584Sdim * $FreeBSD: head/sys/dev/isci/scil/scif_sas_task_request.h 231136 2012-02-07 17:43:58Z jimharris $ 53226584Sdim */ 54226584Sdim#ifndef _SCIF_SAS_TASK_REQUEST_H_ 55226584Sdim#define _SCIF_SAS_TASK_REQUEST_H_ 56226584Sdim 57226584Sdim/** 58226584Sdim * @file 59226584Sdim * 60226584Sdim * @brief This file contains the protected interface structures, constants, 61226584Sdim * and methods for the SCIF_SAS_TASK_REQUEST object. 62226584Sdim */ 63226584Sdim 64226584Sdim#ifdef __cplusplus 65226584Sdimextern "C" { 66226584Sdim#endif // __cplusplus 67226584Sdim 68226584Sdim#include <dev/isci/scil/sati_translator_sequence.h> 69234353Sdim#include <dev/isci/scil/scif_task_request.h> 70234353Sdim#include <dev/isci/scil/sci_base_request.h> 71234353Sdim#include <dev/isci/scil/scif_sas_request.h> 72234353Sdim#include <dev/isci/scil/scif_sas_internal_io_request.h> 73226584Sdim#include <dev/isci/scil/intel_sas.h> 74226584Sdim 75226584Sdim/** 76226584Sdim * @struct SCIF_SAS_TASK_REQUEST 77226584Sdim * 78226584Sdim * @brief The SCI SAS Framework Task request object abstracts the SAS task 79226584Sdim * management behavior for the framework component. Additionally, 80234353Sdim * it provides a higher level of abstraction for the core task 81234353Sdim * request object. 82234353Sdim */ 83234353Sdimtypedef struct SCIF_SAS_TASK_REQUEST 84234353Sdim{ 85234353Sdim /** 86234353Sdim * The SCIF_SAS_REQUEST is the parent object for the 87234353Sdim * SCIF_SAS_TASK_REQUEST object. 88234353Sdim */ 89234353Sdim SCIF_SAS_REQUEST_T parent; 90226584Sdim 91226584Sdim /** 92226584Sdim * This field contains the number of current requests affected by 93226584Sdim * this task management request. This number indicates all of the 94226584Sdim * requests terminated in the silicon (including previous task requests). 95226584Sdim */ 96226584Sdim U16 affected_request_count; 97226584Sdim 98226584Sdim /** 99226584Sdim * This field specifies the tag for the IO request or the tag to be 100226584Sdim * managed for a task management request. 101226584Sdim * This field is utilized during internal IO requests. 102226584Sdim */ 103226584Sdim U16 io_tag_to_manage; 104226584Sdim 105226584Sdim /** 106226584Sdim * This field will be utilized to specify the task management function 107226584Sdim * of this task request. 108226584Sdim */ 109226584Sdim SCI_SAS_TASK_MGMT_FUNCTION_T function; 110226584Sdim 111251662Sdim} SCIF_SAS_TASK_REQUEST_T; 112251662Sdim 113243830Sdimextern SCI_BASE_STATE_T scif_sas_task_request_state_table[]; 114263508Sdimextern SCI_BASE_REQUEST_STATE_HANDLER_T 115263508Sdim scif_sas_task_request_state_handler_table[]; 116226584Sdim 117226584Sdimvoid scif_sas_task_request_operation_complete( 118226584Sdim SCIF_SAS_TASK_REQUEST_T * fw_task 119226584Sdim); 120226584Sdim 121226584SdimU8 scif_sas_task_request_get_function( 122226584Sdim SCIF_SAS_TASK_REQUEST_T * fw_task 123226584Sdim); 124226584Sdim 125226584SdimSCI_STATUS scif_sas_internal_task_request_construct( 126226584Sdim SCI_CONTROLLER_HANDLE_T scif_controller, 127226584Sdim SCI_REMOTE_DEVICE_HANDLE_T scif_remote_device, 128226584Sdim U16 io_tag, 129226584Sdim void * task_request_memory, 130226584Sdim SCI_TASK_REQUEST_HANDLE_T * scif_task_request, 131226584Sdim U8 task_function 132226584Sdim); 133226584Sdim 134226584Sdimvoid scif_sas_internal_task_request_destruct( 135226584Sdim SCIF_SAS_TASK_REQUEST_T * fw_internal_task 136226584Sdim); 137226584Sdim 138226584Sdim#ifdef __cplusplus 139226584Sdim} 140226584Sdim#endif // __cplusplus 141226584Sdim 142226584Sdim#endif // _SCIF_SAS_TASK_REQUEST_H_ 143234353Sdim 144226584Sdim