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 * 54d846d26SWarner Losh * SPDX-License-Identifier: BSD-2-Clause 6bec9534dSPedro F. Giffuni * 78b8a9b1dSJustin T. Gibbs * Copyright (c) 1997 Justin T. Gibbs. 88b8a9b1dSJustin T. Gibbs * All rights reserved. 98b8a9b1dSJustin T. Gibbs * 108b8a9b1dSJustin T. Gibbs * Redistribution and use in source and binary forms, with or without 118b8a9b1dSJustin T. Gibbs * modification, are permitted provided that the following conditions 128b8a9b1dSJustin T. Gibbs * are met: 138b8a9b1dSJustin T. Gibbs * 1. Redistributions of source code must retain the above copyright 148b8a9b1dSJustin T. Gibbs * notice, this list of conditions, and the following disclaimer, 158b8a9b1dSJustin T. Gibbs * without modification, immediately at the beginning of the file. 168b8a9b1dSJustin T. Gibbs * 2. The name of the author may not be used to endorse or promote products 178b8a9b1dSJustin T. Gibbs * derived from this software without specific prior written permission. 188b8a9b1dSJustin T. Gibbs * 198b8a9b1dSJustin T. Gibbs * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 208b8a9b1dSJustin T. Gibbs * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 218b8a9b1dSJustin T. Gibbs * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 228b8a9b1dSJustin T. Gibbs * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR 238b8a9b1dSJustin T. Gibbs * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 248b8a9b1dSJustin T. Gibbs * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 258b8a9b1dSJustin T. Gibbs * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 268b8a9b1dSJustin T. Gibbs * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 278b8a9b1dSJustin T. Gibbs * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 288b8a9b1dSJustin T. Gibbs * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 298b8a9b1dSJustin T. Gibbs * SUCH DAMAGE. 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 4030f8afd0SWarner Losh int xpt_bus_register(struct cam_sim *sim, device_t parent, 4130f8afd0SWarner Losh uint32_t bus); 4230f8afd0SWarner Losh int xpt_bus_deregister(path_id_t path_id); 43*7af2f2c8SWarner Losh uint32_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); 45*7af2f2c8SWarner Losh uint32_t xpt_freeze_devq(struct cam_path *path, u_int count); 4683c5d981SAlexander Motin void xpt_release_devq(struct cam_path *path, 4783c5d981SAlexander Motin u_int count, int run_queue); 48d1dc9ab1SJustin T. Gibbs void xpt_done(union ccb *done_ccb); 49227d67aaSAlexander Motin void xpt_done_direct(union ccb *done_ccb); 50c4473420SPeter Wemm #endif 518b8a9b1dSJustin T. Gibbs 528b8a9b1dSJustin T. Gibbs #endif /* _CAM_CAM_XPT_SIM_H */ 53