cam_xpt_periph.h revision 50477
139212Sgibbs /* 239212Sgibbs * Data structures and definitions for dealing with the 339212Sgibbs * Common Access Method Transport (xpt) layer from peripheral 439212Sgibbs * drivers. 539212Sgibbs * 639212Sgibbs * Copyright (c) 1997 Justin T. Gibbs. 739212Sgibbs * All rights reserved. 839212Sgibbs * 939212Sgibbs * Redistribution and use in source and binary forms, with or without 1039212Sgibbs * modification, are permitted provided that the following conditions 1139212Sgibbs * are met: 1239212Sgibbs * 1. Redistributions of source code must retain the above copyright 1339212Sgibbs * notice, this list of conditions, and the following disclaimer, 1439212Sgibbs * without modification, immediately at the beginning of the file. 1539212Sgibbs * 2. The name of the author may not be used to endorse or promote products 1639212Sgibbs * derived from this software without specific prior written permission. 1739212Sgibbs * 1839212Sgibbs * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1939212Sgibbs * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2039212Sgibbs * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2139212Sgibbs * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR 2239212Sgibbs * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2339212Sgibbs * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2439212Sgibbs * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2539212Sgibbs * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2639212Sgibbs * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2739212Sgibbs * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2839212Sgibbs * SUCH DAMAGE. 2939212Sgibbs * 3050477Speter * $FreeBSD: head/sys/cam/cam_xpt_periph.h 50477 1999-08-28 01:08:13Z peter $ 3139212Sgibbs */ 3239212Sgibbs 3339212Sgibbs#ifndef _CAM_CAM_XPT_PERIPH_H 3439212Sgibbs#define _CAM_CAM_XPT_PERIPH_H 1 3539212Sgibbs 3639212Sgibbs#include <cam/cam_xpt.h> 3739212Sgibbs 3839212Sgibbs/* Functions accessed by the peripheral drivers */ 3939212Sgibbs#ifdef KERNEL 4039212Sgibbsvoid xpt_polled_action(union ccb *ccb); 4139212Sgibbsunion ccb *xpt_alloc_ccb(void); 4239212Sgibbsvoid xpt_free_ccb(union ccb *free_ccb); 4339212Sgibbsvoid xpt_release_ccb(union ccb *released_ccb); 4439212Sgibbsvoid xpt_schedule(struct cam_periph *perph, u_int32_t new_priority); 4539212Sgibbsint32_t xpt_add_periph(struct cam_periph *periph); 4639212Sgibbsvoid xpt_remove_periph(struct cam_periph *periph); 4739212Sgibbsvoid xpt_announce_periph(struct cam_periph *periph, 4839212Sgibbs char *announce_string); 4939212Sgibbs#endif /* KERNEL */ 5039212Sgibbs 5139212Sgibbs#endif /* _CAM_CAM_XPT_PERIPH_H */ 52