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