SCSICONF(9)

NAME
scsiconf - define how certain scsi devices behave

SYNOPSIS
#include <scsi/scsi_all.h>
#include <scsi/scsiconf.h>
static struct scsidevs knowndevs[] = ...

DESCRIPTION
The struct scsidevs knowndevs contains information about scsi devices that are known to have problems or require special flags.

    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	...

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 (‘?’) matches any single character and a trailing asterisk (‘*’) matches remaining characters. For patterns shorter than their respective fields, trailing spaces are implied.

type
    This is the type of device that is returned by the device. Look in /sys/scsi/scsi_all.h for the list of available types (look for the T_xxx macros).

driver
    This specifies the driver to assign to the devices that match this entry. It usually has the same value as type, unless a particular device is lying about its identity.

removable
    This specifies wether the device is removable (T_REMOV) or fixed (T_FIXED).

manufacturer
    This is the string to match against the vendor identification returned by the device.

model
    This is the string to match against the product identification returned by the device.

version
    This is the string to match against the product revision level returned by the device.

devname
    The device name of the driver to attach to this scsi device.

flags
    This is set to possible flags that are use when probing this device. The values are:
    SC_SHOWME
        Be verbose about the decisions made when considering this entry at device probe time.
    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.
    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.

quirks
    This field specifies device specific flags. See the device-specific man pages in section 9 for more info on these flags.

devmodes
    This is a pointer to a device specific struct. Currently only used by st(4) to set initial modes.

FILES
/sys/scsi/scsi_all.h
    Lists the possible scsi devices
/sys/scsi/scsiconf.h
    Lists possible flags for both flags and quirks
/sys/scsi/scsiconf.c
    Contains the knowndevs data structure

SEE ALSO
cd(4), ch(4), pt(4), scsi(4), sd(4), st(4), su(4), uk(4), cd(9), sd(9), st(9)

HISTORY
The scsiconf manual page first appeared in FreeBSD 2.2.

AUTHOR
This manual page was written by John-Mark Gurney <gurney_j@efn.org>.

BUGS
This isn't a complete description of what /sys/scsi/scsiconf.c contains, but the remaining functions there are internal to the SCSI subsystem and thus of little interest for driver writers.