1/* 2 * Implementation of SCSI Processor Target Peripheral driver for CAM. 3 * 4 * Copyright (c) 1998 Justin T. Gibbs. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 11 unchanged lines hidden (view full) --- 20 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * |
28 * $FreeBSD: head/sys/cam/scsi/scsi_pt.c 111815 2003-03-03 12:15:54Z phk $ |
29 */ 30 31#include <sys/param.h> 32#include <sys/queue.h> 33#include <sys/systm.h> 34#include <sys/kernel.h> 35#include <sys/types.h> 36#include <sys/bio.h> --- 76 unchanged lines hidden (view full) --- 113 TAILQ_HEAD_INITIALIZER(ptdriver.units), /* generation */ 0 114}; 115 116PERIPHDRIVER_DECLARE(pt, ptdriver); 117 118#define PT_CDEV_MAJOR 61 119 120static struct cdevsw pt_cdevsw = { |
121 .d_open = ptopen, 122 .d_close = ptclose, 123 .d_read = physread, 124 .d_write = physwrite, 125 .d_ioctl = ptioctl, 126 .d_strategy = ptstrategy, 127 .d_name = "pt", 128 .d_maj = PT_CDEV_MAJOR, |
129}; 130 131#ifndef SCSI_PT_DEFAULT_TIMEOUT 132#define SCSI_PT_DEFAULT_TIMEOUT 60 133#endif 134 135static int 136ptopen(dev_t dev, int flags, int fmt, struct thread *td) --- 596 unchanged lines hidden --- |