2011-08-17 19:43:41 +00:00
|
|
|
.\" Copyright (c) 2011 Alexander Motin <mav@FreeBSD.org>
|
2000-01-27 22:39:53 +00:00
|
|
|
.\" 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
|
2011-08-17 19:43:41 +00:00
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
2000-01-27 22:39:53 +00:00
|
|
|
.\" 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.
|
|
|
|
.\"
|
2011-08-17 19:43:41 +00:00
|
|
|
.\" 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.
|
2000-01-27 22:39:53 +00:00
|
|
|
.\"
|
|
|
|
.\" $FreeBSD$
|
|
|
|
.\"
|
2012-10-02 22:03:21 +00:00
|
|
|
.Dd October 3, 2012
|
2000-01-28 12:24:53 +00:00
|
|
|
.Dt ATA 4
|
2001-07-10 15:31:11 +00:00
|
|
|
.Os
|
2000-01-27 22:39:53 +00:00
|
|
|
.Sh NAME
|
2011-08-17 19:43:41 +00:00
|
|
|
.Nm ata
|
|
|
|
.Nd generic ATA/SATA controller driver
|
2000-01-27 22:39:53 +00:00
|
|
|
.Sh SYNOPSIS
|
2011-08-17 19:43:41 +00:00
|
|
|
To compile this driver into the kernel, place the following lines in your
|
|
|
|
kernel configuration file:
|
|
|
|
.Bd -ragged -offset indent
|
|
|
|
.Cd "device scbus"
|
|
|
|
.Cd "device ata"
|
|
|
|
.Ed
|
2000-01-27 22:39:53 +00:00
|
|
|
.Pp
|
2011-08-17 19:43:41 +00:00
|
|
|
Alternatively, to load the driver as set of modules at boot time,
|
|
|
|
place some of the following lines in
|
|
|
|
.Xr loader.conf 5 :
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
ata_load="YES"
|
|
|
|
|
|
|
|
atacard_load="YES"
|
|
|
|
ataisa_load="YES"
|
|
|
|
atapci_load="YES"
|
|
|
|
|
|
|
|
ataacard_load="YES"
|
|
|
|
ataacerlabs_load="YES"
|
|
|
|
ataadaptec_load="YES"
|
|
|
|
ataahci_load="YES"
|
|
|
|
ataamd_load="YES"
|
|
|
|
ataati_load="YES"
|
|
|
|
atacenatek_load="YES"
|
|
|
|
atacypress_load="YES"
|
|
|
|
atacyrix_load="YES"
|
|
|
|
atahighpoint_load="YES"
|
|
|
|
ataintel_load="YES"
|
|
|
|
ataite_load="YES"
|
|
|
|
atajmicron_load="YES"
|
|
|
|
atamarvell_load="YES"
|
|
|
|
atamicron_load="YES"
|
|
|
|
atanational_load="YES"
|
|
|
|
atanetcell_load="YES"
|
|
|
|
atanvidia_load="YES"
|
|
|
|
atapromise_load="YES"
|
|
|
|
ataserverworks_load="YES"
|
|
|
|
atasiliconimage_load="YES"
|
|
|
|
atasis_load="YES"
|
|
|
|
atavia_load="YES"
|
|
|
|
.Ed
|
2000-01-27 22:39:53 +00:00
|
|
|
.Pp
|
2011-09-02 18:52:28 +00:00
|
|
|
The first line is for the common hardware independent code, and is a
|
|
|
|
prerequisite for the other modules.
|
|
|
|
The next three lines are generic bus-specific drivers.
|
|
|
|
Of the rest, ataahci is the AHCI driver.
|
|
|
|
The others are vendor-specific PCI drivers.
|
2000-01-27 22:39:53 +00:00
|
|
|
.Pp
|
2011-08-17 19:43:41 +00:00
|
|
|
The following tunables are settable from the
|
|
|
|
.Xr loader 8 :
|
2001-03-16 13:38:49 +00:00
|
|
|
.Bl -ohang
|
2012-06-18 19:14:06 +00:00
|
|
|
.It Va hw.ahci.force
|
|
|
|
set to nonzero value for forcing drivers to attach to some known AHCI-capable
|
|
|
|
chips even if they are configured for legacy IDE emulation (the default is 1,
|
|
|
|
force the attach).
|
2008-08-18 09:17:16 +00:00
|
|
|
.It Va hw.ata.ata_dma_check_80pin
|
2012-06-18 19:14:06 +00:00
|
|
|
set to 0 to disable the 80pin cable check (the default is 1, check the cable).
|
2009-06-24 19:25:47 +00:00
|
|
|
.It Va hint.atapci.X.msi
|
2011-09-02 18:52:28 +00:00
|
|
|
set to 1 to allow Message Signalled Interrupts (MSI) to be used by the
|
2009-06-24 19:25:47 +00:00
|
|
|
specified PCI ATA controller, if supported.
|
2010-07-03 14:14:42 +00:00
|
|
|
.It Va hint.ata.X.devX.mode
|
2012-10-02 22:03:21 +00:00
|
|
|
limits the initial ATA mode for the specified device on the specified channel.
|
2010-07-03 14:14:42 +00:00
|
|
|
.It Va hint.ata.X.mode
|
2011-09-02 18:52:28 +00:00
|
|
|
limits the initial ATA mode for every device on the specified channel.
|
2009-06-24 19:25:47 +00:00
|
|
|
.It Va hint.ata.X.pm_level
|
2011-09-02 18:52:28 +00:00
|
|
|
controls SATA interface Power Management for the specified channel,
|
|
|
|
allowing some power savings at the cost of additional command latency.
|
2009-06-24 19:25:47 +00:00
|
|
|
Possible values:
|
2012-06-02 11:03:14 +00:00
|
|
|
.Pp
|
|
|
|
.Bl -tag -width 4n -offset indent -compact
|
2009-06-24 19:25:47 +00:00
|
|
|
.It 0
|
2011-09-02 18:52:28 +00:00
|
|
|
Interface Power Management is disabled.
|
|
|
|
This is the default value.
|
2009-06-24 19:25:47 +00:00
|
|
|
.It 1
|
2011-09-02 18:52:28 +00:00
|
|
|
The device is allowed to initiate a PM state change; the host is passive.
|
2009-06-24 19:25:47 +00:00
|
|
|
.It 2
|
2011-09-02 18:52:28 +00:00
|
|
|
The host initiates a PARTIAL PM state transition every time a port becomes idle.
|
2009-06-24 19:25:47 +00:00
|
|
|
.It 3
|
|
|
|
host initiates SLUMBER PM state transition every time port becomes idle.
|
|
|
|
.El
|
2012-06-02 11:03:14 +00:00
|
|
|
.Pp
|
2011-09-02 18:52:28 +00:00
|
|
|
Modes 2 and 3 are only supported for AHCI.
|
2012-10-02 22:03:21 +00:00
|
|
|
.It Va hint.ata. Ns Ar X Ns Va .dev Ns Ar X Ns Va .sata_rev
|
|
|
|
limits the initial SATA revision (speed) for the specified device
|
|
|
|
on the specified channel.
|
|
|
|
Values 1, 2 and 3 are respectively 1.5, 3 and 6Gbps.
|
|
|
|
.It Va hint.ata. Ns Ar X Ns Va .sata_rev
|
|
|
|
Same, but for every device on the specified channel.
|
2001-03-16 13:38:49 +00:00
|
|
|
.El
|
2000-01-27 22:39:53 +00:00
|
|
|
.Sh DESCRIPTION
|
2003-11-04 13:16:07 +00:00
|
|
|
The
|
|
|
|
.Nm
|
2011-09-02 18:52:28 +00:00
|
|
|
driver gives the
|
|
|
|
.Xr CAM 4
|
|
|
|
subsystem access to the ATA (IDE) and SATA ports
|
2011-08-17 19:43:41 +00:00
|
|
|
of many generic controllers.
|
2011-09-02 18:52:28 +00:00
|
|
|
Depending on the controller, each PATA (IDE)
|
|
|
|
port or each one or two SATA ports are
|
2011-08-17 19:43:41 +00:00
|
|
|
represented to CAM as a separate bus with one or two targets.
|
|
|
|
Most of the bus-management details are handled by the ATA/SATA-specific
|
|
|
|
transport of CAM.
|
|
|
|
Connected ATA disks are handled by the ATA protocol disk peripheral driver
|
|
|
|
.Xr ada 4 .
|
|
|
|
ATAPI devices are handled by the SCSI protocol peripheral drivers
|
|
|
|
.Xr cd 4 ,
|
|
|
|
.Xr da 4 ,
|
|
|
|
.Xr sa 4 ,
|
|
|
|
etc.
|
|
|
|
.Pp
|
2011-09-02 18:52:28 +00:00
|
|
|
This driver supports ATA, and for the most of controllers, ATAPI devices.
|
2011-08-17 19:43:41 +00:00
|
|
|
Command queuing and SATA port multipliers are not supported.
|
2011-09-02 18:52:28 +00:00
|
|
|
Device hot-plug and SATA interface power management is supported only on
|
2011-08-17 19:43:41 +00:00
|
|
|
some controllers.
|
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
driver can change the transfer mode when the system is up and running.
|
2011-09-02 18:52:28 +00:00
|
|
|
See the
|
|
|
|
.Cm negotiate
|
|
|
|
subcommand of
|
|
|
|
.Xr camcontrol 8 .
|
2003-11-04 13:16:07 +00:00
|
|
|
.Pp
|
2011-08-17 19:43:41 +00:00
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
driver sets the maximum transfer mode supported by the hardware as default.
|
2011-09-02 18:52:28 +00:00
|
|
|
However, the
|
2011-08-17 19:43:41 +00:00
|
|
|
.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.
|
|
|
|
The
|
|
|
|
.Va hw.ata.ata_dma_check_80pin
|
|
|
|
tunable can be set to 0 to disable this check.
|
|
|
|
.Sh HARDWARE
|
2003-11-04 13:16:07 +00:00
|
|
|
The currently supported ATA/SATA controller chips are:
|
|
|
|
.Pp
|
|
|
|
.Bl -tag -width "Silicon Image:" -compact
|
|
|
|
.It Acard:
|
2005-08-16 14:28:03 +00:00
|
|
|
ATP850P, ATP860A, ATP860R, ATP865A, ATP865R.
|
2003-11-04 13:16:07 +00:00
|
|
|
.It ALI:
|
2010-03-03 19:44:43 +00:00
|
|
|
M5228, M5229, M5281, M5283, M5287, M5288, M5289.
|
2003-11-04 13:16:07 +00:00
|
|
|
.It AMD:
|
2007-10-05 07:06:51 +00:00
|
|
|
AMD756, AMD766, AMD768, AMD8111, CS5536.
|
2005-10-13 18:28:26 +00:00
|
|
|
.It ATI:
|
2009-11-06 11:17:33 +00:00
|
|
|
IXP200, IXP300, IXP400, IXP600, IXP700, IXP800.
|
2003-11-04 13:16:07 +00:00
|
|
|
.It CMD:
|
2005-08-15 15:07:47 +00:00
|
|
|
CMD646, CMD646U2, CMD648, CMD649.
|
2003-11-04 13:16:07 +00:00
|
|
|
.It Cypress:
|
|
|
|
Cypress 82C693.
|
2004-01-26 07:21:28 +00:00
|
|
|
.It Cyrix:
|
|
|
|
Cyrix 5530.
|
2003-11-04 13:16:07 +00:00
|
|
|
.It HighPoint:
|
2005-08-15 15:07:47 +00:00
|
|
|
HPT302, HPT366, HPT368, HPT370, HPT371, HPT372, HPT372N, HPT374.
|
2003-11-04 13:16:07 +00:00
|
|
|
.It Intel:
|
2010-03-03 19:44:43 +00:00
|
|
|
6300ESB, 31244, PIIX, PIIX3, PIIX4, ESB2, ICH, ICH0, ICH2, ICH3, ICH4, ICH5,
|
|
|
|
ICH6, ICH7, ICH8, ICH9, ICH10, SCH, PCH.
|
2005-03-23 08:58:51 +00:00
|
|
|
.It ITE:
|
2008-10-03 11:37:33 +00:00
|
|
|
IT8211F, IT8212F, IT8213F.
|
2006-01-26 05:31:19 +00:00
|
|
|
.It JMicron:
|
2007-01-04 09:12:03 +00:00
|
|
|
JMB360, JMB361, JMB363, JMB365, JMB366, JMB368.
|
2005-12-28 09:35:29 +00:00
|
|
|
.It Marvell
|
2012-03-02 08:49:07 +00:00
|
|
|
88SX5040, 88SX5041, 88SX5080, 88SX5081, 88SX6041, 88SX6042, 88SX6081, 88SE6101,
|
|
|
|
88SE6102, 88SE6111, 88SE6121, 88SE6141, 88SE6145, 88SX7042.
|
2003-11-04 13:16:07 +00:00
|
|
|
.It National:
|
|
|
|
SC1100.
|
2007-02-06 09:50:17 +00:00
|
|
|
.It NetCell:
|
|
|
|
NC3000, NC5000.
|
2003-11-04 13:16:07 +00:00
|
|
|
.It nVidia:
|
2009-11-06 11:17:33 +00:00
|
|
|
nForce, nForce2, nForce2 MCP, nForce3, nForce3 MCP, nForce3 Pro, nForce4,
|
|
|
|
MCP51, MCP55, MCP61, MCP65, MCP67, MCP73, MCP77, MCP79, MCP89.
|
2003-11-04 13:16:07 +00:00
|
|
|
.It Promise:
|
2010-10-07 12:58:09 +00:00
|
|
|
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.
|
2003-11-04 13:16:07 +00:00
|
|
|
.It ServerWorks:
|
2007-01-04 09:12:03 +00:00
|
|
|
HT1000, ROSB4, CSB5, CSB6, K2, Frodo4, Frodo8.
|
2003-11-04 13:16:07 +00:00
|
|
|
.It Silicon Image:
|
2007-03-10 12:44:22 +00:00
|
|
|
SiI0680, SiI3112, SiI3114, SiI3124, SiI3132, SiI3512.
|
2003-11-04 13:16:07 +00:00
|
|
|
.It SiS:
|
2010-10-07 12:58:09 +00:00
|
|
|
SIS180, SIS181, SIS182, SIS5513, SIS530, SIS540, SIS550, SIS620, SIS630,
|
|
|
|
SIS630S, SIS633, SIS635, SIS730, SIS733, SIS735, SIS745, SIS961, SIS962,
|
|
|
|
SIS963, SIS964, SIS965.
|
2003-11-04 13:16:07 +00:00
|
|
|
.It VIA:
|
2010-03-03 19:44:43 +00:00
|
|
|
VT6410, VT6420, VT6421, VT82C586, VT82C586B, VT82C596, VT82C596B, VT82C686,
|
|
|
|
VT82C686A, VT82C686B, VT8231, VT8233, VT8233A, VT8233C, VT8235, VT8237,
|
2010-11-18 18:09:25 +00:00
|
|
|
VT8237A, VT8237S, VT8251, CX700, VX800, VX855, VX900.
|
2000-01-27 22:39:53 +00:00
|
|
|
.El
|
|
|
|
.Pp
|
2011-08-17 19:43:41 +00:00
|
|
|
Some of above chips are also supported by the more featured
|
|
|
|
.Xr ahci 4 ,
|
|
|
|
.Xr mvs 4 ,
|
|
|
|
and
|
|
|
|
.Xr siis 4
|
|
|
|
drivers.
|
|
|
|
If both drivers are loaded at the same time, those will have precedence.
|
|
|
|
.Pp
|
2004-06-16 08:33:57 +00:00
|
|
|
Unknown ATA chipsets are supported in PIO modes, and if the standard
|
2003-11-05 10:08:34 +00:00
|
|
|
busmaster DMA registers are present and contain valid setup, DMA is
|
2004-06-21 17:42:49 +00:00
|
|
|
also enabled, although the max mode is limited to UDMA33, as it is
|
2003-11-04 13:16:07 +00:00
|
|
|
not known what the chipset can do and how to program it.
|
2000-01-27 22:39:53 +00:00
|
|
|
.Sh NOTES
|
2003-11-04 13:16:07 +00:00
|
|
|
Please remember that in order to use UDMA4/ATA66 and above modes you
|
|
|
|
.Em must
|
2003-11-04 19:35:27 +00:00
|
|
|
use 80 conductor cables.
|
2010-09-11 10:49:56 +00:00
|
|
|
Please assure that ribbon cables are no longer than 45cm.
|
2003-11-05 10:08:34 +00:00
|
|
|
In case of rounded ATA cables, the length depends on the
|
2003-11-04 19:35:27 +00:00
|
|
|
quality of the cables.
|
2003-11-05 10:08:34 +00:00
|
|
|
SATA cables can be up to 1m long according to the specification.
|
2011-08-17 19:43:41 +00:00
|
|
|
External SATA cables can be 2m long and more, but not all controllers
|
|
|
|
work well on long cables, especially at high speeds.
|
2001-03-16 13:38:49 +00:00
|
|
|
.Sh SEE ALSO
|
2011-08-17 19:43:41 +00:00
|
|
|
.Xr ada 4 ,
|
2010-03-03 19:44:43 +00:00
|
|
|
.Xr ahci 4 ,
|
|
|
|
.Xr cam 4 ,
|
2011-08-17 19:43:41 +00:00
|
|
|
.Xr camcontrol 8 ,
|
2010-11-28 23:34:20 +00:00
|
|
|
.Xr cd 4 ,
|
2011-08-17 19:43:41 +00:00
|
|
|
.Xr mvs 4 ,
|
2010-03-03 19:44:43 +00:00
|
|
|
.Xr siis 4
|
2000-12-14 11:52:05 +00:00
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
driver first appeared in
|
|
|
|
.Fx 4.0 .
|
2011-09-02 18:52:28 +00:00
|
|
|
It was turned into a
|
|
|
|
.Xr CAM 4
|
|
|
|
interface module in
|
2011-08-17 19:43:41 +00:00
|
|
|
.Fx 9.0 .
|
2003-11-05 10:08:34 +00:00
|
|
|
.Sh AUTHORS
|
2011-08-17 19:43:41 +00:00
|
|
|
.An Alexander Motin
|
|
|
|
.Aq mav@FreeBSD.org ,
|
2000-11-14 13:09:12 +00:00
|
|
|
.An S\(/oren Schmidt
|
2011-09-02 18:52:28 +00:00
|
|
|
.Aq sos@FreeBSD.org
|