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 (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 /* 23 * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27 #ifndef _SRPT_IOC_H 28 #define _SRPT_IOC_H 29 30 /* 31 * Prototypes and data structures specific to I/O Controller 32 * operation. 33 */ 34 35 #ifdef __cplusplus 36 extern "C" { 37 #endif 38 #include "srpt_impl.h" 39 40 int srpt_ioc_attach(); 41 void srpt_ioc_detach(); 42 void srpt_ioc_init_profile(srpt_ioc_t *ioc); 43 ibt_status_t srpt_ioc_svc_bind(srpt_target_port_t *tgt, uint_t portnum); 44 void srpt_ioc_svc_unbind(srpt_target_port_t *tgt, uint_t portnum); 45 void srpt_ioc_svc_unbind_all(srpt_target_port_t *tgt); 46 47 srpt_ioc_t *srpt_ioc_get_locked(ib_guid_t guid); 48 srpt_ioc_t *srpt_ioc_get(ib_guid_t guid); 49 50 ibt_status_t srpt_ioc_post_recv_iu(srpt_ioc_t *ioc, srpt_iu_t *iu); 51 void srpt_ioc_repost_recv_iu(srpt_ioc_t *ioc, srpt_iu_t *iu); 52 53 stmf_data_buf_t *srpt_ioc_ds_alloc_dbuf(struct scsi_task *task, 54 uint32_t size, uint32_t *pminsize, uint32_t flags); 55 void srpt_ioc_ds_free_dbuf(struct stmf_dbuf_store *ds, 56 stmf_data_buf_t *dbuf); 57 58 #ifdef __cplusplus 59 } 60 #endif 61 62 #endif /* _SRPT_IOC_H */ 63