1139743Simp/*- 239212Sgibbs * Data structures and definitions for dealing with the 339212Sgibbs * Common Access Method Transport (xpt) layer. 439212Sgibbs * 539212Sgibbs * Copyright (c) 1997 Justin T. Gibbs. 639212Sgibbs * All rights reserved. 739212Sgibbs * 839212Sgibbs * Redistribution and use in source and binary forms, with or without 939212Sgibbs * modification, are permitted provided that the following conditions 1039212Sgibbs * are met: 1139212Sgibbs * 1. Redistributions of source code must retain the above copyright 1239212Sgibbs * notice, this list of conditions, and the following disclaimer, 1339212Sgibbs * without modification, immediately at the beginning of the file. 1439212Sgibbs * 2. The name of the author may not be used to endorse or promote products 1539212Sgibbs * derived from this software without specific prior written permission. 1639212Sgibbs * 1739212Sgibbs * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1839212Sgibbs * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1939212Sgibbs * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2039212Sgibbs * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR 2139212Sgibbs * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2239212Sgibbs * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2339212Sgibbs * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2439212Sgibbs * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2539212Sgibbs * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2639212Sgibbs * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2739212Sgibbs * SUCH DAMAGE. 2839212Sgibbs * 2950477Speter * $FreeBSD$ 3039212Sgibbs */ 3139212Sgibbs 3239212Sgibbs#ifndef _CAM_CAM_XPT_SIM_H 3339212Sgibbs#define _CAM_CAM_XPT_SIM_H 1 3439212Sgibbs 3539212Sgibbs#include <cam/cam_xpt.h> 3639212Sgibbs#include <cam/cam_queue.h> 3739212Sgibbs 3839212Sgibbs/* Functions accessed by SIM drivers */ 3955206Speter#ifdef _KERNEL 40170872Sscottlint32_t xpt_bus_register(struct cam_sim *sim, device_t parent, 41170872Sscottl u_int32_t bus); 4255995Sgibbsint32_t xpt_bus_deregister(path_id_t path_id); 4339212Sgibbsu_int32_t xpt_freeze_simq(struct cam_sim *sim, u_int count); 4439212Sgibbsvoid xpt_release_simq(struct cam_sim *sim, int run_queue); 4539212Sgibbsu_int32_t xpt_freeze_devq(struct cam_path *path, u_int count); 46203108Smavvoid xpt_release_devq(struct cam_path *path, 47203108Smav u_int count, int run_queue); 4844501Sgibbsvoid xpt_done(union ccb *done_ccb); 49260387Sscottlvoid xpt_done_direct(union ccb *done_ccb); 5055206Speter#endif 5139212Sgibbs 5239212Sgibbs#endif /* _CAM_CAM_XPT_SIM_H */ 5339212Sgibbs 54