1898b0535SWarner Losh /*- 28b8a9b1dSJustin T. Gibbs * Data structures and definitions for dealing with the 38b8a9b1dSJustin T. Gibbs * Common Access Method Transport (xpt) layer. 48b8a9b1dSJustin T. Gibbs * 58b8a9b1dSJustin T. Gibbs * Copyright (c) 1997 Justin T. Gibbs. 68b8a9b1dSJustin T. Gibbs * All rights reserved. 78b8a9b1dSJustin T. Gibbs * 88b8a9b1dSJustin T. Gibbs * Redistribution and use in source and binary forms, with or without 98b8a9b1dSJustin T. Gibbs * modification, are permitted provided that the following conditions 108b8a9b1dSJustin T. Gibbs * are met: 118b8a9b1dSJustin T. Gibbs * 1. Redistributions of source code must retain the above copyright 128b8a9b1dSJustin T. Gibbs * notice, this list of conditions, and the following disclaimer, 138b8a9b1dSJustin T. Gibbs * without modification, immediately at the beginning of the file. 148b8a9b1dSJustin T. Gibbs * 2. The name of the author may not be used to endorse or promote products 158b8a9b1dSJustin T. Gibbs * derived from this software without specific prior written permission. 168b8a9b1dSJustin T. Gibbs * 178b8a9b1dSJustin T. Gibbs * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 188b8a9b1dSJustin T. Gibbs * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 198b8a9b1dSJustin T. Gibbs * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 208b8a9b1dSJustin T. Gibbs * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR 218b8a9b1dSJustin T. Gibbs * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 228b8a9b1dSJustin T. Gibbs * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 238b8a9b1dSJustin T. Gibbs * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 248b8a9b1dSJustin T. Gibbs * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 258b8a9b1dSJustin T. Gibbs * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 268b8a9b1dSJustin T. Gibbs * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 278b8a9b1dSJustin T. Gibbs * SUCH DAMAGE. 288b8a9b1dSJustin T. Gibbs * 29c3aac50fSPeter Wemm * $FreeBSD$ 308b8a9b1dSJustin T. Gibbs */ 318b8a9b1dSJustin T. Gibbs 328b8a9b1dSJustin T. Gibbs #ifndef _CAM_CAM_XPT_SIM_H 338b8a9b1dSJustin T. Gibbs #define _CAM_CAM_XPT_SIM_H 1 348b8a9b1dSJustin T. Gibbs 358b8a9b1dSJustin T. Gibbs #include <cam/cam_xpt.h> 368b8a9b1dSJustin T. Gibbs #include <cam/cam_queue.h> 378b8a9b1dSJustin T. Gibbs 388b8a9b1dSJustin T. Gibbs /* Functions accessed by SIM drivers */ 39c4473420SPeter Wemm #ifdef _KERNEL 40b50569b7SScott Long int32_t xpt_bus_register(struct cam_sim *sim, device_t parent, 41b50569b7SScott Long u_int32_t bus); 42434bbf6eSJustin T. Gibbs int32_t xpt_bus_deregister(path_id_t path_id); 438b8a9b1dSJustin T. Gibbs u_int32_t xpt_freeze_simq(struct cam_sim *sim, u_int count); 448b8a9b1dSJustin T. Gibbs void xpt_release_simq(struct cam_sim *sim, int run_queue); 458b8a9b1dSJustin T. Gibbs u_int32_t xpt_freeze_devq(struct cam_path *path, u_int count); 4683c5d981SAlexander Motin u_int32_t xpt_freeze_devq_rl(struct cam_path *path, cam_rl rl, 4783c5d981SAlexander Motin u_int count); 4883c5d981SAlexander Motin void xpt_release_devq(struct cam_path *path, 4983c5d981SAlexander Motin u_int count, int run_queue); 5083c5d981SAlexander Motin void xpt_release_devq_rl(struct cam_path *path, cam_rl rl, 5183c5d981SAlexander Motin u_int count, int run_queue); 5202caf36eSEdward Tomasz Napierala int xpt_sim_opened(struct cam_sim *sim); 53d1dc9ab1SJustin T. Gibbs void xpt_done(union ccb *done_ccb); 54c4473420SPeter Wemm #endif 558b8a9b1dSJustin T. Gibbs 568b8a9b1dSJustin T. Gibbs #endif /* _CAM_CAM_XPT_SIM_H */ 578b8a9b1dSJustin T. Gibbs 58