device.h revision 4c06356b0f0fffb4fc1b6eccc8e5d8e2254a84d6
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * CDDL HEADER START
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * The contents of this file are subject to the terms of the
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * Common Development and Distribution License (the "License").
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * You may not use this file except in compliance with the License.
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * See the License for the specific language governing permissions
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * and limitations under the License.
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * When distributing Covered Code, include this CDDL HEADER in each
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * If applicable, add the following below this CDDL HEADER, with the
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * fields enclosed by brackets "[]" replaced with your own identifying
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * information: Portions Copyright [yyyy] [name of copyright owner]
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * CDDL HEADER END
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * Use is subject to license terms.
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * SCSI device structure.
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * All SCSI target drivers will have one of these per target/lun/sfunc.
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * It is allocated and initialized by the framework SCSA HBA nexus code
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * for each SCSI target dev_info_t node during HBA nexus DDI_CTLOPS_INITCHILD
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * processing of a child device node just prior to tran_tgt_init(9E). A
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * pointer the the scsi_device(9S) structure is stored in the
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * driver-private data field of the target device's dev_info_t node (in
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * 'devi_driver_data') and can be retrieved by ddi_get_driver_private(9F).
25cf1a301a396c38e8adf52c15f537b80d2483f7jlextern "C" {
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * Routing information for a SCSI device (target/lun/sfunc).
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * The scsi_address(9S) structure contains a pointer to the
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * scsi_hba_tran(9S) of the transport.
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * For devices below an HBA that uses SCSI_HBA_ADDR_SPI
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * unit-addressing, the scsi_address(9S) information contains
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * decoded target/lun addressing information.
a192e900f6d2b0e1a822e3252c0dfd795ed49d76amaguire * For devices below an HBA that uses SCSI_HBA_ADDR_COMPLEX
* its private per-unit-address/per-scsi_device information using
void *sd_hba_private;
* The inquiry data is allocated/refreshed by scsi_probe/scsi_slave
void *sd_private;
int sd_fm_capable;
void *sd_pathinfo;
int sd_uninit_prevent;
* scsi_hba.c code trust that the 'sd_address.a_hba_tran' established
* in scsi_confsubr.c.
#ifdef SCSI_SIZE_CLEAN_VERIFY
#ifdef _KERNEL
#ifdef __cplusplus