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