xref: /onnv-gate/usr/src/uts/intel/io/dktp/hba/ghd/ghd_scsa.h (revision 1709:39a1331cb1e3)
1*1709Smlf /*
2*1709Smlf  * CDDL HEADER START
3*1709Smlf  *
4*1709Smlf  * The contents of this file are subject to the terms of the
5*1709Smlf  * Common Development and Distribution License (the "License").
6*1709Smlf  * You may not use this file except in compliance with the License.
7*1709Smlf  *
8*1709Smlf  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*1709Smlf  * or http://www.opensolaris.org/os/licensing.
10*1709Smlf  * See the License for the specific language governing permissions
11*1709Smlf  * and limitations under the License.
12*1709Smlf  *
13*1709Smlf  * When distributing Covered Code, include this CDDL HEADER in each
14*1709Smlf  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*1709Smlf  * If applicable, add the following below this CDDL HEADER, with the
16*1709Smlf  * fields enclosed by brackets "[]" replaced with your own identifying
17*1709Smlf  * information: Portions Copyright [yyyy] [name of copyright owner]
18*1709Smlf  *
19*1709Smlf  * CDDL HEADER END
20*1709Smlf  */
21*1709Smlf /*
22*1709Smlf  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
23*1709Smlf  * Use is subject to license terms.
24*1709Smlf  */
25*1709Smlf 
26*1709Smlf #ifndef _GHD_SCSA_H
27*1709Smlf #define	_GHD_SCSA_H
28*1709Smlf 
29*1709Smlf #pragma ident	"%Z%%M%	%I%	%E% SMI"
30*1709Smlf 
31*1709Smlf #ifdef	__cplusplus
32*1709Smlf extern "C" {
33*1709Smlf #endif
34*1709Smlf 
35*1709Smlf 
36*1709Smlf #include <sys/ddi.h>
37*1709Smlf #include <sys/sunddi.h>
38*1709Smlf #include <sys/scsi/scsi.h>
39*1709Smlf 
40*1709Smlf /*
41*1709Smlf  * This really belongs in some sort of scsa include file since
42*1709Smlf  * it's used by the getcap/setcap interface.
43*1709Smlf  */
44*1709Smlf #define	HBA_SETGEOM(hd, sec) (((hd) << 16) | (sec))
45*1709Smlf 
46*1709Smlf 
47*1709Smlf void		 ghd_tran_sync_pkt(struct scsi_address *ap,
48*1709Smlf 			struct scsi_pkt *pktp);
49*1709Smlf 
50*1709Smlf void		 ghd_pktfree(ccc_t *cccp, struct scsi_address *ap,
51*1709Smlf 			struct scsi_pkt *pktp);
52*1709Smlf 
53*1709Smlf struct scsi_pkt *ghd_tran_init_pkt_attr(ccc_t *cccp, struct scsi_address *ap,
54*1709Smlf 			struct scsi_pkt *pktp, struct buf *bp,
55*1709Smlf 			int cmdlen, int statuslen, int tgtlen,
56*1709Smlf 			int flags, int (*callback)(),
57*1709Smlf 			caddr_t arg, int ccblen,
58*1709Smlf 			ddi_dma_attr_t *sg_attrp);
59*1709Smlf 
60*1709Smlf #ifdef	__cplusplus
61*1709Smlf }
62*1709Smlf #endif
63*1709Smlf 
64*1709Smlf #endif /* _GHD_SCSA_H */
65