summaryrefslogtreecommitdiffstats
path: root/share/man/man9/scsiconf.9
blob: b3170cd1787bb2ece69b27725bdc70cb2289f426 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
.\" Copyright (c) 1997
.\"	John-Mark Gurney.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\" 3. Neither the name of the author nor the names of any co-contributors
.\"    may be used to endorse or promote products derived from this software
.\"    without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY John-Mark Gurney AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\"	$Id: scsiconf.9,v 1.5 1997/04/13 14:49:08 bde Exp $
.\"
.Dd January 29, 1997
.Dt SCSICONF 9
.Os FreeBSD
.Sh NAME
.Nm scsiconf
.Nd define how certain scsi devices behave
.Sh SYNOPSIS
.Fd #include <sys/types.h>
.Fd #include <scsi/scsiconf.h>
.Dv static struct scsidevs knowndevs[] =
.Em ...
.Sh DESCRIPTION
The
.Dv struct scsidevs knowndevs
contains information about scsi devices that are known to have problems
or require special flags.
.Bd -literal -offset indent
struct scsidevs {
	u_int32_t	type;
	u_int32_t	driver;	/* normally the same as type */
	boolean		removable;
	char		*manufacturer;
	char		*model;
	char		*version;
	char		*devname;
	char		flags;	/* see below */
	u_int16_t	quirks;
	void		*devmodes;
};

#define	SC_SHOWME	...
#define	SC_ONE_LU	...
#define	SC_MORE_LUS	...

.Ed
.Pp
Matching is based first on device type, then on the manufacturer, model,
and revision strings returned by the device.  The returned strings are
fixed lengths of 8, 16 and 4 bytes respectively.  In the matching
pattern, a question mark
.Pq So ? Sc
matches any single character and a trailing
asterisk
.Pq So * Sc
matches remaining characters.  For patterns shorter
than their respective fields, trailing spaces are implied.
.Bl -tag -width manufacturer
.It Va type
This is the type of device that is returned by the device.  Look in
.Pa /sys/scsi/scsi_all.h
for the list of available types
.Pq look for the Dv T_xxx macros .
.It Va driver
This specifies the driver to assign to the devices that match this entry.
It usually has the same value as
.Va type ,
unless a particular device is lying about its identity.
.It Va removable
This specifies wether the device is removable
.Pq Dv T_REMOV
or fixed
.Pq Dv T_FIXED .
.It Va manufacturer
This is the string to match against the vendor identification returned by the
device.
.It Va model
This is the string to match against the product identification returned by the
device.
.It Va version
This is the string to match against the product revision level returned by the
device.
.It Va devname
The device name of the driver to attach to this scsi device.
.It Va flags
This is set to possible flags that are use when probing this device.
The values are:
.Bl -tag -width "SC_MORE_LUSXX" -compact
.It Dv SC_SHOWME
Be verbose about the decisions made when considering this entry at
device probe time.
.It Dv SC_ONE_LU
Probe only the first LUN if device matches this entry; used for broken
devices that erroneously respond on more than a single LUN.
.It Dv SC_MORE_LUS
The opposite, probe for all possible LUNs.  This is the default, but
can be used if a quirk entry is required for other purposes, like
overriding a type-specific default that would restrict probing to only
one LUN.
.El
.It Va quirks
This field specifies device specific flags.  See the device-specific man pages in
section 9 for more info on these flags.
.It Va devmodes
This is a pointer to a device specific struct.  Currently only used by
.Xr st 4
to set initial modes.
.El
.Sh FILES
.Bl -tag -width /sys/scsi/scsiconf.c -compact
.It Pa /sys/scsi/scsi_all.h
Lists the possible scsi devices
.It Pa /sys/scsi/scsiconf.h
Lists possible flags for both
.Va flags
and
.Va quirks
.It Pa /sys/scsi/scsiconf.c
Contains the
.Va knowndevs
data structure
.El
.Sh SEE ALSO
.Xr cd 4 ,
.Xr ch 4 ,
.Xr pt 4 ,
.Xr scsi 4 ,
.Xr sd 4 ,
.Xr st 4 ,
.Xr su 4 ,
.Xr uk 4 ,
.Xr cd 9 ,
.Xr sd 9 ,
.Xr st 9
.Sh HISTORY
The
.Nm
manual page first appeared in
.Fx 2.2 .
.Sh AUTHORS
This
manual page was written by
.An John-Mark Gurney Aq gurney_j@efn.org .
.Sh BUGS
This isn't a complete description of what
.Pa /sys/scsi/scsiconf.c
contains, but the remaining functions there are internal to the SCSI
subsystem and thus of little interest for driver writers.
OpenPOWER on IntegriCloud