From 65d6069c66d43775e6d0b59470c0b20f4e3f7976 Mon Sep 17 00:00:00 2001 From: millert Date: Fri, 28 Mar 1997 22:53:37 +0000 Subject: [PATCH] Move ncr.4 out of man4.i386/ncr.4 and update it from NetBSD. Remove one of the tekram cards from man4.i386/aha.4 that is really ncr-based and add cd.4, fpa.4, sd.4, st.4, uk.4 from NetBSD (some originally from FreeBSD). --- share/man/man4/Makefile | 11 +- share/man/man4/cd.4 | 402 +++++++++++++++++++++++++++ share/man/man4/fpa.4 | 55 ++++ share/man/man4/man4.i386/Makefile | 4 +- share/man/man4/man4.i386/aha.4 | 2 +- share/man/man4/{man4.i386 => }/ncr.4 | 17 +- share/man/man4/sd.4 | 233 ++++++++++++++++ share/man/man4/st.4 | 329 ++++++++++++++++++++++ share/man/man4/uk.4 | 84 ++++++ 9 files changed, 1122 insertions(+), 15 deletions(-) create mode 100644 share/man/man4/cd.4 create mode 100644 share/man/man4/fpa.4 rename share/man/man4/{man4.i386 => }/ncr.4 (83%) create mode 100644 share/man/man4/sd.4 create mode 100644 share/man/man4/st.4 create mode 100644 share/man/man4/uk.4 diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 8a8b5a0193d..1bb9eb018b1 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -1,10 +1,11 @@ -# $OpenBSD: Makefile,v 1.19 1997/03/05 09:13:15 niklas Exp $ +# $OpenBSD: Makefile,v 1.20 1997/03/28 22:53:37 millert Exp $ # $NetBSD: Makefile,v 1.22.4.2 1996/07/18 00:51:10 jtc Exp $ -MAN= audio.4 acd.4 ahc.4 bpf.4 ccd.4 clnp.4 cltp.4 ddb.4 drum.4 esis.4 \ - fd.4 icmp.4 idp.4 imp.4 inet.4 ip.4 ipl.4 iso.4 lkm.4 lo.4 \ - netintro.4 ns.4 nsip.4 null.4 pnp.4 pty.4 random.4 route.4 scsi.4 \ - spp.4 tb.4 tcp.4 termios.4 tty.4 tp.4 tun.4 udp.4 unix.4 vnd.4 +MAN= audio.4 acd.4 ahc.4 bpf.4 ccd.4 cd.4 clnp.4 cltp.4 ddb.4 drum.4 \ + esis.4 fd.4 icmp.4 idp.4 imp.4 inet.4 ip.4 ipl.4 iso.4 lkm.4 \ + lo.4 ncr.4 netintro.4 ns.4 nsip.4 null.4 pnp.4 pty.4 random.4 \ + route.4 scsi.4 spp.4 tb.4 tcp.4 termios.4 tty.4 tp.4 tun.4 udp.4 \ + unix.4 vnd.4 MLINKS+=fd.4 stderr.4 fd.4 stdin.4 fd.4 stdout.4 MLINKS+=netintro.4 networking.4 MLINKS+=random.4 srandom.4 random.4 urandom.4 random.4 prandom.4 diff --git a/share/man/man4/cd.4 b/share/man/man4/cd.4 new file mode 100644 index 00000000000..ca25fef1836 --- /dev/null +++ b/share/man/man4/cd.4 @@ -0,0 +1,402 @@ +.\" $OpenBSD: cd.4,v 1.1 1997/03/28 22:53:39 millert Exp $ +.\" $NetBSD: cd.4,v 1.3 1996/10/20 23:15:21 explorer Exp $ +.\" +.\" Copyright (c) 1996 +.\" Julian Elischer . 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. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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. +.\" +.Dd January 16, 1996 +.Dt CD 4 +.Os +.Sh NAME +.Nm cd +.Nd SCSI CD-ROM driver +.Sh SYNOPSIS +.Cd cd* at scsibus? target ? lun ? +.Cd cd1 at scsibus0 target 4 lun 0 +.Sh DESCRIPTION +The +.Nm cd +driver provides support for a +.Tn SCSI +.Tn CD-ROM +(Compact Disc-Read Only Memory) drive. +In an attempt to look like a regular disk, the +.Nm +driver synthesizes a partition table, with one partition covering the entire +.Tn CD-ROM . +It is possible to modify this partition table using +.Xr disklabel 8 , +but it will only last until the +.Tn CD-ROM +is unmounted. +In general the interfaces are similar to those described by +.Xr wd 4 +and +.Xr sd 4 . +.Pp +As the +.Tn SCSI +adapter is probed during boot, the +.Tn SCSI +bus is scanned for devices. Any devices found which answer as `Read-only' +type devices will be `attached' to the +.Nm +driver. +.Pp +The system utility +.Xr disklabel 8 +may be used to read the synthesized +disk label +structure, which will contain correct figures for the size of the +.Tn CD-ROM +should that information be required. +.Pp +.Sh KERNEL CONFIGURATION +Any number of +.Tn CD-ROM +devices may be attached to the system regardless of system +configuration as all resources are dynamically allocated. +.Sh IOCTLS +The following +.Xr ioctl 2 +calls which apply to +.Tn SCSI +.Tn CD-ROM +drives are defined +in the header files +.Aq Pa sys/cdio.h +and +.Aq Pa sys/disklabel.h . +.Pp +.Bl -tag -width CDIOCREADSUBCHANNEL -compact +.It Dv DIOCGDINFO +.It Dv DIOCSDINFO +.Pq Li "struct disklabel" +Read or write the in-core copy of the disklabel for the +drive. The disklabel is initialized with information +read from the scsi inquiry commands, and should be the same as +the information printed at boot. This structure is defined in +.Xr disklabel 5 . + +.\".It Dv CDIOCCAPABILITY +.\".Pq Li "struct ioc_capability" +.\"Retrieve information from the drive on what features it supports. The +.\"information is returned in the following structure: +.\".Bd -literal -offset indent +.\"struct ioc_capability { +.\" u_long play_function; +.\"#define CDDOPLAYTRK 0x00000001 +.\" /* Can play tracks/index */ +.\"#define CDDOPLAYMSF 0x00000002 +.\" /* Can play msf to msf */ +.\"#define CDDOPLAYBLOCKS 0x00000004 +.\" /* Can play range of blocks */ +.\"#define CDDOPAUSE 0x00000100 +.\" /* Output can be paused */ +.\"#define CDDORESUME 0x00000200 +.\" /* Output can be resumed */ +.\"#define CDDORESET 0x00000400 +.\" /* Drive can be completely reset */ +.\"#define CDDOSTART 0x00000800 +.\" /* Audio can be started */ +.\"#define CDDOSTOP 0x00001000 +.\" /* Audio can be stopped */ +.\"#define CDDOPITCH 0x00002000 +.\" /* Audio pitch can be changed */ +.\" +.\" u_long routing_function; +.\"#define CDREADVOLUME 0x00000001 +.\" /* Volume settings can be read */ +.\"#define CDSETVOLUME 0x00000002 +.\" /* Volume settings can be set */ +.\"#define CDSETMONO 0x00000100 +.\" /* Output can be set to mono */ +.\"#define CDSETSTEREO 0x00000200 +.\" /* Output can be set to stereo (def) */ +.\"#define CDSETLEFT 0x00000400 +.\" /* Output can be set to left only */ +.\"#define CDSETRIGHT 0x00000800 +.\" /* Output can be set to right only */ +.\"#define CDSETMUTE 0x00001000 +.\" /* Output can be muted */ +.\"#define CDSETPATCH 0x00008000 +.\" /* Direct routing control allowed */ +.\" +.\" u_long special_function; +.\"#define CDDOEJECT 0x00000001 +.\" /* The tray can be opened */ +.\"#define CDDOCLOSE 0x00000002 +.\" /* The tray can be closed */ +.\"#define CDDOLOCK 0x00000004 +.\" /* The tray can be locked */ +.\"#define CDREADHEADER 0x00000100 +.\" /* Can read Table of Contents */ +.\"#define CDREADENTRIES 0x00000200 +.\" /* Can read TOC Entries */ +.\"#define CDREADSUBQ 0x00000200 +.\" /* Can read Subchannel info */ +.\"#define CDREADRW 0x00000400 +.\" /* Can read subcodes R-W */ +.\"#define CDHASDEBUG 0x00004000 +.\" /* The tray has dynamic debugging */ +.\"}; +.\".Ed +.It Dv CDIOCPLAYTRACKS +.Pq Li "struct ioc_play_track" +Start audio playback given a track address and length. The structure +is defined as follows: +.Bd -literal -offset indent +struct ioc_play_track +{ + u_char start_track; + u_char start_index; + u_char end_track; + u_char end_index; +}; +.Ed + +.It Dv CDIOCPLAYBLOCKS +.Pq Li "struct ioc_play_blocks" +Start audio playback given a block address and length. The structure +is defined as follows: +.Bd -literal -offset indent +struct ioc_play_blocks +{ + int blk; + int len; +}; +.Ed + +.It Dv CDIOCPLAYMSF +.Pq Li "struct ioc_play_msf" +Start audio playback given a `minutes-seconds-frames' address and +length. The structure is defined as follows: +.Bd -literal -offset indent +struct ioc_play_msf +{ + u_char start_m; + u_char start_s; + u_char start_f; + u_char end_m; + u_char end_s; + u_char end_f; +}; +.Ed + +.It Dv CDIOCREADSUBCHANNEL +.Pq Li "struct ioc_read_subchannel" +Read information from the subchannel at the location specified by this +structure: +.Bd -literal -offset indent +struct ioc_read_subchannel { + u_char address_format; +#define CD_LBA_FORMAT 1 +#define CD_MSF_FORMAT 2 + u_char data_format; +#define CD_SUBQ_DATA 0 +#define CD_CURRENT_POSITION 1 +#define CD_MEDIA_CATALOG 2 +#define CD_TRACK_INFO 3 + u_char track; + int data_len; + struct cd_sub_channel_info *data; +}; +.Ed + +.It Dv CDIOREADTOCHEADER +.Pq Li "struct ioc_toc_header" +Return summary information about the table of contents for the mounted +.Tn CD-ROM . +The information is returned into the following structure: +.Bd -literal -offset indent +struct ioc_toc_header { + u_short len; + u_char starting_track; + u_char ending_track; +}; +.Ed + +.It Dv CDIOREADTOCENTRYS +.Pq Li "struct ioc_read_toc_entry" +Return information from the table of contents entries mentioned. (Yes, this +command name is misspelled.) The argument structure is defined as follows: +.Bd -literal -offset indent +struct ioc_read_toc_entry { + u_char address_format; + u_char starting_track; + u_short data_len; + struct cd_toc_entry *data; +}; +.Ed +The requested data is written into an area of size +.Li data_len +and pointed to by +.Li data . + +.It Dv CDIOCSETPATCH +.Pq Li "struct ioc_patch" +Attach various audio channels to various output channels. The +argument structure is defined thusly: +.Bd -literal -offset indent +struct ioc_patch { + u_char patch[4]; + /* one for each channel */ +}; +.Ed + +.It Dv CDIOCGETVOL +.It Dv CDIOCSETVOL +.Pq Li "struct ioc_vol" +Get (set) information about the volume settings of the output channels. The +argument structure is as follows: +.Bd -literal -offset indent +struct ioc_vol +{ + u_char vol[4]; + /* one for each channel */ +}; +.Ed + +.It Dv CDIOCSETMONO +Patch all output channels to all source channels. + +.It Dv CDIOCSETSTEREO +Patch left source channel to the left output channel and the right +source channel to the right output channel. + +.It Dv CDIOCSETMUTE +Mute output without changing the volume settings. + +.It Dv CDIOCSETLEFT +.It Dv CDIOCSETRIGHT +Attach both output channels to the left (right) source channel. + +.It Dv CDIOCSETDEBUG +.It Dv CDIOCCLRDEBUG +Turn on (off) debugging for the appropriate device. + +.It Dv CDIOCPAUSE +.It Dv CDIOCRESUME +Pause (resume) audio play, without resetting the location of the read-head. + +.It Dv CDIOCRESET +Reset the drive. + +.It Dv CDIOCSTART +.It Dv CDIOCSTOP +Tell the drive to spin-up (-down) the +.Tn CD-ROM . + +.It Dv CDIOCALLOW +.It Dv CDIOCPREVENT +Tell the drive to allow (prevent) manual ejection of the +.Tn CD-ROM +disc. Not all drives support this feature. + +.It Dv CDIOCEJECT +Eject the +.Tn CD-ROM . + +.\".It Dv CDIOCCLOSE +.\"Tell the drive to close its door and load the media. Not all drives +.\"support this feature. +.\" +.\".It Dv CDIOCPITCH +.\".Pq Li "struct ioc_pitch" +.\"For drives that support it, this command instructs the drive to play +.\"the audio at a faster or slower rate than normal. Values of +.\".Li speed +.\"between -32767 and -1 result in slower playback; a zero value +.\"indicates normal speed; and values from 1 to 32767 give faster +.\"playback. Drives with less than 16 bits of resolution will silently +.\"ignore less-significant bits. The structure is defined thusly: +.\".Bd -literal -offset indent +.\"struct ioc_pitch +.\"{ +.\" short speed; +.\"}; +.\".Ed +.El +.Pp +In addition the general +.Xr scsi 4 +ioctls may be used with the +.Nm +driver, if used against the `whole disk' partition (i.e. +.Pa /dev/rcd0c ) . +.Sh NOTES +When a +.Tn CD-ROM +is changed in a drive controlled by the +.Nm +driver, then the act of changing the media will invalidate the +disklabel and information held within the kernel. To stop corruption, +all accesses to the device will be discarded until there are no more +open file descriptors referencing the device. During this period, all +new open attempts will be rejected. When no more open file descriptors +reference the device, the first next open will load a new set of +parameters (including disklabel) for the drive. +.Pp +The audio code in the +.Nm +driver only support +.Tn SCSI-2 +standard audio commands. Because many +.Tn CD-ROM +manufacturers have not followed the standard, there are many +.Tn CD-ROM +drives for which audio will not work. Some work is planned to support +some of the more common `broken' +.Tn CD-ROM +drives; however, this is not yet under way. +.Sh FILES +.Bl -tag -width /dev/rcd[0-9][a-h] -compact +.It Pa /dev/cd[0-9][a-h] +block mode +.Tn CD-ROM +devices +.It Pa /dev/rcd[0-9][a-h] +raw mode +.Tn CD-ROM +devices +.El +.Sh DIAGNOSTICS +None. +.Sh SEE ALSO +.Xr scsi 4 , +.Xr sd 4 , +.Xr disklabel 5 , +.Xr disklabel 8 +.Sh BUGS +The names of the structures used for the third argument to +.Fn ioctl +were poorly chosen, and a number of spelling errors have survived in +the names of the +.Fn ioctl +commands. +.Sh HISTORY +The +.Nm +driver appeared in 386BSD 0.1. diff --git a/share/man/man4/fpa.4 b/share/man/man4/fpa.4 new file mode 100644 index 00000000000..c17ff5cc4f9 --- /dev/null +++ b/share/man/man4/fpa.4 @@ -0,0 +1,55 @@ +.\" $OpenBSD: fpa.4,v 1.1 1997/03/28 22:53:39 millert Exp $ +.\" $NetBSD: fpa.4,v 1.2 1997/02/18 01:07:46 jonathan Exp $ +.\" +.\" Copyright (c) 1995, Matt Thomas +.\" All rights reserved. +.\" +.Dd March 13, 1995 +.Dt FPA 4 +.Dt FEA 4 +.Os +.Sh NAME +.Nm fpa , +.Nm fea +.Nd +Device Drivers for DEC FDDI Controllers +.Sh SYNOPSIS +.Pp +.Cd "fpa0 at pci?" +.Cd "fea0 at eisa?" +.Sh DESCRIPTION +The +.Nm fpa +and +.Nm fea +device driver provides support for the DEC DEFPA PCI FDDI Controller and +the DEC DEFEA EISA FDDI Controller, respectively. All variants of either +controller are supported including the DAS and SAS configurations. +.Pp +.Sh DIAGNOSTICS +.Bl -diag +.It "fea%d: error: desired IRQ of %d does not match device's actual IRQ (%d)" +The device probe detected that the DEFEA board is configured for a different +interrupt than the one specified in the kernel configuration file. +.It "fea%d: error: memory not enabled! ECU reconfiguration required" +The device probe found that no device memory had been configured on the +DEFEA. The DEFEA can be configured with no device memory, this driver +requires a mininum of 1K device memory be setup. The ECU (EISA Configuration +Utility) will need to be run to change the settings. +.El +.Sh CAVEATS +Normally, the device driver will not enable the reception of SMT frames. +However if the IFF_LINK1 flag is set, the device driver will enable the +reception of SMT frames and pass them up to the Berkeley Packet Filter for +processing. +.Pp +.Sh SEE ALSO +.Xr arp 4 , +.Xr ifconfig 8 , +.Xr netintro 4 +.Sh AUTHOR +The +.Nm fpa +and +.Nm fea +device driver and manual page was written by Matt Thomas. diff --git a/share/man/man4/man4.i386/Makefile b/share/man/man4/man4.i386/Makefile index 9052374e98c..06f6137f371 100644 --- a/share/man/man4/man4.i386/Makefile +++ b/share/man/man4/man4.i386/Makefile @@ -1,9 +1,9 @@ -# $OpenBSD: Makefile,v 1.12 1996/10/15 07:52:11 downsj Exp $ +# $OpenBSD: Makefile,v 1.13 1997/03/28 22:53:44 millert Exp $ # from: @(#)Makefile 5.1 (Berkeley) 2/12/91 # Id: Makefile,v 1.4 1995/12/14 05:41:38 deraadt Exp $ MAN= intro.4 aha.4 ahb.4 aic.4 aria.4 ast.4 autoconf.4 boca.4 bt.4 -MAN+= com.4 cy.4 ed.4 ep.4 fdc.4 iy.4 lms.4 lpt.4 mcd.4 mem.4 mms.4 ncr.4 +MAN+= com.4 cy.4 ed.4 ep.4 fdc.4 iy.4 lms.4 lpt.4 mcd.4 mem.4 mms.4 MAN+= npx.4 pctr.4 pms.4 rtfps.4 scd.4 sea.4 speaker.4 uha.4 wd.4 MAN+= eg.4 el.4 ie.4 joy.4 le.4 wt.4 MAN+= gus.4 pss.4 sb.4 wss.4 diff --git a/share/man/man4/man4.i386/aha.4 b/share/man/man4/man4.i386/aha.4 index 4ab7c89a7a2..2efa7254077 100644 --- a/share/man/man4/man4.i386/aha.4 +++ b/share/man/man4/man4.i386/aha.4 @@ -1,3 +1,4 @@ +.\" $OpenBSD: aha.4,v 1.6 1997/03/28 22:53:45 millert Exp $ .\" .\" Copyright (c) 1994 James A. Jegers .\" All rights reserved. @@ -46,7 +47,6 @@ driver provides support for the following SCSI adapters: .It Buslogic BT-54x .It Tekram DC-300B .It Tekram DC-320E -.It Tekram DC-380 .El This driver uses bounce buffers if the machine has more than 16 megabytes of memory. diff --git a/share/man/man4/man4.i386/ncr.4 b/share/man/man4/ncr.4 similarity index 83% rename from share/man/man4/man4.i386/ncr.4 rename to share/man/man4/ncr.4 index 50393e55783..a79a900c4c7 100644 --- a/share/man/man4/man4.i386/ncr.4 +++ b/share/man/man4/ncr.4 @@ -1,3 +1,4 @@ +.\" $OpenBSD: ncr.4,v 1.1 1997/03/28 22:53:40 millert Exp $ .\" .\" Copyright (c) 1994 James A. Jegers .\" All rights reserved. @@ -22,22 +23,24 @@ .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" -.Dd November 29, 1994 -.Dt NCR 4 i386 +.Dd January 15, 1997 +.Dt NCR 4 .Os .Sh NAME .Nm ncr -.Nd NCR 53C810 SCSI driver +.Nd NCR 53C8xx SCSI driver .Sh SYNOPSIS -.Cd "ncr* at pci? bus ? dev ?" +.Cd "ncr* at pci? dev ? function ?" .Cd "scsibus* at ncr?" .Sh DESCRIPTION The -.Nm ncr -driver provides support for the NCR 53C810 SCSI controller chip. +.Nm +driver provides support for the NCR 53C810, 53C825, 53C860, and 53C875 +SCSI controller chips. .Sh SEE ALSO .Xr intro 4 , .Xr sd 4 , .Xr st 4 , .Xr cd 4 , -.Xr ch 4 +.Xr ch 4 , +.Xr uk 4 diff --git a/share/man/man4/sd.4 b/share/man/man4/sd.4 new file mode 100644 index 00000000000..dc13b080037 --- /dev/null +++ b/share/man/man4/sd.4 @@ -0,0 +1,233 @@ +.\" $OpenBSD: sd.4,v 1.1 1997/03/28 22:53:41 millert Exp $ +.\" $NetBSD: sd.4,v 1.3 1996/10/20 23:15:23 explorer Exp $ +.\" +.\" Copyright (c) 1996 +.\" Julian Elischer . 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. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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. +.\" +.Dd January 18, 1996 +.Dt SD 4 +.Os +.Sh NAME +.Nm sd +.Nd SCSI disk driver +.Sh SYNOPSIS +.Cd sd* at scsibus? target ? lun ? +.Cd sd3 at scsibus0 target 3 lun 0 +.Sh DESCRIPTION +The +.Nm sd +driver provides support for a +.Tn SCSI +disk. It allows the disk +to be divided up into a set of pseudo devices called +.Em partitions . +In general the interfaces are similar to those described by +.Xr wd 4 . +.Pp +Where the +.Xr wd 4 +device has a fairly low level interface to the system, +.Tn SCSI +devices have a much higher level interface and talk to the system via +a +.Tn SCSI +host adapter +(e.g., +.Xr ahc 4 ) . +A +.Tn SCSI +adapter must also be separately configured into the system +before a +.Tn SCSI +disk can be configured. +.Pp +When the +.Tn SCSI +adapter is probed during boot, the +.Tn SCSI +bus is scanned for devices. Any devices found which answer as +.Sq Em Direct +type devices will be attached to the +.Nm +driver. +.\"In +.\".Tn FreeBSD +.\"releases prior to 2.1, the first found was attached as +.\".Li sd0 , +.\"the second +.\".Li sd1 , +.\"and so on. +.\"Beginning in 2.1 it became possible to lock down the assignment of +.\"devices on the +.\".Tn SCSI +.\"bus to particular units of the +.\".Nm +.\"device; refer to +.\".Xr scsi 4 +.\"for details on kernel configuration. +.Sh PARTITIONING +.\"The +.\".Nm +.\"driver allows the disk to have two levels of partitioning. +.\"One layer, called the +.\".Dq slice layer , +.\"is used to separate the +.\".Tn FreeBSD +.\"areas of the disk from areas used by other operating systems. +.\"The second layer is the native +.\".Bx 4.4 +.\"partitioning scheme, +.\".Xr disklabel 5 , +.\"which is used to subdivide the +.\".Tn FreeBSD +.\"slices into areas for individual filesystems and swap spaces. +.\"For more information, see +.\".Xr fdisk 8 +.\"and +.\".Xr disklabel 8 , +.\"respectively.) +On many systems +.Xr disklabel 8 +is used to partition the drive into filesystems. On some systems the +NetBSD portion of the disk resides within a native partition, and another +program is used to create the NetBSD portion. +.Pp +For example, the i386 port uses +.Xr fdisk 8 +to partition the disk into a BIOS level partition. This allows sharing +the disk with other operating systems. +.Pp +.\"If an uninitialized disk is opened, the slice table will be +.\"initialized with a fictitious +.\".Tn FreeBSD +.\"slice spanning the entire disk. Similarly, if an uninitialized +.\"(or +.\".No non- Ns Tn FreeBSD ) +.\"slice is opened, its disklabel will be initialized with parameters returned +.\"by the drive and a single +.\".Sq Li c +.\"partition encompassing the entire slice. +.\".Sh KERNEL CONFIGURATION +.\"It is only necessary to explicitly configure one +.\".Nm +.\"device; data structures are dynamically allocated as disks are found +.\"on the +.\".Tn SCSI +.\"bus. +.Sh IOCTLS +The following +.Xr ioctl 2 +calls apply to +.Tn SCSI +disks as well as to other disks. They are defined in the header file +.Aq Pa disklabel.h . +.Pp +.Bl -tag -width DIOCSDINFO +.\".It Dv DIOCSBAD +.\"Usually used to set up a bad-block mapping system on the disk. +.\".Tn SCSI +.\"drive incorporate their own bad-block mapping so this command is not +.\"implemented. +.It Dv DIOCGDINFO +Read, from the kernel, the in-core copy of the disklabel for the +drive. This may be a fictitious disklabel if the drive has never +been initialized, in which case it will contain information read +from the +.Tn SCSI +inquiry commands. +.It Dv DIOCSDINFO +Give the driver a new disklabel to use. The driver +.Em will not +write the new +disklabel to the disk. +.It Dv DIOCWLABEL +Enable or disable the driver's software +write protect of the disklabel on the disk. +.It Dv DIOCWDINFO +Give the driver a new disklabel to use. The driver +.Em will +write the new disklabel to the disk. +.It Dv DIOCLOCK +Lock the media cartridge into the device, or unlock a cartridge previously +locked. Used to prevent user and software eject while the media is in +use. +.It Dv DIOCEJECT +Eject the media cartridge from a removable device. +.El +.Pp +In addition, the +.Xr scsi 4 +general +.Fn ioctl +commands may be used with the +.Nm +driver, but only against the +.Sq Li c +(whole disk) partition. +.Sh NOTES +If a removable device is attached to the +.Nm +driver, then the act of changing the media will invalidate the +disklabel and information held within the kernel. To avoid +corruption, all accesses to the device will be discarded until there +are no more open file descriptors referencing the device. During this +period, all new open attempts will be rejected. When no more open +file descriptors reference the device, the first next open will load a +new set of parameters (including disklabel) for the drive. +.Sh FILES +.Bl -tag -width /dev/rsdXXXXX -compact +.It Pa /dev/sd Ns Ar u Ns Ar p +block mode +.Tn SCSI +disk unit +.Ar u , +partition +.Ar p +.It Pa /dev/rsd Ns Ar u Ns Ar p +raw mode +.Tn SCSI +disk unit +.Ar u , +partition +.Ar p +.Sm off +.El +.Sh DIAGNOSTICS +None. +.Sh SEE ALSO +.Xr wd 4 , +.Xr disklabel 5 , +.Xr disklabel 8 , +.Xr fdisk 8 +.Sh HISTORY +The +.Nm +driver was originally written for +.Tn Mach +2.5, and was ported to +.Tn FreeBSD +by Julian Elischer. +It was later ported to +.Tn NetBSD . diff --git a/share/man/man4/st.4 b/share/man/man4/st.4 new file mode 100644 index 00000000000..f97132956b4 --- /dev/null +++ b/share/man/man4/st.4 @@ -0,0 +1,329 @@ +.\" $OpenBSD +.\" $NetBSD: st.4,v 1.2 1996/10/20 23:15:24 explorer Exp $ +.\" +.\" Copyright (c) 1996 +.\" Julian Elischer . 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. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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. +.\" +.Dd August 23, 1996 +.Dt ST 4 +.Os +.Sh NAME +.Nm st +.Nd SCSI tape driver +.Sh SYNOPSIS +.Cd st* at scsibus? target ? lun ? +.Cd st1 at scsibus0 target 4 lun 0 +.Sh DESCRIPTION +The +.Nm +driver provides support for +.Tn SCSI +tape drives. It allows a tape drive to be run in several different +modes depending on minor numbers and supports several different +`sub-modes'. The device can have both a +.Em raw +interface +and a +.Em block +interface; however, only the raw interface is usually used (or +recommended). +.Pp +.Tn SCSI +devices have a relatively high level interface and talk to the +system via a +.Tn SCSI +adapter and a +.Tn SCSI +adapter driver +(e.g., +.Xr ahc 4 ) . +A +.Tn SCSI +adapter must also be separately configured into the system before a +.Tn SCSI +tape can be configured. +.Pp +As the +.Tn SCSI +adapter is probed during boot, the +.Tn SCSI +bus is scanned for devices. Any devices found which answer as +.Sq Em Sequential +type devices will be attached to the +.Nm +driver. +.Sh MOUNT SESSIONS +The +.Nm +driver is based around the concept of a +.Dq Em mount session , +which is defined as the period between the time that a tape is +mounted, and the time when it is unmounted. Any parameters set +during a mount session remain in effect for the remainder of the +session or until replaced. The tape can be unmounted, bringing the +session to a close in several ways. These include: +.Bl -enum +.It +Closing an `unmount device', referred to as sub-mode 00 below. An +example is +.Pa /dev/rst0 . +.It +Using the MTOFFL +.Xr ioctl 2 +command, reachable through the +.Sq Cm offline +command of +.Xr mt 1 . +.It +Opening a different mode will implicitly unmount the tape, thereby +closing off the mode that was previously mounted. All parameters +will be loaded freshly from the new mode. (See below for more on +modes.) +.El +.Sh MODES AND SUB-MODES +There are several different +.Sq operation +modes. These are controlled by bits 2 and 3 of the minor number +and are designed to allow users to easily read and write different +formats of tape on devices that allow multiple formats. The +parameters for each mode can be set individually by hand with the +.Xr mt 1 +command. When a device corresponding to a particular mode is first +mounted, The operating parameters for that mount session are copied +from that mode. Further changes to the parameters during the +session will change those in effect for the session but not those +set in the operation mode. To change the parameters for an operation +mode, one must compile them into the +.Dq Em quirk +table in the driver's source code. +.Pp +In addition to the operating modes mentioned above, bits 0 and 1 +of the minor number are interpreted as +.Sq sub-modes . +The sub-modes differ in the action taken when the device is closed: +.Bl -tag -width XXXX +.It 00 +A close will rewind the device; if the tape has been written, then +a file mark will be written before the rewind is requested. +The device is unmounted. +.It 01 +A close will leave the tape mounted. If the tape was written to, +a file mark will be written. No other head positioning takes place. +Any further reads or writes will occur directly after the last +read, or the written file mark. +.It 10 +A close will rewind the device. If the tape has been written, then +a file mark will be written before the rewind is requested. On +completion of the rewind an unload command will be issued. The +device is unmounted. +.It 11 +Reserved. Currently unused. +.El +.Sh BLOCKING MODES +.Tn SCSI +tapes may run in either +.Sq Em variable +or +.Sq Em fixed +block-size modes. Most +.Tn QIC Ns -type +devices run in fixed block-size mode, where most nine-track tapes +and many new cartridge formats allow variable block-size. The +difference between the two is as follows: +.Bl -inset +.It Variable block-size: +Each write made to the device results in a single logical record +written to the tape. One can never read or write +.Em part +of a record from tape (though you may request a larger block and +read a smaller record); nor can one read multiple blocks. Data +from a single write is therefore read by a single read. The block +size used may be any value supported by the device, the +.Tn SCSI +adapter and the system (usually between 1 byte and 64 Kbytes, +sometimes more). +.Pp +When reading a variable record/block from the tape, the head is +logically considered to be immediately after the last item read, +and before the next item after that. If the next item is a file +mark, but it was never read, then the next process to read will +immediately hit the file mark and receive an end-of-file notification. +.It Fixed block-size +Data written by the user is passed to the tape as a succession of +fixed size blocks. It may be contiguous in memory, but it is +considered to be a series of independent blocks. One may never +write an amount of data that is not an exact multiple of the +blocksize. One may read and write the same data as a different +set of records, In other words, blocks that were written together +may be read separately, and vice-versa. +.Pp +If one requests more blocks than remain in the file, the drive will +encounter the file mark. Because there is some data to return +(unless there were no records before the file mark), the read will +succeed, returning that data, The next read will return immediately +with an EOF. (As above, if the file mark is never read, it remains +for the next process to read if in no-rewind mode.) +.El +.Sh FILE MARK HANDLING +The handling of file marks on write is automatic. If the user has +written to the tape, and has not done a read since the last write, +then a file mark will be written to the tape when the device is +closed. If a rewind is requested after a write, then the driver +assumes that the last file on the tape has been written, and ensures +that there are two file marks written to the tape. The exception +to this is that there seems to be a standard (which we follow, but +don't understand why) that certain types of tape do not actually +write two file marks to tape, but when read, report a `phantom' +file mark when the last file is read. These devices include the +QIC family of devices. (It might be that this set of devices is +the same set as that of fixed block devices. This has not been +determined yet, and they are treated as separate behaviors by the +driver at this time.) +.Sh KERNEL CONFIGURATION +Because different tape drives behave differently, there is a +mechanism within the source to +.Nm +to quickly and conveniently recognize and deal with brands and +models of drive that have special requirements. +.Pp +There is a table (called the +.Dq Em quirk table ) +in which the identification strings of known errant drives can be +stored. Alongside each is a set of flags that allows the setting +of densities and blocksizes for each of the modes, along with a +set of `QUIRK' flags that can be used to enable or disable sections +of code within the driver if a particular drive is recognized. +.Sh IOCTLS +The following +.Xr ioctl 2 +calls apply to +.Tn SCSI +tapes. Some also apply to other tapes. They are defined in the +header file +.Aq Pa /sys/mtio.h . +.\" +.\" Almost all of this discussion belongs in a separate mt(4) +.\" manual page, since it is common to all magnetic tapes. +.\" +.Pp +.Bl -tag -width MTIOCEEOT +.It Dv MTIOCGET +.Pq Li "struct mtget" +Retrieve the status and parameters of the tape. +.It Dv MTIOCTOP +.Pq Li "struct mtop" +Perform a multiplexed operation. The argument structure is as follows: +.Bd -literal -offset indent +struct mtop { + short mt_op; + daddr_t mt_count; +}; +.Ed +.Pp +The following operation values are defined for +.Va mt_op : +.Bl -tag -width MTSELDNSTY +.It Dv MTWEOF +Write +.Va mt_count +end of file marks at the present head position. +.It Dv MTFSF +Skip over +.Va mt_count +file marks. Leave the head on the EOM side of the last skipped +file mark. +.It Dv MTBSF +Skip +.Em backwards +over +.Va mt_count +file marks. Leave the head on the BOM (beginning of media) +side of the last skipped file mark. +.It Dv MTFSR +Skip forwards over +.Va mt_count +records. +.It Dv MTBSR +Skip backwards over +.Va mt_count +records. +.It Dv MTREW +Rewind the device to the beginning of the media. +.It Dv MTOFFL +Rewind the media (and, if possible, eject). Even if the device cannot +eject the media it will often no longer respond to normal requests. +.It Dv MTNOP +No-op; set status only. +.It Dv MTCACHE +Enable controller buffering. +.It Dv MTNOCACHE +Disable controller buffering. +.It Dv MTSETBSIZ +Set the blocksize to use for the device/mode. If the device is capable of +variable blocksize operation, and the blocksize is set to 0, then the drive +will be driven in variable mode. This parameter is in effect for the present +mount session only. +.It Dv MTSETDNSTY +Set the density value (see +.Xr mt 1 ) +to use when running in the mode opened (minor bits 2 and 3). +This parameter is in effect for the present +mount session only. +.El +.It Dv MTIOCIEOT +Set end-of-tape processing (not presently supported for +.Nm +devices). +.It Dv MTIOCEEOT +Set end-of-tape processing (not presently supported for +.Nm +devices). +.El +.Sh FILES +.Bl -tag -width /dev/[n][e]rst[0-9] -compact +.It Pa /dev/[n][e]rst[0-9] +general form: +.It Pa /dev/rst0 +Mode 0, rewind on close +.It Pa /dev/nrst0 +Mode 2, No rewind on close +.It Pa /dev/erst0 +Mode 3, Eject on close (if capable) +.El +.Sh DIAGNOSTICS +None. +.Sh SEE ALSO +.Xr mt 1 , +.Xr scsi 4 +.Sh HISTORY +This +.Nm +driver was originally written for +.Tn Mach +2.5 by Julian Elischer, and was ported to +.Tn NetBSD +by Charles Hannum. This man page was edited for +.Tn NetBSD +by Jon Buller. diff --git a/share/man/man4/uk.4 b/share/man/man4/uk.4 new file mode 100644 index 00000000000..bb5e562d2b7 --- /dev/null +++ b/share/man/man4/uk.4 @@ -0,0 +1,84 @@ +.\" $OpenBSD: uk.4,v 1.1 1997/03/28 22:53:43 millert Exp $ +.\" $NetBSD: uk.4,v 1.3 1996/10/20 23:15:26 explorer Exp $ +.\" +.\" Copyright (c) 1996 +.\" Julian Elischer . 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. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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. +.\" +.Dd October 11, 1993 +.Dt UK 4 +.Os +.Sh NAME +.Nm uk +.Nd scsi user-level driver +.Sh SYNOPSIS +.Nm uk* at scsibus? target ? lun ? +.Sh DESCRIPTION +The +.Nm uk +driver provides support for a +process to address devices on the scsi bus for which there is no configured +driver. +.Pp +A scsi adapter must also be separately configured into the system +before this driver makes sense. +.Pp +.Sh KERNEL CONFIGURATION +If an count is given that number of +.Nm +devices will be configured into the kernel. + +.Pp +.Sh IOCTLS +The +.Nm +driver has no ioctls of its own but rather acts as a medium for the +generic +.Xr scsi 4 +ioctls. These are described in +.Em sys/scsiio.h. + + +.Sh FILES +.Bl -tag -width /dev/uk0XXX -compact +.It Pa /dev/uk[0-255] +uk{x} is the 'xth'unknown device found. +.El +.Sh DIAGNOSTICS +All +.Xr scsi 4 +debug ioctls work on +.Nm +devices. +.Sh SEE ALSO +.Xr sd 4 +.Xr st 4 +.Xr cd 4 +.Xr ch 4 +.Xr su 4 +.Xr scsi 4 +.Sh HISTORY +The +.Nm +driver appeared in 386BSD 0.1 -- 2.20.1