xref: /titanic_50/usr/src/uts/common/sys/scsi/scsi_address.h (revision 8eea8e29cc4374d1ee24c25a07f45af132db3499)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright (c) 1996-1998 by Sun Microsystems, Inc.
24  * All rights reserved.
25  */
26 
27 #ifndef	_SYS_SCSI_SCSI_ADDRESS_H
28 #define	_SYS_SCSI_SCSI_ADDRESS_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #include <sys/scsi/scsi_types.h>
33 
34 #ifdef	__cplusplus
35 extern "C" {
36 #endif
37 
38 /*
39  * SCSI address definition.
40  *
41  *	A target driver instance controls a target/lun instance.
42  *	It sends the command to the device instance it controls.
43  * 	In generic case	HBA driver maintains the target/lun information
44  *	in the cloned transport structure pointed to by a_hba_tran field.
45  *	This is the only way SCSI-3 devices will work.
46  *
47  *	a_target and a_lun fields are for compatibility with SCSI-2.
48  *	They are not defined in SCSI-3 and target driver should use
49  *	scsi_get_addr(9F) to get the target/lun information.
50  *
51  *	a_sublun was never used and was never part of DDI (scsi_address(9S)).
52  */
53 struct scsi_address {
54 	struct scsi_hba_tran	*a_hba_tran;	/* Transport vectors */
55 	ushort_t		a_target;	/* Target identifier */
56 	uchar_t			a_lun;		/* Lun on that Target */
57 	uchar_t			a_sublun;	/* Sublun on that Lun */
58 						/* Not used */
59 };
60 
61 #ifdef	__cplusplus
62 }
63 #endif
64 
65 #endif	/* _SYS_SCSI_SCSI_ADDRESS_H */
66