ifq: Factor out if_classq from altq_classq and use it for default ifq.
[dragonfly.git] / sys / bus / cam / scsi / scsi_low_pisa.c
blob0fd2b83e0fb83d3e78f210dc14fcbbd6af8f1a4f
1 /* $FreeBSD: src/sys/cam/scsi/scsi_low_pisa.c,v 1.2.2.4 2001/12/17 13:30:20 non Exp $ */
2 /* $DragonFly: src/sys/bus/cam/scsi/scsi_low_pisa.c,v 1.6 2005/12/05 03:42:31 swildner Exp $ */
3 /* $NecBSD: scsi_low_pisa.c,v 1.13 1998/11/26 14:26:11 honda Exp $ */
4 /* $NetBSD$ */
6 /*
7 * [NetBSD for NEC PC-98 series]
8 * Copyright (c) 1995, 1996, 1997, 1998
9 * NetBSD/pc98 porting staff. All rights reserved.
10 * Copyright (c) 1995, 1996, 1997, 1998
11 * Naofumi HONDA. All rights reserved.
13 * Redistribution and use in source and binary forms, with or without
14 * modification, are permitted provided that the following conditions
15 * are met:
16 * 1. Redistributions of source code must retain the above copyright
17 * notice, this list of conditions and the following disclaimer.
18 * 2. Redistributions in binary form must reproduce the above copyright
19 * notice, this list of conditions and the following disclaimer in the
20 * documentation and/or other materials provided with the distribution.
21 * 3. The name of the author may not be used to endorse or promote products
22 * derived from this software without specific prior written permission.
24 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
25 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27 * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
28 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
29 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
32 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
33 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 * POSSIBILITY OF SUCH DAMAGE.
37 #include <sys/param.h>
38 #include <sys/systm.h>
39 #include <sys/kernel.h>
40 #include <sys/buf.h>
41 #include <sys/queue.h>
42 #include <sys/device_port.h>
43 #include <sys/module.h>
45 #include <bus/cam/scsi/scsi_low.h>
46 #include <bus/cam/scsi/scsi_low_pisa.h>
48 int
49 scsi_low_deactivate_pisa(struct scsi_low_softc *sc)
51 if (scsi_low_deactivate(sc) != 0)
52 return EBUSY;
53 return 0;
56 int
57 scsi_low_activate_pisa(struct scsi_low_softc *sc, int flags)
59 sc->sl_cfgflags = ((sc->sl_cfgflags & 0xffff0000) |
60 (flags & 0x00ff));
62 if (scsi_low_activate(sc) != 0)
63 return EBUSY;
64 return 0;
67 static moduledata_t scsi_low_moduledata = {
68 "scsi_low",
69 NULL,
70 NULL
73 DECLARE_MODULE(scsi_low, scsi_low_moduledata, SI_SUB_DRIVERS, SI_ORDER_MIDDLE);
74 MODULE_VERSION(scsi_low, 1);
75 MODULE_DEPEND(scsi_low, cam, 1, 1, 1);