1/*
2 * Copyright (c) 1997 Justin T. Gibbs.
3 * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 Kenneth D. Merry.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
--- 10 unchanged lines hidden (view full) ---
19 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
27 * $FreeBSD: head/sys/cam/scsi/scsi_cd.c 111206 2003-02-21 06:19:38Z ken $
28 */
29/*
30 * Portions of this driver taken from the original FreeBSD cd driver.
31 * Written by Julian Elischer (julian@tfs.com)
32 * for TRW Financial Systems for use under the MACH(2.5) operating system.
33 *
34 * TRW Financial Systems, in accordance with their agreement with Carnegie
35 * Mellon University, makes this software available to CMU to distribute
--- 247 unchanged lines hidden (view full) ---
283{
284 cdinit, "cd",
285 TAILQ_HEAD_INITIALIZER(cddriver.units), /* generation */ 0
286};
287
288PERIPHDRIVER_DECLARE(cd, cddriver);
289
290static struct cdevsw cd_cdevsw = {
291 /* open */ cdopen,
292 /* close */ cdclose,
293 /* read */ physread,
294 /* write */ physwrite,
295 /* ioctl */ cdioctl,
296 /* poll */ nopoll,
297 /* mmap */ nommap,
298 /* strategy */ cdstrategy,
299 /* name */ "cd",
300 /* maj */ CD_CDEV_MAJOR,
301 /* dump */ nodump,
302 /* psize */ nopsize,
303 /* flags */ D_DISK,
304};
305
306static int num_changers;
307
308#ifndef CHANGER_MIN_BUSY_SECONDS
309#define CHANGER_MIN_BUSY_SECONDS 5
310#endif
311#ifndef CHANGER_MAX_BUSY_SECONDS
--- 3903 unchanged lines hidden ---
2 * Copyright (c) 1997 Justin T. Gibbs.
3 * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003 Kenneth D. Merry.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
--- 10 unchanged lines hidden (view full) ---
19 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
27 * $FreeBSD: head/sys/cam/scsi/scsi_cd.c 111206 2003-02-21 06:19:38Z ken $
28 */
29/*
30 * Portions of this driver taken from the original FreeBSD cd driver.
31 * Written by Julian Elischer (julian@tfs.com)
32 * for TRW Financial Systems for use under the MACH(2.5) operating system.
33 *
34 * TRW Financial Systems, in accordance with their agreement with Carnegie
35 * Mellon University, makes this software available to CMU to distribute
--- 247 unchanged lines hidden (view full) ---
283{
284 cdinit, "cd",
285 TAILQ_HEAD_INITIALIZER(cddriver.units), /* generation */ 0
286};
287
288PERIPHDRIVER_DECLARE(cd, cddriver);
289
290static struct cdevsw cd_cdevsw = {
291 /* open */ cdopen,
292 /* close */ cdclose,
293 /* read */ physread,
294 /* write */ physwrite,
295 /* ioctl */ cdioctl,
296 /* poll */ nopoll,
297 /* mmap */ nommap,
298 /* strategy */ cdstrategy,
299 /* name */ "cd",
300 /* maj */ CD_CDEV_MAJOR,
301 /* dump */ nodump,
302 /* psize */ nopsize,
303 /* flags */ D_DISK,
304};
305
306static int num_changers;
307
308#ifndef CHANGER_MIN_BUSY_SECONDS
309#define CHANGER_MIN_BUSY_SECONDS 5
310#endif
311#ifndef CHANGER_MAX_BUSY_SECONDS
--- 3903 unchanged lines hidden ---