3 *
4 * The contents of this file are subject to the terms of the
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 (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved.
23 */
24
25 #ifndef _SYS_SCSI_IMPL_TRANSPORT_H
26 #define _SYS_SCSI_IMPL_TRANSPORT_H
27
28 /*
29 * Include the loadable module wrapper.
30 */
31 #include <sys/modctl.h>
32 #include <sys/note.h>
33
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 #ifdef _KERNEL
39
40 /*
41 * Opaque handles to address maps
42 */
336 *
337 * All these functions are public interfaces, with the
338 * exception of:
339 * interface called by
340 * scsi_initialize_hba_interface() _init() of scsi module
341 * scsi_uninitialize_hba_interface() _fini() of scsi module
342 */
343
344 void scsi_initialize_hba_interface(void);
345
346 #ifdef NO_SCSI_FINI_YET
347 void scsi_uninitialize_hba_interface(void);
348 #endif /* NO_SCSI_FINI_YET */
349
350 int scsi_hba_init(
351 struct modlinkage *modlp);
352
353 void scsi_hba_fini(
354 struct modlinkage *modlp);
355
356 int scsi_hba_attach(
357 dev_info_t *hba_dip,
358 ddi_dma_lim_t *hba_lim,
359 scsi_hba_tran_t *tran,
360 int flags,
361 void *hba_options);
362
363 int scsi_hba_attach_setup(
364 dev_info_t *hba_dip,
365 ddi_dma_attr_t *hba_dma_attr,
366 scsi_hba_tran_t *tran,
367 int flags);
368
369 int scsi_hba_detach(
370 dev_info_t *hba_dip);
371
372 scsi_hba_tran_t *scsi_hba_tran_alloc(
373 dev_info_t *hba_dip,
374 int flags);
375
376 int scsi_tran_ext_alloc(
377 scsi_hba_tran_t *tran,
378 size_t length,
379 int flags);
380
381 void scsi_tran_ext_free(
382 scsi_hba_tran_t *tran,
|
3 *
4 * The contents of this file are subject to the terms of the
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 (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved.
23 * Copyright 2014 Garrett D'Amore <garrett@damore.org>
24 */
25
26 #ifndef _SYS_SCSI_IMPL_TRANSPORT_H
27 #define _SYS_SCSI_IMPL_TRANSPORT_H
28
29 /*
30 * Include the loadable module wrapper.
31 */
32 #include <sys/modctl.h>
33 #include <sys/note.h>
34
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39 #ifdef _KERNEL
40
41 /*
42 * Opaque handles to address maps
43 */
337 *
338 * All these functions are public interfaces, with the
339 * exception of:
340 * interface called by
341 * scsi_initialize_hba_interface() _init() of scsi module
342 * scsi_uninitialize_hba_interface() _fini() of scsi module
343 */
344
345 void scsi_initialize_hba_interface(void);
346
347 #ifdef NO_SCSI_FINI_YET
348 void scsi_uninitialize_hba_interface(void);
349 #endif /* NO_SCSI_FINI_YET */
350
351 int scsi_hba_init(
352 struct modlinkage *modlp);
353
354 void scsi_hba_fini(
355 struct modlinkage *modlp);
356
357 int scsi_hba_attach_setup(
358 dev_info_t *hba_dip,
359 ddi_dma_attr_t *hba_dma_attr,
360 scsi_hba_tran_t *tran,
361 int flags);
362
363 int scsi_hba_detach(
364 dev_info_t *hba_dip);
365
366 scsi_hba_tran_t *scsi_hba_tran_alloc(
367 dev_info_t *hba_dip,
368 int flags);
369
370 int scsi_tran_ext_alloc(
371 scsi_hba_tran_t *tran,
372 size_t length,
373 int flags);
374
375 void scsi_tran_ext_free(
376 scsi_hba_tran_t *tran,
|