1 | /* $NetBSD: scsiconf.h,v 1.58 2012/04/20 20:23:21 bouyer Exp $ */ |
2 | |
3 | /*- |
4 | * Copyright (c) 1998, 1999, 2004 The NetBSD Foundation, Inc. |
5 | * All rights reserved. |
6 | * |
7 | * This code is derived from software contributed to The NetBSD Foundation |
8 | * by Charles M. Hannum; by Jason R. Thorpe of the Numerical Aerospace |
9 | * Simulation Facility, NASA Ames Research Center. |
10 | * |
11 | * Redistribution and use in source and binary forms, with or without |
12 | * modification, are permitted provided that the following conditions |
13 | * are met: |
14 | * 1. Redistributions of source code must retain the above copyright |
15 | * notice, this list of conditions and the following disclaimer. |
16 | * 2. Redistributions in binary form must reproduce the above copyright |
17 | * notice, this list of conditions and the following disclaimer in the |
18 | * documentation and/or other materials provided with the distribution. |
19 | * |
20 | * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS |
21 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS |
24 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
25 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
26 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
27 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
28 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
29 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
30 | * POSSIBILITY OF SUCH DAMAGE. |
31 | */ |
32 | |
33 | /* |
34 | * Originally written by Julian Elischer (julian@tfs.com) |
35 | * for TRW Financial Systems for use under the MACH(2.5) operating system. |
36 | * |
37 | * TRW Financial Systems, in accordance with their agreement with Carnegie |
38 | * Mellon University, makes this software available to CMU to distribute |
39 | * or use in any manner that they see fit as long as this message is kept with |
40 | * the software. For this reason TFS also grants any other persons or |
41 | * organisations permission to use or modify this software. |
42 | * |
43 | * TFS supplies this software to be publicly redistributed |
44 | * on the understanding that TFS is not responsible for the correct |
45 | * functioning of this software in any circumstances. |
46 | * |
47 | * Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992 |
48 | */ |
49 | |
50 | #ifndef _DEV_SCSIPI_SCSICONF_H_ |
51 | #define _DEV_SCSIPI_SCSICONF_H_ |
52 | |
53 | #include <dev/scsipi/scsipiconf.h> |
54 | |
55 | int scsiprint(void *, const char *); |
56 | |
57 | struct scsibus_softc { |
58 | device_t sc_dev; |
59 | struct scsipi_channel *sc_channel; /* our scsipi_channel */ |
60 | int sc_flags; |
61 | }; |
62 | |
63 | /* sc_flags */ |
64 | #define SCSIBUSF_OPEN 0x00000001 /* bus is open */ |
65 | |
66 | /* SCSI subtypes for struct scsipi_bustype */ |
67 | #define SCSIPI_BUSTYPE_SCSI_PSCSI 0 /* parallel SCSI */ |
68 | #define SCSIPI_BUSTYPE_SCSI_FC 1 /* Fiber channel */ |
69 | #define SCSIPI_BUSTYPE_SCSI_SAS 2 /* SAS */ |
70 | #define SCSIPI_BUSTYPE_SCSI_USB 3 /* USB */ |
71 | |
72 | extern const struct scsipi_bustype scsi_bustype; |
73 | extern const struct scsipi_bustype scsi_fc_bustype; |
74 | extern const struct scsipi_bustype scsi_sas_bustype; |
75 | extern const struct scsipi_bustype scsi_usb_bustype; |
76 | |
77 | int scsi_change_def(struct scsipi_periph *, int); |
78 | void scsi_kill_pending(struct scsipi_periph *); |
79 | void scsi_print_addr(struct scsipi_periph *); |
80 | int scsi_probe_bus(struct scsibus_softc *, int, int); |
81 | void scsi_scsipi_cmd(struct scsipi_xfer *); |
82 | void scsi_async_event_xfer_mode(struct scsipi_channel *, void *); |
83 | void scsi_fc_sas_async_event_xfer_mode(struct scsipi_channel *, void *); |
84 | |
85 | #endif /* _DEV_SCSIPI_SCSICONF_H_ */ |
86 | |