aboutsummaryrefslogtreecommitdiff
path: root/sbin/atacontrol
Commit message (Collapse)AuthorAgeFilesLines
* MFp4:Alexander Motin2009-12-061-6/+17
| | | | | | | | | | | | | | | | | | | | | Introduce ATA_CAM kernel option, turning ata(4) controller drivers into cam(4) interface modules. When enabled, this options deprecates all ata(4) peripheral drivers (ad, acd, ...) and interfaces and allows cam(4) drivers (ada, cd, ...) and interfaces to be natively used instead. As side effect of this, ata(4) mode setting code was completely rewritten to make controller API more strict and permit above change. While doing this, SATA revision was separated from PATA mode. It allows DMA-incapable SATA devices to operate and makes hw.ata.atapi_dma tunable work again. Also allow ata(4) controller drivers (except some specific or broken ones) to handle larger data transfers. Previous constraint of 64K was artificial and is not really required by PCI ATA BM specification or hardware. Submitted by: nwitehorn (powerpc part) Notes: svn path=/head/; revision=200171
* Drop USB mass storage devices support from ata(4). It is out of the build asAlexander Motin2009-11-261-6/+0
| | | | | | | | | | | long as I remember, and completely superseded by better maintained umass(4). It's main idea was to optionally avoid CAM dependency for such devices, but with move ATA to CAM, it is not actual any more. No objections: hselasky@, thompsa@, arch@ Notes: svn path=/head/; revision=199822
* Add some missing WDMA/UDMA modes.Alexander Motin2009-11-221-0/+11
| | | | Notes: svn path=/head/; revision=199644
* Switch the default WARNS level for sbin/ to 6.Ruslan Ermilov2009-10-191-1/+0
| | | | | | | Submitted by: Ulrich Spörlein Notes: svn path=/head/; revision=198236
* Bring SATA revision reporting into conformance with SATA-IO guidelines.Alexander Motin2009-02-231-6/+6
| | | | Notes: svn path=/head/; revision=188959
* Add SATA and USB modes for completeness. USB modes principally can't be set,Alexander Motin2009-02-222-7/+12
| | | | | | | | | SATA mode setting is not implementes at this time. Submitted by: Christoph Mallon Notes: svn path=/head/; revision=188922
* Display an error message when the requested mode is not known. So the user canRoman Divacky2009-02-191-0/+2
| | | | | | | | | | | | distinguish between a typo in the mode name and that the device does not support a certain mode (till now both causes show the same result, i.e. the old mode is displayed). Submitted by: Christoph Mallon <christoph.mallon gmx.de> Approved by: kib (mentor) Notes: svn path=/head/; revision=188829
* Fix the fallouts from r146267:Ruslan Ermilov2008-12-141-7/+12
| | | | | | | | - Add the forgotten "mode" argument to the "mode" command. - Move the description of "info" to where it belongs. Notes: svn path=/head/; revision=186079
* Make atacontrol(8) rebuild work when /usr is not mounted or from /rescueAntoine Brodin2008-08-061-6/+25
| | | | | | | | | PR: bin/125680 MFC after: 1 month Tested by: Stef Walter Notes: svn path=/head/; revision=181349
* Document spindown constraints as given in the original commitBjoern A. Zeeb2008-06-251-1/+22
| | | | | | | | | | | message[1] and later clarification provided by phk. [1] http://docs.freebsd.org/cgi/mid.cgi?200803171033.m2HAXOeN055116 Reviewed by: brueffer, phk, ed Notes: svn path=/head/; revision=180005
* Fix for a bug I introduced when I cleaned up atacontrol: Don't terminatePoul-Henning Kamp2008-05-151-3/+5
| | | | | | | | | if we are listing devices, a controller might legitimately not be there. Submitted by: "Andrey V. Elsukov" <bu7cher@yandex.ru> Notes: svn path=/head/; revision=179005
* Add a "spindown" facility to ata-disks: If no requests have been receivedPoul-Henning Kamp2008-03-172-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | for a configurable number of seconds, spin the disk down. Spin it back up on the next request. Notice that the timeout is only armed by a request, so to spin down a disk you may have to do: atacontrol spindown ad10 5 dd if=/dev/ad10 of=/dev/null count=1 To disable spindown, set timeout to zero: atacontrol spindown ad10 0 In order to debug any trouble caused, this code is somewhat noisy on the console. Enabling spindown on a disk containing / or /var/log/messages is not going to do anything sensible. Spinning a disk up and down all the time will wear it out, use sensibly. Approved by: sos Notes: svn path=/head/; revision=177298
* Un-cut&paste argument processing, fix things lint found.Poul-Henning Kamp2008-03-161-104/+67
| | | | Notes: svn path=/head/; revision=177262
* Recognize CFA devices using either identification method.Poul-Henning Kamp2007-12-161-4/+4
| | | | Notes: svn path=/head/; revision=174683
* Report CFA extension, CFA -> (Compact) Flash AssociationPoul-Henning Kamp2007-12-161-0/+4
| | | | Notes: svn path=/head/; revision=174665
* Expand the EXAMPLES section for atacontrol.8Remko Lodder2007-11-281-1/+105
| | | | | | | | | PR: docs/117310 Submitted by: Ted Mittelstaedt <tedm at ipinc dot net> with minor modifications by me. Notes: svn path=/head/; revision=174034
* Expand the data structure returned by the ATA RAID status ioctl to includeJohn Baldwin2007-08-131-19/+31
| | | | | | | | | | | | detailed status on each of the backing subdisks. This allows userland to see which subdisks are online, failed, missing, or a hot spare. MFC after: 1 week Approved by: re (bmah) Reviewed by: sos Notes: svn path=/head/; revision=171819
* Add new modes.Søren Schmidt2006-03-151-0/+4
| | | | Notes: svn path=/head/; revision=156749
* Remove accidental debug leftovers.Søren Schmidt2006-01-301-1/+0
| | | | Notes: svn path=/head/; revision=155038
* Update copyright header to match rest of ATA.Søren Schmidt2006-01-231-3/+1
| | | | Notes: svn path=/head/; revision=154705
* Properly print the SATA protocal version.Søren Schmidt2006-01-181-4/+9
| | | | Notes: svn path=/head/; revision=154510
* o Correct usage(): delete command takes as argument array not channel.Maxim Konovalov2005-12-141-1/+1
| | | | | | | | | PR: bin/90353 Submitted by: Gavin Atkinson MFC after: 1 week Notes: svn path=/head/; revision=153410
* -mdoc sweep.Ruslan Ermilov2005-11-181-4/+4
| | | | Notes: svn path=/head/; revision=152568
* Clarify how the 'channel' argument should look like and add anChristian Brueffer2005-08-161-2/+7
| | | | | | | | | | | | example on how to obtain information on devices on an ata channel. PR: 84676 Submitted by: Kevin Oberman <oberman@es.net> Jeremie Le Hen <jeremie@le-hen.org> MFC after: 3 days Notes: svn path=/head/; revision=149155
* Fix status to report status from the given array.Søren Schmidt2005-08-051-3/+8
| | | | Notes: svn path=/head/; revision=148730
* Open devices RDONLY for ioctls. That makes it work on open devices to whichSøren Schmidt2005-06-061-2/+2
| | | | | | | GEOM doesn't allow WR access. Notes: svn path=/head/; revision=147063
* Print the rigth argv string on error (too much c&p)..Søren Schmidt2005-05-201-4/+4
| | | | Notes: svn path=/head/; revision=146434
* Fixed markup from the previous revision.Ruslan Ermilov2005-05-161-8/+7
| | | | Notes: svn path=/head/; revision=146271
* Reflect the new usage.Søren Schmidt2005-05-161-39/+17
| | | | Notes: svn path=/head/; revision=146267
* Change the way ioctls are issue to ATA.Søren Schmidt2005-05-161-183/+217
| | | | | | | | | The most prominent part is that its now possible to issue ata_requests directly to say acd0, instead of going through the cumbersome /dev/ata device. Notes: svn path=/head/; revision=146266
* This is the much rumoured ATA mkIII update that I've been working on.Søren Schmidt2005-03-301-14/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o ATA is now fully newbus'd and split into modules. This means that on a modern system you just load "atapci and ata" to get the base support, and then one or more of the device subdrivers "atadisk atapicd atapifd atapist ataraid". All can be loaded/unloaded anytime, but for obvious reasons you dont want to unload atadisk when you have mounted filesystems. o The device identify part of the probe has been rewritten to fix the problems with odd devices the old had, and to try to remove so of the long delays some HW could provoke. Also probing is done without the need for interrupts, making earlier probing possible. o SATA devices can be hot inserted/removed and devices will be created/ removed in /dev accordingly. NOTE: only supported on controllers that has this feature: Promise and Silicon Image for now. On other controllers the usual atacontrol detach/attach dance is still needed. o Support for "atomic" composite ATA requests used for RAID. o ATA RAID support has been rewritten and and now supports these metadata formats: "Adaptec HostRAID" "Highpoint V2 RocketRAID" "Highpoint V3 RocketRAID" "Intel MatrixRAID" "Integrated Technology Express" "LSILogic V2 MegaRAID" "LSILogic V3 MegaRAID" "Promise FastTrak" "Silicon Image Medley" "FreeBSD PseudoRAID" o Update the ioctl API to match new RAID levels etc. o Update atacontrol to know about the new RAID levels etc NOTE: you need to recompile atacontrol with the new sys/ata.h, make world will take care of that. NOTE2: that rebuild is done differently from the old system as the rebuild is now done piggybacked on read requests to the array, so atacontrol simply starts a background "dd" to rebuild the array. o The reinit code has been worked over to be much more robust. o The timeout code has been overhauled for races. o Support of new chipsets. o Lots of fixes for bugs found while doing the modulerization and reviewing the old code. Missing or changed features from current ATA: o atapi-cd no longer has support for ATAPI changers. Todays its much cheaper and alot faster to copy those CD images to disk and serve them from there. Besides they dont seem to be made anymore, maybe for that exact reason. o ATA RAID can only read metadata from all the above metadata formats, not write all of them (Promise and Highpoint V2 so far). This means that arrays can be picked up from the BIOS, but they cannot be created from FreeBSD. There is more to it than just the missing write metadata support, those formats are not unique to a given controller like Promise and Highpoint formats, instead they exist for several types, and even worse, some controllers can have different formats and its impossible to tell which one. The outcome is that we cannot reliably create the metadata of those formats and be sure the controller BIOS will understand it. However write support is needed to update/fail/rebuild the arrays properly so it sits fairly high on the TODO list. o So far atapicam is not supported with these changes. When/if this will change is up to the maintainer of atapi-cam so go there for questions. HW donated by: Webveveriet AS HW donated by: Frode Nordahl HW donated by: Yahoo! HW donated by: Sentex Patience by: Vife and my boys (and even the cats) Notes: svn path=/head/; revision=144330
* Distinguish between TCQ and NCQ type of tagged queing.Søren Schmidt2004-09-151-9/+11
| | | | Notes: svn path=/head/; revision=135259
* Mechanically kill hard sentence breaks.Ruslan Ermilov2004-07-021-1/+1
| | | | Notes: svn path=/head/; revision=131488
* Whitespace cleanup.Dag-Erling Smørgrav2004-05-201-22/+22
| | | | Notes: svn path=/head/; revision=129495
* Add printing of relevant SATA info where approbiate.Søren Schmidt2004-03-151-9/+31
| | | | Notes: svn path=/head/; revision=127022
* CosmeticsSøren Schmidt2004-01-211-1/+1
| | | | Notes: svn path=/head/; revision=124814
* Make sure argv[x] exists before using it.Johan Karlsson2003-11-051-9/+15
| | | | | | | | | | | PR: 56696 Reported by: Igor Truszkowski <igort@intergate.pl> Submitted by: maxim@ Approved by: sos@ MFC after: 2 weeks Notes: svn path=/head/; revision=122139
* Make this WARNS=6 clean by:Johan Karlsson2003-11-052-4/+14
| | | | | | | | | | | | | | - declaring 'mode2str' as returning a 'const char *' - prototyping all function - rename the argument 'version' to 'ver', not to shadow the now prototyped function 'version'. Also mark it as WARNS?= 6 clean to try to keep it clean. Tested by: make universe (including amd64) Notes: svn path=/head/; revision=122133
* Adjust to the new sys/ata.h layoutSøren Schmidt2003-08-241-29/+35
| | | | Notes: svn path=/head/; revision=119405
* DOnt allow getting caps from other than master and slave device :)Søren Schmidt2003-05-051-0/+3
| | | | Notes: svn path=/head/; revision=114730
* Added more descriptive error outputs.Søren Schmidt2003-05-041-13/+39
| | | | | | | PR: 46096 Notes: svn path=/head/; revision=114657
* On getting status print the stripesize on RAID0's.Søren Schmidt2003-05-041-2/+4
| | | | Notes: svn path=/head/; revision=114655
* Add "addspare" functionality.Søren Schmidt2003-05-022-3/+20
| | | | Notes: svn path=/head/; revision=114530
* Make this WARNS=2 clean by using %j and (uintmax_t).Johan Karlsson2003-04-222-2/+2
| | | | | | | | Reviewed by: tjr@ on audit@ Approved by: silence from sos@ Notes: svn path=/head/; revision=113866
* - Add a new ioctl to get the maximum number of ATA channels.Maxime Henrion2003-03-221-4/+7
| | | | | | | | | | | | | - Use it in atacontrol(8) when listing ATA devices instead of stopping at the first ENXIO received. This makes atacontrol list work on my sparc64 where the two ATA channels I have are numbered 2 and 3. Reviewed by: sos Notes: svn path=/head/; revision=112494
* mdoc(7) police: markup nits.Ruslan Ermilov2002-12-231-19/+31
| | | | Notes: svn path=/head/; revision=108218
* Add a list of currently supported modes && an EXAMPLES section.Tom Rhodes2002-12-141-0/+34
| | | | | | | | PR: 40465 Submitted by: Cyrille Lefevre <cyrille.lefevre@laposte.net> Notes: svn path=/head/; revision=107873
* Don't depend on <sys/types.h> pollution in <fcntl.h>. Sort includes.Mike Barcroft2002-09-161-4/+6
| | | | Notes: svn path=/head/; revision=103387
* Use the proper fields for security.Søren Schmidt2002-09-121-2/+2
| | | | | | | PR: 41870 Notes: svn path=/head/; revision=103250
* mdoc(7) police: kill hard sentence break.Ruslan Ermilov2002-08-131-1/+2
| | | | Notes: svn path=/head/; revision=101788