xref: /openbsd-src/share/man/man4/atapiscsi.4 (revision 8357f9b26883688b60b89314433a54811ecd636f)
1*8357f9b2Sdlg.\"	$OpenBSD: atapiscsi.4,v 1.12 2012/08/14 01:08:19 dlg Exp $
2ee609949Scsapuntz.\"
3ee609949Scsapuntz.\" Copyright (c) 1999 Constantine Sapuntzakis.
4ee609949Scsapuntz.\"
5ee609949Scsapuntz.\" Redistribution and use in source and binary forms, with or without
6ee609949Scsapuntz.\" modification, are permitted provided that the following conditions
7ee609949Scsapuntz.\" are met:
8ee609949Scsapuntz.\" 1. Redistributions of source code must retain the above copyright
9ee609949Scsapuntz.\"    notice, this list of conditions and the following disclaimer.
10ee609949Scsapuntz.\" 2. Redistributions in binary form must reproduce the above copyright
11ee609949Scsapuntz.\"    notice, this list of conditions and the following disclaimer in the
12ee609949Scsapuntz.\"    documentation and/or other materials provided with the distribution.
13ee609949Scsapuntz.\" 4. Neither the name of the University nor the names of its contributors
14ee609949Scsapuntz.\"    may be used to endorse or promote products derived from this software
15ee609949Scsapuntz.\"    without specific prior written permission.
16ee609949Scsapuntz.\"
17ee609949Scsapuntz.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18ee609949Scsapuntz.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19ee609949Scsapuntz.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20ee609949Scsapuntz.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21ee609949Scsapuntz.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22ee609949Scsapuntz.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23ee609949Scsapuntz.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24ee609949Scsapuntz.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25ee609949Scsapuntz.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26ee609949Scsapuntz.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27ee609949Scsapuntz.\" SUCH DAMAGE.
28ee609949Scsapuntz.\"
29*8357f9b2Sdlg.Dd $Mdocdate: August 14 2012 $
30ee609949Scsapuntz.Dt ATAPISCSI 4
31ee609949Scsapuntz.Os
32ee609949Scsapuntz.Sh NAME
33ee609949Scsapuntz.Nm atapiscsi
34ee609949Scsapuntz.Nd ATAPI<->SCSI adapter
35ee609949Scsapuntz.Sh SYNOPSIS
36afb7f3acSmickey.Cd "atapiscsi* at wdc? flags 0x0000"
37afb7f3acSmickey.Cd "atapiscsi* at pciide? flags 0x0000"
38ee609949Scsapuntz.Sh DESCRIPTION
39ee609949ScsapuntzThe
40ee609949Scsapuntz.Nm
41085bdf8dScsapuntzdriver supports ATAPI (also called IDE) devices such as CD-ROMs, ZIP
42d5b4cdaaSaarondrives, LS-120 floppy drives, and tape drives.
43d5b4cdaaSaaronAll ATAPI devices talk a subset of the SCSI protocol.
44ee609949Scsapuntz.Pp
45ee609949ScsapuntzThe
46ee609949Scsapuntz.Nm
47d5b4cdaaSaarondriver acts like a SCSI adapter.
48d5b4cdaaSaaronThus, the ATAPI devices connected to the system will appear as SCSI devices.
49d5b4cdaaSaaronATAPI CD-ROMs will appear as
50085bdf8dScsapuntz.Xr cd 4
51085bdf8dScsapuntzdevices, ATAPI tape drives as
52085bdf8dScsapuntz.Xr st 4
53085bdf8dScsapuntzdevices, and ATAPI floppies as
54085bdf8dScsapuntz.Xr sd 4
55085bdf8dScsapuntzdevices.
56ee609949Scsapuntz.Pp
573677ff91SderaadtFor performance reasons, one should avoid putting an ATAPI device and
58d5b4cdaaSaarona hard disk on the same cable.
59d5b4cdaaSaaronThe driver does not support bus release and, even if it did, many ATAPI
60d5b4cdaaSaarondevices do not support it.
61d5b4cdaaSaaronThere is only one command outstanding on a cable at a time.
62d5b4cdaaSaaronFor example, if a hard disk and a CD drive are placed on the same cable,
63d5b4cdaaSaaronthe hard disk requests may get queued behind slower CD operations.
64d13cd3e0Sderaadt.Pp
65d13cd3e0SderaadtThe
66d13cd3e0Sderaadt.Cm flags
67d13cd3e0Sderaadtare used only with controllers that support DMA operations and
68d13cd3e0Sderaadtmode settings (like some
69d13cd3e0Sderaadt.Xr pciide 4
70d13cd3e0Sderaadtcontrollers).
71d13cd3e0SderaadtThe lowest order (rightmost) nibble of the
72d13cd3e0Sderaadt.Cm flags
73b3c75b6fSmpechdefine the PIO mode to use.
74b3c75b6fSmpechThe next four bits indicate the DMA mode and the third nibble the UltraDMA
75b3c75b6fSmpechmode.
76d13cd3e0Sderaadt.Pp
77d13cd3e0SderaadtFor each set of four bits, the 3 lower bits define the mode to use
78d13cd3e0Sderaadtand the last bit must be set to 1 for this setting to be used.
79d13cd3e0SderaadtFor DMA and UltraDMA, 0xf (1111) means
80d13cd3e0Sderaadt.Dq disable .
81d13cd3e0SderaadtFor example, a
82d13cd3e0Sderaadt.Cm flags
83d13cd3e0Sderaadtvalue of 0x0fac (1111 1010 1100)
84d13cd3e0Sderaadtmeans
85d13cd3e0Sderaadt.Do
86d13cd3e0Sderaadtuse PIO mode 4, DMA mode 2, disable UltraDMA
87d13cd3e0Sderaadt.Dc .
88d13cd3e0SderaadtThe special setting 0x0000 means
89d13cd3e0Sderaadt.Dq use whatever the drive claims to support .
90ee609949Scsapuntz.Sh SEE ALSO
91d5b4cdaaSaaron.Xr cd 4 ,
92ee609949Scsapuntz.Xr intro 4 ,
93ee609949Scsapuntz.Xr pciide 4 ,
94ee609949Scsapuntz.Xr scsi 4 ,
95d5b4cdaaSaaron.Xr sd 4 ,
96ee609949Scsapuntz.Xr st 4 ,
97d5b4cdaaSaaron.Xr wdc 4
98d5b4cdaaSaaron.Sh BUGS
99d5b4cdaaSaaronSlow devices, like tape drives, could do a better job of sharing the channel.
100d5b4cdaaSaaronFor now, we recommend you put the tape device on its own channel.
101