Print this page
4888 Undocument dma_req(9s)
4884 EOF scsi_hba_attach
4886 EOF ddi_dmae_getlim
4887 EOF ddi_iomin
4634 undocument scsi_hba_attach() and ddi_dma_lim(9s)
4630 clean stale references to ddi_iopb_alloc and ddi_iopb_free


   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  */



  25 
  26 /*
  27  * SCSI device structure.
  28  *
  29  * All SCSI target drivers will have one of these per target/lun/sfunc.
  30  * It is allocated and initialized by the framework SCSA HBA nexus code
  31  * for each SCSI target dev_info_t node during HBA nexus DDI_CTLOPS_INITCHILD
  32  * processing of a child device node just prior to tran_tgt_init(9E).  A
  33  * pointer the the scsi_device(9S) structure is stored in the
  34  * driver-private data field of the target device's dev_info_t node (in
  35  * 'devi_driver_data') and can be retrieved by ddi_get_driver_private(9F).
  36  */
  37 #ifndef _SYS_SCSI_CONF_DEVICE_H
  38 #define _SYS_SCSI_CONF_DEVICE_H
  39 
  40 #include <sys/scsi/scsi_types.h>
  41 
  42 #ifdef  __cplusplus
  43 extern "C" {
  44 #endif


  82 
  83         /*
  84          * SCSA private: use is associated with implementation of
  85          * SCSI_HBA_ADDR_COMPLEX scsi_device_hba_private_[gs]et(9F).
  86          * The HBA driver can store a pointer to per-scsi_device(9S)
  87          * HBA private data during its tran_tgt_init(9E) implementation
  88          * by calling scsi_device_hba_private_set(9F), and free that
  89          * pointer during tran_tgt_fini(9E). At tran_send(9E) time, the
  90          * HBA driver can use scsi_address_device(9F) to obtain a pointer
  91          * to the scsi_device(9S) structure, and then gain access to
  92          * its per-scsi_device(9S) hba private data by calling
  93          * scsi_device_hba_private_get(9F).
  94          */
  95         void                    *sd_hba_private;
  96 
  97         /*
  98          * If scsi_slave is used to probe out this device, a scsi_inquiry data
  99          * structure will be allocated and an INQUIRY command will be run to
 100          * fill it in.
 101          *
 102          * The allocation will be done via ddi_iopb_alloc, so any manual
 103          * freeing may be done by ddi_iopb_free.
 104          *
 105          * The inquiry data is allocated/refreshed by scsi_probe/scsi_slave
 106          * and freed by uninitchild (inquiry data is no longer freed by
 107          * scsi_unprobe/scsi_unslave).
 108          *
 109          * NOTE: Additional device identity information may be available
 110          * as properties of sd_dev.
 111          */
 112         struct scsi_inquiry     *sd_inq;
 113 
 114         /*
 115          * Place to point to an extended request sense buffer.
 116          * The target driver is responsible for managing this.
 117          */
 118         struct scsi_extended_sense      *sd_sense;
 119 
 120         /*
 121          * Target driver 'private' information. Typically a pointer to target
 122          * driver private ddi_soft_state(9F) information for the device.  This
 123          * information is typically established in target driver attach(9E),
 124          * and freed in the target driver detach(9E).




   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  */
  25 /*
  26  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  27  */
  28 
  29 /*
  30  * SCSI device structure.
  31  *
  32  * All SCSI target drivers will have one of these per target/lun/sfunc.
  33  * It is allocated and initialized by the framework SCSA HBA nexus code
  34  * for each SCSI target dev_info_t node during HBA nexus DDI_CTLOPS_INITCHILD
  35  * processing of a child device node just prior to tran_tgt_init(9E).  A
  36  * pointer the the scsi_device(9S) structure is stored in the
  37  * driver-private data field of the target device's dev_info_t node (in
  38  * 'devi_driver_data') and can be retrieved by ddi_get_driver_private(9F).
  39  */
  40 #ifndef _SYS_SCSI_CONF_DEVICE_H
  41 #define _SYS_SCSI_CONF_DEVICE_H
  42 
  43 #include <sys/scsi/scsi_types.h>
  44 
  45 #ifdef  __cplusplus
  46 extern "C" {
  47 #endif


  85 
  86         /*
  87          * SCSA private: use is associated with implementation of
  88          * SCSI_HBA_ADDR_COMPLEX scsi_device_hba_private_[gs]et(9F).
  89          * The HBA driver can store a pointer to per-scsi_device(9S)
  90          * HBA private data during its tran_tgt_init(9E) implementation
  91          * by calling scsi_device_hba_private_set(9F), and free that
  92          * pointer during tran_tgt_fini(9E). At tran_send(9E) time, the
  93          * HBA driver can use scsi_address_device(9F) to obtain a pointer
  94          * to the scsi_device(9S) structure, and then gain access to
  95          * its per-scsi_device(9S) hba private data by calling
  96          * scsi_device_hba_private_get(9F).
  97          */
  98         void                    *sd_hba_private;
  99 
 100         /*
 101          * If scsi_slave is used to probe out this device, a scsi_inquiry data
 102          * structure will be allocated and an INQUIRY command will be run to
 103          * fill it in.
 104          *



 105          * The inquiry data is allocated/refreshed by scsi_probe/scsi_slave
 106          * and freed by uninitchild (inquiry data is no longer freed by
 107          * scsi_unprobe/scsi_unslave).
 108          *
 109          * NOTE: Additional device identity information may be available
 110          * as properties of sd_dev.
 111          */
 112         struct scsi_inquiry     *sd_inq;
 113 
 114         /*
 115          * Place to point to an extended request sense buffer.
 116          * The target driver is responsible for managing this.
 117          */
 118         struct scsi_extended_sense      *sd_sense;
 119 
 120         /*
 121          * Target driver 'private' information. Typically a pointer to target
 122          * driver private ddi_soft_state(9F) information for the device.  This
 123          * information is typically established in target driver attach(9E),
 124          * and freed in the target driver detach(9E).