From d81667077f4735b28afb6e4740b1880a786aa525 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Thu, 14 Jun 2007 23:00:36 +0000 Subject: [PATCH] Document that nata(4) is now our default ATA driver: * Bring in a modified version of FreeBSD's ata(4) manual page as nata(4). * Adjust related manual pages. * Remove sata(4) MLINK. --- etc/Makefile | 3 +- sbin/natacontrol/natacontrol.8 | 25 ++-- share/man/man4/Makefile | 12 +- share/man/man4/ata.4 | 19 ++- share/man/man4/nata.4 | 222 +++++++++++++++++++++++++++++++++ 5 files changed, 261 insertions(+), 20 deletions(-) create mode 100644 share/man/man4/nata.4 diff --git a/etc/Makefile b/etc/Makefile index 54a563f66c..1791c86ba0 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -1,6 +1,6 @@ # from: @(#)Makefile 5.11 (Berkeley) 5/21/91 # $FreeBSD: src/etc/Makefile,v 1.219.2.38 2003/03/04 09:49:00 ru Exp $ -# $DragonFly: src/etc/Makefile,v 1.174 2007/06/09 03:09:38 dillon Exp $ +# $DragonFly: src/etc/Makefile,v 1.175 2007/06/14 23:00:36 swildner Exp $ .if !defined(NO_SENDMAIL) SUBDIR= sendmail @@ -514,6 +514,7 @@ upgrade_etc: preupgrade rm -f ${DESTDIR}/dev/scd* csh -c "rm -f ${DESTDIR}/usr/share/man/{man,cat}4/{m,s}cd.4.gz" rm -f ${DESTDIR}/etc/rc.d/archdep + csh -c "rm -f ${DESTDIR}/usr/share/man/{man,cat}4/sata.4.gz" ldconfig -R .if !defined(BINARY_UPGRADE) # binary upgrade just copies these nodes .if !defined(NOMAN) diff --git a/sbin/natacontrol/natacontrol.8 b/sbin/natacontrol/natacontrol.8 index de928d9a1b..c0b5cd6b0d 100644 --- a/sbin/natacontrol/natacontrol.8 +++ b/sbin/natacontrol/natacontrol.8 @@ -24,7 +24,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD: src/sbin/atacontrol/atacontrol.8,v 1.28 2005/11/18 10:32:09 ru Exp $ -.\" $DragonFly: src/sbin/natacontrol/natacontrol.8,v 1.1 2006/12/05 21:32:21 tgen Exp $ +.\" $DragonFly: src/sbin/natacontrol/natacontrol.8,v 1.2 2007/06/14 23:00:36 swildner Exp $ .\" .Dd December 5, 2006 .Dt NATACONTROL 8 @@ -136,10 +136,11 @@ of the individual disks named .Ar disk0 ... diskN . .Ek .Pp -Although the NATA driver allows for creating an ATA RAID on disks with any -controller, there are restrictions. -It is only possible to boot on -an array if it is either located on a +Although the +.Xr nata 4 +driver allows for creating an ATA RAID on disks with any controller, +there are restrictions. +It is only possible to boot on an array if it is either located on a .Dq real ATA RAID controller like the Promise or Highpoint controllers, or if the RAID declared is of @@ -161,10 +162,12 @@ Get the status of an ATA RAID. .It Ic mode Without the mode argument, the current transfer modes of the device are printed. -If the mode argument is given, the NATA driver -is asked to change the transfer mode to the one given. -The NATA driver -will reject modes that are not supported by the hardware. +If the mode argument is given, the +.Xr nata 4 +driver is asked to change the transfer mode to the one given. +The +.Xr nata 4 +driver will reject modes that are not supported by the hardware. Modes are given like .Dq Li PIO3 , .Dq Li udma2 , @@ -228,7 +231,9 @@ command returns. The .Nm utility first appeared in -.Fx 4.6 . +.Fx 4.6 +and was imported into +.Dx 1.7 . .Sh AUTHORS .An -nosplit The diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index a2bfd1ae82..e8b7cb0b2f 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -1,6 +1,6 @@ # @(#)Makefile 8.1 (Berkeley) 6/18/93 # $FreeBSD: src/share/man/man4/Makefile,v 1.83.2.66 2003/06/04 17:10:30 sam Exp $ -# $DragonFly: src/share/man/man4/Makefile,v 1.53 2007/05/26 08:50:49 sephe Exp $ +# $DragonFly: src/share/man/man4/Makefile,v 1.54 2007/06/14 23:00:36 swildner Exp $ MAN= aac.4 \ acpi.4 \ @@ -121,6 +121,7 @@ MAN= aac.4 \ mtio.4 \ multicast.4 \ my.4 \ + nata.4 \ natm.4 \ ncr.4 \ netgraph.4 \ @@ -303,11 +304,6 @@ MAN= aac.4 \ zero.4 MLINKS= agp.4 agpgart.4 -MLINKS+=ata.4 acd.4 \ - ata.4 ad.4 \ - ata.4 afd.4 \ - ata.4 ast.4 \ - ata.4 sata.4 MLINKS+=bktr.4 brooktree.4 MLINKS+=fd.4 stderr.4 \ fd.4 stdin.4 \ @@ -319,6 +315,10 @@ MLINKS+=ipfirewall.4 ipaccounting.4 \ MLINKS+=lo.4 loop.4 MLINKS+=lp.4 plip.4 MLINKS+=mem.4 kmem.4 +MLINKS+=nata.4 acd.4 \ + nata.4 ad.4 \ + nata.4 afd.4 \ + nata.4 ast.4 MLINKS+=netintro.4 networking.4 MLINKS+=pccbb.4 cbb.4 MLINKS+=pcm.4 sound.4 diff --git a/share/man/man4/ata.4 b/share/man/man4/ata.4 index 4ebe158ce1..aa85bb3814 100644 --- a/share/man/man4/ata.4 +++ b/share/man/man4/ata.4 @@ -25,9 +25,9 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD: src/share/man/man4/ata.4,v 1.3.2.18 2002/10/16 13:40:51 fjoe Exp $ -.\" $DragonFly: src/share/man/man4/ata.4,v 1.6 2007/05/17 08:19:01 swildner Exp $ +.\" $DragonFly: src/share/man/man4/ata.4,v 1.7 2007/06/14 23:00:36 swildner Exp $ .\" -.Dd January 27, 2000 +.Dd June 15, 2007 .Dt ATA 4 .Os .Sh NAME @@ -36,7 +36,7 @@ .Nm ad , .Nm afd , .Nm ast -.Nd generic (S)ATA/ATAPI disk controller driver +.Nd deprecated (S)ATA/ATAPI disk controller driver .Sh SYNOPSIS For ISA based ATA/ATAPI support: .Cd device isa @@ -74,6 +74,18 @@ set to 1 to enable Tagged Queuing support, 0 to disable (default is disabled). (Only IBM DPTA, DTLA, ICxxxxxxAT, ICxxxxxxAV drives support that.) .El .Sh DESCRIPTION +The +.Nm +driver is the deprecated +.Fx 4.8 +ATA driver. +.Dx Ap s +default ATA driver is +.Xr nata 4 +which was ported from newer +.Fx +code. +.Pp 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. @@ -235,6 +247,7 @@ unless they are run at the non-UDMA4 device's lower speed. The driver has been designed to handle that kind of setup but lots of older devices do not like this. .Sh SEE ALSO +.Xr nata 4 , .Xr atacontrol 8 , .Xr burncd 8 .Sh HISTORY diff --git a/share/man/man4/nata.4 b/share/man/man4/nata.4 new file mode 100644 index 0000000000..9dfef81497 --- /dev/null +++ b/share/man/man4/nata.4 @@ -0,0 +1,222 @@ +.\" +.\" Copyright (c) 2003 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, +.\" without modification, immediately at the beginning of the file. +.\" 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. +.\" 3. The name of the author may not be used to endorse or promote products +.\" derived from this software without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 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: src/share/man/man4/ata.4,v 1.72 2007/03/10 12:44:22 brueffer Exp $ +.\" $DragonFly: src/share/man/man4/nata.4,v 1.1 2007/06/14 23:00:36 swildner Exp $ +.\" +.Dd June 14, 2007 +.Dt NATA 4 +.Os +.Sh NAME +.Nm nata , +.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 nata0 at isa? port IO_WD1 irq 14 +.Cd device nata1 at isa? port IO_WD2 irq 15 +.Pp +For PCI based ATA/ATAPI support: +.Cd device pci +.Cd device nata +.Pp +To support ATA compliant disk drives: +.Cd device natadisk +.Pp +To support ATA software RAID's: +.Cd device nataraid +.Pp +To support ATAPI CDROM, DVD and CD/DVD burner drives: +.Cd device natapicd +.Pp +To support ATAPI floppy drives: +.Cd device natapifd +.Pp +To support ATAPI tape drives: +.Cd device natapist +.Pp +The following tunables are settable from the loader: +.Bl -ohang +.It Va hw.ata.ata_dma +set to 1 for DMA access, 0 for PIO (default is DMA). +.It Va hw.ata.atapi_dma +set to 1 for DMA access, 0 for PIO (default is DMA). +.It Va hw.ata.wc +set to 1 to enable Write Caching, 0 to disable (default is enabled). +.Em WARNING : +can cause data loss on power failures and crashes. +.El +.Sh DESCRIPTION +The +.Nm +driver provides access to ATA (IDE) and SerialATA disk drives, +ATAPI CDROM/DVD drives, ZIP/LS120 ATAPI drives and ATAPI tape drives +connected to controllers according to the ATA/ATAPI standards. +.Pp +.Nm Nata +is the default ATA driver of +.Dx . +The old +.Fx 4.8 +driver is still available, but deprecated. +For more information, see +.Xr ata 4 . +.Pp +The currently supported ATA/SATA controller chips are: +.Pp +.Bl -tag -width "Silicon Image:" -compact +.It Acard: +ATP850P, ATP860A, ATP860R, ATP865A, ATP865R. +.It ALI: +M5229, M5281, M5287, M5288, M5289. +.It AMD: +AMD756, AMD766, AMD768, AMD8111. +.It ATI: +IXP200, IXP300, IXP400. +.It CMD: +CMD646, CMD646U2, CMD648, CMD649. +.It Cypress: +Cypress 82C693. +.It Cyrix: +Cyrix 5530. +.It HighPoint: +HPT302, HPT366, HPT368, HPT370, HPT371, HPT372, HPT372N, HPT374. +.It Intel: +6300ESB, 31244, PIIX, PIIX3, PIIX4, ESB2, ICH, ICH0, ICH2, ICH3, ICH4, ICH5, ICH6, ICH7, ICH8. +.It ITE: +IT8211F, IT8212F. +.It JMicron: +JMB360, JMB361, JMB363, JMB365, JMB366, JMB368. +.It Marvell +88SX5040, 88SX5041, 88SX5080, 88SX5081, 88SX6041, 88SX6081, 88SX6101, 88SX6141. +.It National: +SC1100. +.It NetCell: +NC3000, NC5000. +.It nVidia: +nForce, nForce2, nForce2 MCP, nForce3, nForce3 MCP, nForce3 Pro, nForce4. +.It Promise: +PDC20246, PDC20262, PDC20263, PDC20265, PDC20267, PDC20268, PDC20269, PDC20270, PDC20271, PDC20275, PDC20276, PDC20277, PDC20318, PDC20319, PDC20371, PDC20375, PDC20376, PDC20377, PDC20378, PDC20379, PDC20571, PDC20575, PDC20579, PDC20580, PDC20617, PDC20618, PDC20619, PDC20620, PDC20621, PDC20622, PDC40518, PDC40519, PDC40718, PDC40719. +.It ServerWorks: +HT1000, ROSB4, CSB5, CSB6, K2, Frodo4, Frodo8. +.It Silicon Image: +SiI0680, SiI3112, SiI3114, SiI3124, SiI3132, SiI3512. +.It SiS: +SIS180, SIS181, SIS182, SIS5513, SIS530, SIS540, SIS550, SIS620, SIS630, SIS630S, SIS633, SIS635, SIS730, SIS733, SIS735, SIS745, SIS961, SIS962, SIS963, SIS964, SIS965. +.It VIA: +VT6410, VT6420, VT6421, VT82C586, VT82C586B, VT82C596, VT82C596B, VT82C686, VT82C686A, VT82C686B, VT8231, VT8233, VT8233A, VT8233C, VT8235, VT8237, VT8237A, VT8251. +.El +.Pp +Unknown ATA chipsets are supported in PIO modes, and if the standard +busmaster DMA registers are present and contain valid setup, DMA is +also enabled, although the max mode is limited to UDMA33, as it is +not known what the chipset can do and how to program it. +.Pp +The +.Nm +driver can change the transfer mode and various other parameters +when the system is up and running. +See +.Xr natacontrol 8 . +.Pp +The +.Nm +driver sets the maximum transfer mode supported by the hardware as default. +However the +.Nm +driver sometimes warns: +.Dq Sy "DMA limited to UDMA33, non-ATA66 cable or device". +This means that the +.Nm +driver has detected that the required 80 conductor cable is not present +or could not be detected properly, or that one of the devices on the +channel only accepts up to UDMA2/ATA33. +.Pp +Unknown ATAPI devices are initialized to DMA mode if the +.Va hw.ata.atapi_dma +tunable is set to 1 and they support at least UDMA33 transfers. +Otherwise they are set to PIO mode because severe DMA problems are +common even if the device capabilities indicate support. +You can always try to set DMA mode on an ATAPI device using +.Xr natacontrol 8 , +but be aware that your hardware might +.Em not +support it and can potentially +.Em hang +the entire system causing data loss. +.Sh FILES +.Bl -tag -width ".Pa /sys/config/GENERIC" -compact +.It Pa /dev/ad* +ATA disk device nodes +.It Pa /dev/ar* +ATA RAID 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/config/GENERIC +sample generic kernel config file for +.Nm +based systems +.El +.Sh NOTES +Please remember that in order to use UDMA4/ATA66 and above modes you +.Em must +use 80 conductor cables. +Please assure that ribbon cables are no longer than 45cm. +In case of rounded ATA cables, the length depends on the quality of the cables. +SATA cables can be up to 1m long according to the specification. +.Pp +Static device numbering (enabled with the +.Dv ATA_STATIC_ID +kernel option) reserves a number for each possibly connected disk, +even when not present. +This is useful in hotswap scenarios where disks should always show up +as the same numbered device, and not depend on attach order. +.Pp +Native Command Queuing (NCQ) on SATA drives is not yet supported. +.Sh SEE ALSO +.Xr ata 4 , +.Xr nataraid 4 , +.Xr burncd 8 , +.Xr natacontrol 8 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 4.0 +and was imported into +.Dx 1.7 . +.Sh AUTHORS +.An S\(/oren Schmidt +.Aq sos@FreeBSD.org . -- 2.41.0