Index: head/share/man/man4/Makefile =================================================================== --- head/share/man/man4/Makefile (revision 62585) +++ head/share/man/man4/Makefile (revision 62586) @@ -1,44 +1,45 @@ # @(#)Makefile 8.1 (Berkeley) 6/18/93 # $FreeBSD$ MAN4= adv.4 adw.4 aha.4 ahb.4 ahc.4 amd.4 amr.4 an.4 ata.4 atkbd.4 \ atkbdc.4 aue.4 bktr.4 bt.4 blackhole.4 \ bpf.4 bridge.4 ccd.4 cd.4 ch.4 csa.4 cue.4 da.4 dc.4 ddb.4 de.4 \ divert.4 dpt.4 dummynet.4 ed.4 faith.4 fd.4 fdc.4 fpa.4 fxp.4 \ gif.4 gusc.4 icmp.4 icmp6.4 ifmib.4 iic.4 iicbb.4 iicbus.4 iicsmb.4 \ inet.4 inet6.4 intpm.4 intro.4 ip.4 ip6.4 ipfirewall.4 ipsec.4 isp.4 \ joy.4 kame.4 keyboard.4 kld.4 \ kue.4 lo.4 lp.4 lpbb.4 lpt.4 mem.4 mlx.4 mouse.4 mtio.4 natm.4 \ ncr.4 netintro.4 ng_ether.4 null.4 ohci.4 pass.4 pci.4 pcm.4 pcvt.4 \ ppbus.4 ppc.4 ppi.4 ppp.4 psm.4 pt.4 pty.4 rl.4 \ route.4 sa.4 sbc.4 screen.4 scsi.4 \ sd.4 ses.4 sf.4 si.4 sio.4 sis.4 sk.4 sl.4 smb.4 smbus.4 smp.4 snp.4 \ splash.4 sppp.4 st.4 ste.4 stf.4 sym.4 syscons.4 sysmouse.4 tcp.4 \ termios.4 ti.4 tl.4 ttcp.4 tty.4 tun.4 twe.4 udp.4 udbp.4 uhci.4 \ ukbd.4 umass.4 ums.4 unix.4 update.4 urio.4 usb.4 vga.4 vinum.4 vn.4 \ vpo.4 vr.4 wb.4 wi.4 wx.4 worm.4 xl.4 xpt.4 yp.4 zero.4 -MLINKS= bktr.4 brooktree.4 +MLINKS= ata.4 acd.4 ata.4 ad.4 ata.4 afd.4 ata.4 ast.4 +MLINKS+=bktr.4 brooktree.4 MLINKS+=fd.4 stderr.4 fd.4 stdin.4 fd.4 stdout.4 MLINKS+=fpa.4 fea.4 MLINKS+=ipfirewall.4 ipacct.4 ipfirewall.4 ipaccounting.4 ipfirewall.4 ipfw.4 MLINKS+=lp.4 plip.4 MLINKS+=mem.4 kmem.4 MLINKS+=netintro.4 networking.4 MLINKS+=pcvt.4 vt.4 MLINKS+=scsi.4 CAM.4 MLINKS+=scsi.4 SCSI.4 MLINKS+=scsi.4 cam.4 MLINKS+=smp.4 SMP.4 MLINKS+=splash.4 screensaver.4 MLINKS+=syscons.4 sc.4 MLINKS+=vpo.4 imm.4 MLINKS+=yp.4 YP.4 yp.4 NIS.4 yp.4 nis.4 # XXX NOT IMPORTED: man4.hp300 man4.sparc man4.tahoe man4.vax SUBDIR= man4.i386 .if make(maninstall) maninstall:: _SUBDIR .endif .include Index: head/share/man/man4/ata.4 =================================================================== --- head/share/man/man4/ata.4 (revision 62585) +++ head/share/man/man4/ata.4 (revision 62586) @@ -1,195 +1,199 @@ .\" .\" Copyright (c) 2000 Jeroen Ruigrok van der Werven .\" Copyright (c) 2000 Søren Schmidt .\" 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. .\" .\" $FreeBSD$ .\" .Dd January 27, 2000 .Dt ATA 4 .Os FreeBSD 4.0 .Sh NAME -.Nm ata +.Nm ata , +.Nm acd , +.Nm ad , +.Nm afd , +.Nm ast .Nd Generic ATA/ATAPI disk controller driver .Sh SYNOPSIS For ISA based ATA/ATAPI support: .Cd device isa .Cd device ata0 at isa? port IO_WD1 irq 14 .Cd device ata1 at isa? port IO_WD2 irq 15 .Pp For PCI based ATA/ATAPI support: .Cd device pci .Cd device ata .Pp To support ATA compliant disk drives: .Cd device atadisk .Pp To support ATAPI CD-ROM, CDR, CDRW, DVD-ROM and DVD-RAM drives: .Cd device atapicd .Pp To support ATAPI floppy drives, such as the ZIP and LS120: .Cd device atapifd .Pp To support ATAPI tape drives: .Cd device atapist .Pp To enable static controller and device numbering (see the .Sx NOTES section below): .Cd options ATA_STATIC_ID .Pp To enable DMA on an ATAPI device: .Cd options ATA_ENABLE_ATAPI_DMA .Sh DESCRIPTION This driver provides access to disk drives, ATAPI CD-ROM and DVD drives, ZIP drives and tape streamers connected to controllers according to the ATA and ATAPI standards. These devices are also commonly known as IDE or EIDE devices. .Pp The currently supported controllers with their maximum speed include: .Pp .Bl -tag -width "Promise Fasttrak-33 " -compact .It Acerlabs Aladdin Ultra DMA 33 (UDMA2), 33 MB/sec .It AMD 756 Ultra DMA 66 (UDMA4), 66 MB/sec .It CMD 646 DMA 2 (WDMA2), 16 MB/sec .It Cypress 82C693 DMA 2 (WDMA2), 16 MB/sec .It HighPoint HPT366 Ultra DMA 66 (UDMA4), 66 MB/sec .It Intel PIIX DMA 2 (WDMA2), 16 MB/sec .It Intel PIIX3 DMA 2 (WDMA2), 16 MB/sec .It Intel PIIX4 Ultra DMA 33 (UDMA2), 33 MB/sec .It Intel ICH Ultra DMA 66 (UDMA4), 66 MB/sec .It Promise Fasttrak-33 Ultra DMA 33 (UDMA2), 33 MB/sec .It Promise Fasttrak-66 Ultra DMA 66 (UDMA4), 66 MB/sec .It Promise Ultra-33 Ultra DMA 33 (UDMA2), 33 MB/sec .It Promise Ultra-66 Ultra DMA 66 (UDMA4), 66 MB/sec .It SiS 5591 Ultra DMA 33 (UDMA2), 33 MB/sec .It VIA 82C586 Ultra DMA 33 (UDMA2), 33 MB/sec .It VIA 82C686 Ultra DMA 66 (UDMA4), 66 MB/sec .El .Pp All unknown chipsets can be supported at the maximum speed of 16 MB/sec. .Pp The ata driver also allows for changes to the transfer mode of the devices at a later time when the system is up and running. .Pp The driver attempts to set the maximum performance transfer mode on your disk drives by selecting the highest possible DMA mode. ATAPI devices are left in PIO mode because DMA problems are common despite the device specifications. You can always try to set DMA mode on an ATAPI device using the sysctl method described here, but be aware that your hardware might .Em not support it and can .Em hang the system. .Pp To see the devices' current access modes, use the command line: .Pp .Dl sysctl hw.atamodes .Pp which results in the modes of the devices being displayed as a string like this: .Pp .Dl hw.atamodes: dma,pio,---,pio,dma,---,dma,---, (--- = no device) .Pp This means that ata0-master is in DMA mode, ata0-slave is in PIO mode, and so forth. You can set the mode with sysctl -w and a string like the above, for example: .Pp .Dl sysctl -w hw.atamodes=pio,pio,---,dma,pio,---,dma,---, .Pp The new modes are set as soon as the sysctl command returns. .Pp .Sh FILES .Bl -tag -width "/sys/i386/conf/GENERIC " -compact .It Pa /dev/ad* ATA disk device nodes .It Pa /dev/acd* ATAPI CD-ROM device nodes .It Pa /dev/afd* ATAPI floppy drive device nodes .It Pa /dev/ast* ATAPI tape drive device nodes .It Pa /sys/i386/conf/GENERIC sample generic kernel config file for ata based systems .El .Sh NOTES Static numbering (enabled with the .Dv ATA_STATIC_ID kernel option) reserves a number for each possibly connected disk, even when not present. This may result in odd situations where, for example, ad0 and ad2 exist in the absence of ad1. The advantage is that the addition of the formerly absent drive does not cause the numbers of the other drives to change. .Pp The ata driver does not support MFM/RLL/ESDI (ST-506) style disks. .Pp Remember that in order to use UDMA4 mode you .Em have to use a special 80 conductor cable, and the driver tries to determine if you have such a cable attached before setting UDMA4 mode. .Pp The use of UDMA4(66MHz) and non-UDMA4 devices on the same ATA channel is not recommended, unless they are run at the non-UDMA4 device's lower speed. The driver has been designed to handle this but some older devices do not like this. .Sh AUTHORS The ata driver was written by .An Søren Schmidt .Aq sos@FreeBSD.org . .Pp This manual page was written by .An Jeroen Ruigrok van der Werven .Aq asmodai@FreeBSD.org and .An Søren Schmidt .Aq sos@FreeBSD.org . Index: head/share/man/man4/da.4 =================================================================== --- head/share/man/man4/da.4 (revision 62585) +++ head/share/man/man4/da.4 (revision 62586) @@ -1,297 +1,297 @@ .\" 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. .\" .\" $FreeBSD$ .\" .Dd October 15, 1998 .Dt DA 4 .Os FreeBSD .Sh NAME .Nm da .Nd SCSI Direct Access Device Driver .Sh SYNOPSIS .Cd device da .Cd device da1 at scbus0 target 4 unit 0 .Sh DESCRIPTION The .Nm da driver provides support for all .Tn SCSI devices of the direct access class that are attached to the system through a supported .Tn SCSI Host Adapter. The direct access class includes disk, magneto-optical, and solid-state devices. .Pp A .Tn SCSI Host adapter must also be separately configured into the system before a .Tn SCSI direct access device can be configured. .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. .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 CACHE EFFECTS Many direct access devices are equipped with read and/or write caches. Parameters affecting the device's cache are stored in mode page 8, the caching control page. Mode pages can be examined and modified via the .Xr camcontrol 8 utility. The read cache is used to store data from device-initiated read ahead operations as well as frequently used data. The read cache is transparent to the user and can be enabled without any adverse effect. Most devices with a read cache come from the factory with it enabled. The read cache can be disabled by setting the .Tn RCD (Read Cache Disable) bit in the caching control mode page. The write cache can greatly decrease the latency of write operations and allows the device to reorganize writes to increase efficiency and performance. This performance gain comes at a price. Should the device lose power while its cache contains uncommitted write operations, these writes will be lost. The effect of a loss of write transactions on a file system is non-deterministic and can cause corruption. Most devices age write transactions to limit vulnerability to a few transactions recently reported as complete, but it is none-the-less recommended that systems with write cache enabled devices reside on an Uninterruptible Power Supply (UPS). The .Nm da device driver ensures that the cache and media are synchronized upon final close of the device or an unexpected shutdown (panic) event. This ensures that it is safe to disconnect power once the operating system has reported that it has halted. The write cache can be enabled by setting the .Tn WCE (Write Cache Enable) bit in the caching control mode page. .Sh TAGGED QUEUING The .Nm da device driver will take full advantage of the SCSI feature known as tagged queuing. Tagged queuing allows the device to process multiple transactions concurrently, often re-ordering them to reduce the number and length of seeks. To ensure that transactions to distant portions of the media, which may be deferred indefinitely by servicing requests nearer the current head position, are completed in a timely fashion, an ordered tagged transaction is sent every 15 seconds during continuous device operation. .Sh BAD BLOCK RECOVERY Direct Access devices have the capability of mapping out portions of defective media. Media recovery parameters are located in mode page 1, the Read-Write Error Recovery mode page. The most important media remapping features are 'Auto Write Reallocation' and 'Auto Read Reallocation' which can be enabled via the AWRE and ARRE bits, respectively, of the Read-Write Error Recovery page. Many devices do not ship from the factory with these feature enabled. Mode pages can be examined and modifie via the .Xr camcontrol 8 utility. .Sh KERNEL CONFIGURATION It is only necessary to explicitly configure one .Nm da 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 sys/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 drives 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. .El .Sh NOTES If a device becomes invalidated (media is removed, device becomes unresponsive) the disklabel and information held within the kernel about the device will be invalidated. To avoid corruption of a newly inserted piece of media or a replacement device, all accesses to the device will be discarded until the last file descriptor referencing the old device is closed. During this period, all new open attempts will be rejected. .Sh FILES .Bl -tag -width /dev/rsdXXXXX -compact .It Pa /dev/rda Ns Ar u raw mode .Tn SCSI disk unit .Ar u , accessed as an unpartitioned device .Sm off .It Pa /dev/da Ar u Pa s Ar n .Sm on block mode .Tn SCSI disk unit .Ar u , slice .Ar n , accessed as an unpartitioned device .Sm off .It Pa /dev/rda Ar u Pa s Ar n .Sm on raw mode .Tn SCSI disk unit .Ar u , slice .ar n , accessed as an unpartitioned device .It Pa /dev/da Ns Ar u Ns Ar p block mode .Tn SCSI disk unit .Ar u , first .Tn FreeBSD slice, partition .Ar p .It Pa /dev/rda Ns Ar u Ns Ar p raw mode .Tn SCSI disk unit .Ar u , first .Tn FreeBSD slice, partition .Ar p .Sm off .It Xo .Pa /dev/da .Ar u .Pa s .Ar n .Ar p .Xc .Sm on block mode .Tn SCSI disk unit .Ar u , .No Ar n Ns th slice, partition .Ar p .Sm off .It Xo .Pa /dev/rda .Ar u .Pa s .Ar n .Ar p .Xc .Sm on raw mode .Tn SCSI disk unit .Ar u , .No Ar n Ns th slice, partition .Ar p .El .Sh DIAGNOSTICS None. .Sh SEE ALSO -.Xr ata 4 , +.Xr ad 4 , .Xr disklabel 5 , .Xr disklabel 8 , .Xr fdisk 8 .Sh HISTORY The .Nm driver was written for the .Tn CAM .Tn SCSI subsystem by .An Justin T. Gibbs . Many ideas were gleaned from the .Nm sd device driver written and ported from .Tn Mach 2.5 by .An Julian Elischer . Support for slices was written by .An Bruce Evans .