The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/dev/isci/scil/scic_io_request.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*-
    2  * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0
    3  *
    4  * This file is provided under a dual BSD/GPLv2 license.  When using or
    5  * redistributing this file, you may do so under either license.
    6  *
    7  * GPL LICENSE SUMMARY
    8  *
    9  * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
   10  *
   11  * This program is free software; you can redistribute it and/or modify
   12  * it under the terms of version 2 of the GNU General Public License as
   13  * published by the Free Software Foundation.
   14  *
   15  * This program is distributed in the hope that it will be useful, but
   16  * WITHOUT ANY WARRANTY; without even the implied warranty of
   17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   18  * General Public License for more details.
   19  *
   20  * You should have received a copy of the GNU General Public License
   21  * along with this program; if not, write to the Free Software
   22  * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
   23  * The full GNU General Public License is included in this distribution
   24  * in the file called LICENSE.GPL.
   25  *
   26  * BSD LICENSE
   27  *
   28  * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
   29  * All rights reserved.
   30  *
   31  * Redistribution and use in source and binary forms, with or without
   32  * modification, are permitted provided that the following conditions
   33  * are met:
   34  *
   35  *   * Redistributions of source code must retain the above copyright
   36  *     notice, this list of conditions and the following disclaimer.
   37  *   * Redistributions in binary form must reproduce the above copyright
   38  *     notice, this list of conditions and the following disclaimer in
   39  *     the documentation and/or other materials provided with the
   40  *     distribution.
   41  *
   42  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
   43  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
   44  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
   45  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
   46  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   47  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   48  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
   49  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
   50  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   51  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
   52  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   53  *
   54  * $FreeBSD$
   55  */
   56 #ifndef _SCIC_IO_REQUEST_H_
   57 #define _SCIC_IO_REQUEST_H_
   58 
   59 /**
   60  * @file
   61  *
   62  * @brief This file contains the structures and interface methods that
   63  *        can be referenced and used by the SCI user for the SCI IO request
   64  *        object.
   65  *
   66  * @todo Determine the failure situations and return values.
   67  */
   68 
   69 #ifdef __cplusplus
   70 extern "C" {
   71 #endif // __cplusplus
   72 
   73 #include <dev/isci/scil/sci_types.h>
   74 #include <dev/isci/scil/sci_status.h>
   75 #include <dev/isci/scil/intel_sas.h>
   76 
   77 /**
   78  * @struct SCIC_IO_SSP_PARAMETERS
   79  * @brief  This structure contains additional optional parameters for SSP
   80  *         IO requests.  These parameters are utilized with the
   81  *         scic_io_request_construct_advanced_ssp() method.
   82  *
   83  * @todo Add Block-guard/DIF, TLR
   84  */
   85 typedef struct SCIC_IO_SSP_PARAMETERS
   86 {
   87    /**
   88     * Data Integrity Format (DIF) is also known as protection information
   89     * or block-guard.  This sub-structure contains DIF specific feature
   90     * information for SSP IO requests.
   91     */
   92    struct
   93    {
   94       void * placeholder;
   95    } dif;
   96 
   97    /**
   98     * Transport Layer Retries (TLR) is an SSP protocol specific feature.
   99     * This sub-structure contains Transport Layer Retries (TLR) specific
  100     * feature information for SSP IO requests.
  101     */
  102    struct
  103    {
  104       void * placeholder;
  105    } tlr;
  106 
  107 } SCIC_IO_SSP_PARAMETERS_T;
  108 
  109 /**
  110  * @struct SCIC_IO_PARAMETERS
  111  * @brief  This structure contains additional optional parameters for
  112  *         STP/SATA IO requests.  These parameters are utilized with the
  113  *         scic_io_request_construct_advanced_sata() method.
  114  */
  115 typedef struct SCIC_IO_SATA_PARAMETERS
  116 {
  117    /**
  118     * This field indicates whether or not to construct the Scatter-Gather
  119     * List elements for the SATA request.  This is used in scenarios
  120     * where Scatter-gather-list processing/translation is done by the
  121     * user.
  122     */
  123    BOOL do_translate_sgl;
  124 
  125 } SCIC_IO_SATA_PARAMETERS_T;
  126 
  127 /**
  128  * @struct SCIC_PASSTHRU_REQUEST_CALLBACKS
  129  * @brief  This structure contains the pointer to the callback functions
  130  *         for constructing the passthrough request common to SSP, SMP and STP.
  131  *         This structure must be set by the win sci layer before the passthrough
  132  *         build is called
  133  *
  134  */
  135 typedef struct SCIC_PASSTHRU_REQUEST_CALLBACKS
  136 {
  137    /**
  138    * Function pointer to get the phy identifier for passthrough request.
  139    */
  140    U32 (*scic_cb_passthru_get_phy_identifier) ( void * , U8 *);
  141    /**
  142    * Function pointer to get the port identifier for passthrough request.
  143    */
  144    U32 (*scic_cb_passthru_get_port_identifier) ( void * , U8 *);
  145    /**
  146    * Function pointer to get the connection rate for passthrough request.
  147    */
  148    U32 (*scic_cb_passthru_get_connection_rate) ( void * , void *);
  149    /**
  150    * Function pointer to get the destination sas address for passthrough request.
  151    */
  152    void (*scic_cb_passthru_get_destination_sas_address) (void *, U8 **);
  153    /**
  154    * Function pointer to get the transfer length for passthrough request.
  155    */
  156    U32 (*scic_cb_passthru_get_transfer_length) (void *);
  157    /**
  158    * Function pointer to get the data direction for passthrough request.
  159    */
  160    U32 (*scic_cb_passthru_get_data_direction) (void *);
  161 
  162 } SCIC_PASSTHRU_REQUEST_CALLBACKS_T;
  163 
  164 /**
  165  * @struct SCIC_SSP_PASSTHRU_REQUEST_CALLBACKS
  166  * @brief  This structure contains the pointer to the callback functions
  167  *         for constructing the passthrough request specific to SSP.
  168  *         This structure must be set by the win sci layer before the passthrough
  169  *         build is called
  170  *
  171  */
  172 typedef struct SCIC_SSP_PASSTHRU_REQUEST_CALLBACKS
  173 {
  174    /**
  175    * Common callbacks for all Passthru requests
  176    */
  177    SCIC_PASSTHRU_REQUEST_CALLBACKS_T common_callbacks;
  178    /**
  179    * Function pointer to get the lun for passthrough request.
  180    */
  181    void (* scic_cb_ssp_passthru_get_lun) (void *, U8 **);
  182    /**
  183    * Function pointer to get the cdb
  184    */
  185    void (* scic_cb_ssp_passthru_get_cdb) ( void *, U32 *, U8 **, U32 *, U8 ** );
  186    /**
  187    * Function pointer to get the task attribute for passthrough request.
  188    */
  189    U32 (*scic_cb_ssp_passthru_get_task_attribute) (void *);
  190 } SCIC_SSP_PASSTHRU_REQUEST_CALLBACKS_T;
  191 
  192 /**
  193  * @struct SCIC_STP_PASSTHRU_REQUEST_CALLBACKS
  194  * @brief  This structure contains the pointer to the callback functions
  195  *         for constructing the passthrough request specific to STP.
  196  *         This structure must be set by the win sci layer before the passthrough
  197  *         build is called
  198  *
  199  */
  200 typedef struct SCIC_STP_PASSTHRU_REQUEST_CALLBACKS
  201 {
  202    /**
  203    * Common callbacks for all Passthru requests
  204    */
  205    SCIC_PASSTHRU_REQUEST_CALLBACKS_T common_callbacks;
  206    /**
  207    * Function pointer to get the protocol for passthrough request.
  208    */
  209    U8 (* scic_cb_stp_passthru_get_protocol) (void *);
  210    /**
  211    * Function pointer to get the resgister fis
  212    */
  213    void (* scic_cb_stp_passthru_get_register_fis) ( void *, U8 ** );
  214    /**
  215    * Function pointer to get the MULTIPLE_COUNT (bits 5,6,7 in Byte 1 in the SAT-specific SCSI extenstion in ATA Pass-through (0x85))
  216    */
  217    U8 (* scic_cb_stp_passthru_get_multiplecount) ( void *);
  218    /**
  219    * Function pointer to get the EXTEND (bit 0 in Byte 1 the SAT-specific SCSI extenstion in ATA Pass-through (0x85))
  220    */
  221    U8 (* scic_cb_stp_passthru_get_extend) ( void *);
  222    /**
  223    * Function pointer to get the CK_COND (bit 5 in Byte 2 the SAT-specific SCSI extenstion in ATA Pass-through (0x85))
  224    */
  225    U8 (* scic_cb_stp_passthru_get_ckcond) ( void *);
  226    /**
  227    * Function pointer to get the T_DIR (bit 3 in Byte 2 the SAT-specific SCSI extenstion in ATA Pass-through (0x85))
  228    */
  229    U8 (* scic_cb_stp_passthru_get_tdir) ( void *);
  230    /**
  231    * Function pointer to get the BYTE_BLOCK (bit 2 in Byte 2 the SAT-specific SCSI extenstion in ATA Pass-through (0x85))
  232    */
  233    U8 (* scic_cb_stp_passthru_get_byteblock) ( void *);
  234    /**
  235    * Function pointer to get the T_LENGTH (bits 0,1 in Byte 2 the SAT-specific SCSI extenstion in ATA Pass-through (0x85))
  236    */
  237    U8 (* scic_cb_stp_passthru_get_tlength) ( void *);
  238 
  239 } SCIC_STP_PASSTHRU_REQUEST_CALLBACKS_T;
  240 
  241 /**
  242  * @struct SCIC_SMP_PASSTHRU_REQUEST_CALLBACKS
  243  * @brief  This structure contains the pointer to the callback functions
  244  *         for constructing the passthrough request specific to SMP.
  245  *         This structure must be set by the win sci layer before the passthrough
  246  *         build is called
  247  *
  248  */
  249 typedef struct SCIC_SMP_PASSTHRU_REQUEST_CALLBACKS
  250 {
  251    /**
  252    * Common callbacks for all Passthru requests
  253    */
  254    SCIC_PASSTHRU_REQUEST_CALLBACKS_T common_callbacks;
  255 
  256    /**
  257    * Function pointer to get the length of the smp request and its length
  258    */
  259    U32 (* scic_cb_smp_passthru_get_request) ( void *, U8 ** );
  260    /**
  261    * Function pointer to get the frame type of the smp request
  262    */
  263    U8 (* scic_cb_smp_passthru_get_frame_type) ( void *);
  264    /**
  265    * Function pointer to get the function in the smp request
  266    */
  267    U8 (* scic_cb_smp_passthru_get_function) ( void * );
  268 
  269    /**
  270    * Function pointer to get the "allocated response length" in the smp request
  271    */
  272    U8 (* scic_cb_smp_passthru_get_allocated_response_length) ( void * );
  273 
  274 } SCIC_SMP_PASSTHRU_REQUEST_CALLBACKS_T;
  275 
  276 /**
  277  * @brief This enumeration specifies the transport protocol utilized
  278  *        for the request.
  279  */
  280 typedef enum
  281 {
  282    /**
  283     * This enumeration constant indicates that no protocol has yet been
  284     * set.
  285     */
  286    SCIC_NO_PROTOCOL,
  287 
  288    /**
  289     * This enumeration constant indicates that the protocol utilized
  290     * is the Serial Management Protocol.
  291     */
  292    SCIC_SMP_PROTOCOL,
  293 
  294    /**
  295     * This enumeration constant indicates that the protocol utilized
  296     * is the Serial SCSI Protocol.
  297     */
  298    SCIC_SSP_PROTOCOL,
  299 
  300    /**
  301     * This enumeration constant indicates that the protocol utilized
  302     * is the Serial-ATA Tunneling Protocol.
  303     */
  304    SCIC_STP_PROTOCOL
  305 
  306 } SCIC_TRANSPORT_PROTOCOL;
  307 
  308 
  309 /**
  310  * @brief This method simply returns the size required to build an SCI
  311  *        based IO request object.
  312  *
  313  * @return Return the size of the SCI IO request object.
  314  */
  315 U32 scic_io_request_get_object_size(
  316    void
  317 );
  318 
  319 /**
  320  * @brief This method is called by the SCI user to construct all SCI Core
  321  *        IO requests.  Memory initialization and functionality common to
  322  *        all IO request types is performed in this method.
  323  *
  324  * @note  The SCI core implementation will create an association between
  325  *        the user IO request object and the core IO request object.
  326  *
  327  * @param[in]  scic_controller the handle to the core controller object
  328  *             for which to build an IO request.
  329  * @param[in]  scic_remote_device the handle to the core remote device
  330  *             object for which to build an IO request.
  331  * @param[in]  io_tag This parameter specifies the IO tag to be associated
  332  *             with this request.  If SCI_CONTROLLER_INVALID_IO_TAG is
  333  *             passed, then a copy of the request is built internally.  The
  334  *             request will be copied into the actual controller request
  335  *             memory when the IO tag is allocated internally during the
  336  *             scic_controller_start_io() method.
  337  * @param[in]  user_io_request_object This parameter specifies the user
  338  *             IO request to be utilized during IO construction.  This IO
  339  *             pointer will become the associated object for the core
  340  *             IO request object.
  341  * @param[in]  scic_io_request_memory This parameter specifies the memory
  342  *             location to be utilized when building the core request.
  343  * @param[out] new_scic_io_request_handle This parameter specifies a
  344  *             pointer to the handle the core will expect in further
  345  *             interactions with the core IO request object.
  346  *
  347  * @return Indicate if the controller successfully built the IO request.
  348  * @retval SCI_SUCCESS This value is returned if the IO request was
  349  *         successfully built.
  350  */
  351 SCI_STATUS scic_io_request_construct(
  352    SCI_CONTROLLER_HANDLE_T      scic_controller,
  353    SCI_REMOTE_DEVICE_HANDLE_T   scic_remote_device,
  354    U16                          io_tag,
  355    void                       * user_io_request_object,
  356    void                       * scic_io_request_memory,
  357    SCI_IO_REQUEST_HANDLE_T    * new_scic_io_request_handle
  358 );
  359 
  360 /**
  361  * @brief This method is called by the SCI user to build an SSP
  362  *        IO request.
  363  *
  364  * @pre
  365  *        - The user must have previously called scic_io_request_construct()
  366  *          on the supplied IO request.
  367  *
  368  * @param[in]  scic_io_request This parameter specifies the handle to the
  369  *             io request object to be built.
  370  *
  371  * @return Indicate if the controller successfully built the IO request.
  372  * @retval SCI_SUCCESS This value is returned if the IO request was
  373  *         successfully built.
  374  * @retval SCI_FAILURE_UNSUPPORTED_PROTOCOL This value is returned if the
  375  *         remote_device does not support the SSP protocol.
  376  * @retval SCI_FAILURE_INVALID_ASSOCIATION This value is returned if the
  377  *         user did not properly set the association between the SCIC IO
  378  *         request and the user's IO request.  Please refer to the
  379  *         sci_object_set_association() routine for more
  380  *         information.
  381  */
  382 SCI_STATUS scic_io_request_construct_basic_ssp(
  383    SCI_IO_REQUEST_HANDLE_T  scic_io_request
  384 );
  385 
  386 /**
  387  * @brief This method is called by the SCI user to build an SSP
  388  *        IO request with additional parameters that provide additional
  389  *        flexibility from the standard scic_io_request_construct_basic_ssp()
  390  *        method.
  391  *
  392  * @pre
  393  *        - The user must have previously called scic_io_request_construct()
  394  *          on the supplied IO request.
  395  *
  396  * @param[in]  scic_io_request This parameter specifies the handle to the
  397  *             io request object to be built.
  398  * @param[in]  io_parameters the additional parameter information to
  399  *             be added to the outgoing IO request.
  400  *
  401  * @return Indicate if the controller successfully built the IO request.
  402  * @retval SCI_SUCCESS This value is returned if the IO request was
  403  *         successfully built.
  404  * @retval SCI_FAILURE_UNSUPPORTED_PROTOCOL This value is returned if the
  405  *         remote_device does not support the SSP protocol.
  406  * @retval SCI_FAILURE_INVALID_ASSOCIATION This value is returned if the
  407  *         user did not properly set the association between the SCIC IO
  408  *         request and the user's IO request.  Please refer to the
  409  *         sci_object_set_association() routine for more
  410  *         information.
  411  *
  412  * @todo Determine the failure situations and return values.
  413  */
  414 SCI_STATUS scic_io_request_construct_advanced_ssp(
  415    SCI_IO_REQUEST_HANDLE_T    scic_io_request,
  416    SCIC_IO_SSP_PARAMETERS_T * io_parameters
  417 );
  418 
  419 #if !defined(DISABLE_PASS_THROUGH)
  420 
  421 /**
  422  * @brief This method will build an IO request based on the user information
  423  *        supplied in the pass-through IO request object.
  424  *
  425  * @param[in]  scic_io_request This parameter specifies the handle to the
  426  *             io request object to be built.
  427  *
  428  * @param[in]  ssp_passthru_cb This parameter specifies the pointer to
  429  *             the structure containing the callback to the function
  430  *             pointers to get the needed fields from the pass-through
  431  *             reqiest instead of SRB
  432  *
  433  * @return Indicate if the controller successfully built the IO request.
  434  * @retval SCI_SUCCESS This value is returned if the IO request was
  435  *         successfully built.
  436  * @retval SCI_FAILURE_INVALID_ASSOCIATION This value is returned if the
  437  *         user did not properly set the association between the SCIC IO
  438  *         request and the user's IO request.  Please refer to the
  439  *         sci_object_set_association() routine for more
  440  *         information.
  441  */
  442 SCI_STATUS scic_io_request_construct_ssp_pass_through(
  443    void                       * scic_io_request_memory,
  444    SCIC_SSP_PASSTHRU_REQUEST_CALLBACKS_T *ssp_passthru_cb
  445 );
  446 
  447 #else // !defined(DISABLE_PASS_THROUGH)
  448 
  449 #define scic_io_request_construct_ssp_pass_through(memory, cb) SCI_FAILURE
  450 
  451 #endif // !defined(DISABLE_PASS_THROUGH)
  452 
  453 /**
  454  * @brief This method is called by the SCI Core user to build an STP
  455  *        IO request.
  456  *
  457  * @pre
  458  *        - The user must have previously called scic_io_request_construct()
  459  *          on the supplied IO request.
  460  *
  461  * @param[in]  scic_io_request This parameter specifies the handle to the
  462  *             io request object to be built.
  463  *
  464  * @return Indicate if the controller successfully built the IO request.
  465  * @retval SCI_SUCCESS This value is returned if the IO request was
  466  *         successfully built.
  467  * @retval SCI_FAILURE_UNSUPPORTED_PROTOCOL This value is returned if the
  468  *         remote_device does not support the STP protocol.
  469  * @retval SCI_FAILURE_INVALID_ASSOCIATION This value is returned if the
  470  *         user did not properly set the association between the SCIC IO
  471  *         request and the user's IO request.  Please refer to the
  472  *         sci_object_set_association() routine for more
  473  *         information.
  474  */
  475 SCI_STATUS scic_io_request_construct_basic_sata(
  476    SCI_IO_REQUEST_HANDLE_T  scic_io_request
  477 );
  478 
  479 /**
  480  * @brief This method is called by the SCI Core user to build an STP
  481  *        IO request.
  482  *
  483  * @pre
  484  *        - The user must have previously called scic_io_request_construct()
  485  *          on the supplied IO request.
  486  *
  487  * @param[in]  scic_io_request This parameter specifies the handle to the
  488  *             io request object to be built.
  489  *
  490  * @return Indicate if the controller successfully built the IO request.
  491  * @retval SCI_SUCCESS This value is returned if the IO request was
  492  *         successfully built.
  493  * @retval SCI_FAILURE_UNSUPPORTED_PROTOCOL This value is returned if the
  494  *         remote_device does not support the STP protocol.
  495  * @retval SCI_FAILURE_INVALID_ASSOCIATION This value is returned if the
  496  *         user did not properly set the association between the SCIC IO
  497  *         request and the user's IO request.  Please refer to the
  498  *         sci_object_set_association() routine for more
  499  *         information.
  500  */
  501 SCI_STATUS scic_io_request_construct_advanced_sata(
  502    SCI_IO_REQUEST_HANDLE_T     scic_io_request,
  503    SCIC_IO_SATA_PARAMETERS_T * io_parameters
  504 );
  505 
  506 #if !defined(DISABLE_PASS_THROUGH)
  507 
  508 /**
  509  * @brief This method is called by the SCI user to build an STP pass-through
  510  *        IO request.
  511  *
  512  * @pre
  513  *        - The user must have previously called scic_io_request_construct()
  514  *          on the supplied IO request.
  515  *
  516  * @param[in]  scic_io_request This parameter specifies the handle to the
  517  *             io request object to be built.
  518  *
  519  * @param[in]  passthru_cb This parameter specifies the pointer to the callback
  520  *             structure that contains the function pointers
  521  *
  522  * @return Indicate if the controller successfully built the IO request.
  523  */
  524 SCI_STATUS scic_io_request_construct_sata_pass_through(
  525    SCI_IO_REQUEST_HANDLE_T  scic_io_request,
  526    SCIC_STP_PASSTHRU_REQUEST_CALLBACKS_T *passthru_cb
  527 
  528 );
  529 
  530 #else // !defined(DISABLE_PASS_THROUGH)
  531 
  532 #define scic_io_request_construct_sata_pass_through(io, cb) SCI_FAILURE
  533 
  534 #endif // !defined(DISABLE_PASS_THROUGH)
  535 
  536 /**
  537  * @brief This method is called by the SCI user to build an SMP
  538  *        IO request.
  539  *
  540  * @pre
  541  *        - The user must have previously called scic_io_request_construct()
  542  *          on the supplied IO request.
  543  *
  544  * @param[in]  scic_io_request This parameter specifies the handle to the
  545  *             io request object to be built.
  546  *
  547  * @return Indicate if the controller successfully built the IO request.
  548  * @retval SCI_SUCCESS This value is returned if the IO request was
  549  *         successfully built.
  550  * @retval SCI_FAILURE_UNSUPPORTED_PROTOCOL This value is returned if the
  551  *         remote_device does not support the SMP protocol.
  552  * @retval SCI_FAILURE_INVALID_ASSOCIATION This value is returned if the
  553  *         user did not properly set the association between the SCIC IO
  554  *         request and the user's IO request.  Please refer to the
  555  *         sci_object_set_association() routine for more
  556  *         information.
  557  */
  558 SCI_STATUS scic_io_request_construct_smp(
  559    SCI_IO_REQUEST_HANDLE_T  scic_io_request
  560 );
  561 
  562 
  563 /**
  564  * @brief This method is called by the SCI user to build an SMP pass-through
  565  *        IO request.
  566  *
  567  * @pre
  568  *        - The user must have previously called scic_io_request_construct()
  569  *          on the supplied IO request.
  570  *
  571  * @param[in]  scic_smp_request This parameter specifies the handle to the
  572  *             io request object to be built.
  573  *
  574  * @param[in]  passthru_cb This parameter specifies the pointer to the callback
  575  *             structure that contains the function pointers
  576  *
  577  * @return Indicate if the controller successfully built the IO request.
  578  */
  579 SCI_STATUS scic_io_request_construct_smp_pass_through(
  580    SCI_IO_REQUEST_HANDLE_T  scic_smp_request,
  581    SCIC_SMP_PASSTHRU_REQUEST_CALLBACKS_T *passthru_cb
  582 );
  583 
  584 /**
  585  * @brief This method returns the controller specific IO/Task request status.
  586  *        These status values are unique to the specific controller being
  587  *        managed by the SCIC.
  588  *
  589  * @param[in]  io_request the handle to the IO or task management request
  590  *             object for which to retrieve the status.
  591  *
  592  * @return This method returns a value indicating the controller specific
  593  *         request status.
  594  */
  595 U32 scic_request_get_controller_status(
  596    SCI_IO_REQUEST_HANDLE_T  io_request
  597 );
  598 
  599 /**
  600  * @brief This method returns the user specific IO/Task request status.
  601  *
  602  * @param[in]  io_request the handle to the IO or task management request
  603  *             object for which to retrieve the status.
  604  *
  605  * @return This method returns a value indicating the user specific
  606  *         request status.
  607  */
  608 U32 scic_request_get_sci_status(
  609    SCI_IO_REQUEST_HANDLE_T  io_request
  610 );
  611 
  612 
  613 /**
  614  * @brief This method will return the address to the command information
  615  *        unit.
  616  *
  617  * @param[in]  scic_io_request This parameter specifies the handle to the
  618  *             io request object to be built.
  619  *
  620  * @return The address of the SSP/SMP command information unit.
  621  */
  622 void * scic_io_request_get_command_iu_address(
  623    SCI_IO_REQUEST_HANDLE_T  scic_io_request
  624 );
  625 
  626 /**
  627  * @brief This method will return the address to the response information
  628  *        unit.  For an SSP request this buffer is only valid if the IO
  629  *        request is completed with the status SCI_FAILURE_IO_RESPONSE_VALID.
  630  *
  631  * @param[in]  scic_io_request This parameter specifies the handle to the
  632  *             io request object to be built.
  633  *
  634  * @return The address of the SSP/SMP response information unit.
  635  */
  636 void * scic_io_request_get_response_iu_address(
  637    SCI_IO_REQUEST_HANDLE_T  scic_io_request
  638 );
  639 
  640 /**
  641  * @brief This method will return the IO tag utilized by the IO request.
  642  *
  643  * @param[in]  scic_io_request This parameter specifies the handle to the
  644  *             io request object for which to return the IO tag.
  645  *
  646  * @return An unsigned integer representing the IO tag being utilized.
  647  * @retval SCI_CONTROLLER_INVALID_IO_TAG This value is returned if the IO
  648  *         does not currently have an IO tag allocated to it.
  649  * @retval All return other values indicate a legitimate tag.
  650  */
  651 U16 scic_io_request_get_io_tag(
  652    SCI_IO_REQUEST_HANDLE_T  scic_io_request
  653 );
  654 
  655 /**
  656  * @brief This method will inform the user of the protocol with which
  657  *        the supplied IO request was created.
  658  *
  659  * @param[in]  scic_io_request This parameter specifies the IO request
  660  *             for which to retrieve the protocol.
  661  *
  662  * @return This method returns the transport protocol utilized for the
  663  *         the supplied request.  Please refer to SCIC_TRANSPORT_PROTOCOL
  664  *         for more information.
  665  */
  666 SCIC_TRANSPORT_PROTOCOL scic_io_request_get_protocol(
  667    SCI_IO_REQUEST_HANDLE_T  scic_io_request
  668 );
  669 
  670 /**
  671  * @brief This method will assign an NCQ tag to the io request object.  The
  672  *        caller of this function must make sure that only valid NCQ tags are
  673  *        assigned to the io request object.
  674  *
  675  * @param[in]  scic_io_request This parameter specifies the handle to the
  676  *             io request object to which to assign the ncq tag.
  677  * @param[in]  ncq_tag This parameter specifies the NCQ tag to be utilized
  678  *             for the supplied core IO request.  It is up to the user to make
  679  *             sure that this is a valid NCQ tag.
  680  *
  681  * @return none
  682  *
  683  * @note This function is only valid for SATA NCQ requests.
  684  */
  685 void scic_stp_io_request_set_ncq_tag(
  686    SCI_IO_REQUEST_HANDLE_T  scic_io_request,
  687    U16                      ncq_tag
  688 );
  689 
  690 /**
  691  * @brief This method will return the address of the host to device register
  692  *        fis region for the io request object.
  693  *
  694  * @param[in] scic_io_request This parameter specifies the handle to the io
  695  *       request object from which to get the host to device register fis
  696  *       buffer.
  697  *
  698  * @return The address of the host to device register fis buffer in the io
  699  *         request object.
  700  *
  701  * @note This function is only valid for SATA requests.
  702  */
  703 void * scic_stp_io_request_get_h2d_reg_address(
  704    SCI_IO_REQUEST_HANDLE_T  scic_io_request
  705 );
  706 
  707 /**
  708  * @brief This method will return the address of the device to host register
  709  *        fis region for the io request object.
  710  *
  711  * @param[in] scic_io_request This parameter specifies the handle to the io
  712  *       request object from which to get the device to host register fis
  713  *       buffer.
  714  *
  715  * @return The address fo the device to host register fis ending the io
  716  *         request.
  717  *
  718  * @note This function is only valid for SATA requests.
  719  */
  720 void * scic_stp_io_request_get_d2h_reg_address(
  721    SCI_IO_REQUEST_HANDLE_T  scic_io_request
  722 );
  723 
  724 /**
  725  * @brief This method will return the rx frame for the io request object that
  726  *        contains the given offset.
  727  *
  728  * @param[in] scic_io_request This parameter specifies the handle to the io
  729  *       request object which has received the frame data.
  730  * @param[in] offset This parameter specifies which frame is being requested.
  731  *
  732  * @return The return is a pointer to the frame buffer data.
  733  *
  734  * @note Frame buffers are only 1024 bytes in size.  Reading past the end of a
  735  *       frame will have unexpected results.
  736  */
  737 void * scic_io_request_get_rx_frame(
  738    SCI_IO_REQUEST_HANDLE_T  scic_io_request,
  739    U32                      offset
  740 );
  741 
  742 /**
  743  * @brief This method will return the number of bytes transferred from the SCU
  744  *
  745  * @param[in] scic_io_request This parameter specifies the handle to the io request
  746  *            whose data length was not eqaul to the data length specified in the request.
  747  *            When the driver gets an early io completion status from the hardware,
  748  *            this routine should be called to get the actual number of bytes transferred
  749  *
  750  * @return The return is the number of bytes transferred when the data legth is not equal to
  751  *         the specified length in the io request
  752  *
  753  */
  754 U32 scic_io_request_get_number_of_bytes_transferred (
  755    SCI_IO_REQUEST_HANDLE_T  scic_io_request
  756 );
  757 
  758 #ifdef __cplusplus
  759 }
  760 #endif // __cplusplus
  761 
  762 #endif // _SCIC_IO_REQUEST_H_
  763 

Cache object: 405260483f899103fe9099a3d658a10a


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.