summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/ata-raid.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Add support for creating/deleting ATA RAID's.sos2002-03-271-99/+315
| | | | | | | | | | | | | | This completes the ATA RAID support, since all functions to manipulate the RAID are accessible from FreeBSD, the BIOS on the ATA RAID cards are only nessesary for booting. I decided to allow for creation of ATA RAID's on any ATA controller, but please keep in mind the restrictions on that. Due to the BIOS not knowing what to do you can only boot from a RAID1 or the first disk in a SPAN, if its not located on a "real" ATA RAID controller like the Promise or Highpoint controllers. Sponsored by: Advanis
* Add some break's after default: in the end of switch statements topeter2002-03-191-0/+2
| | | | | | | | keep gcc-3.1+ happy: ata-all.c:410: warning: deprecated use of label at end of compound statement ata-all.c:587: warning: deprecated use of label at end of compound statement ata-raid.c:99: warning: deprecated use of label at end of compound statement ata-raid.c:151: warning: deprecated use of label at end of compound statement
* Fix 64bit arch problems.sos2002-03-161-2/+3
|
* Update to the RAID1 rebuild code.sos2002-03-151-19/+35
| | | | | | Run rebuild as a background process. Sponsored by: Advanis
* Add new support for locking an ATA channel and use that throughoutsos2002-03-111-4/+10
| | | | | | the ATA/ATAPI driver. This solves the concurrency problem with the new GEOM code, and also cuts a good deal of the patch size in the upcoming MFC.
* Even more Highpoint RAID support.sos2002-03-081-61/+44
| | | | Fix the 80pin cable detection system.
* Support newer Highpoint BIOS's extended config.sos2002-03-081-21/+16
|
* Oops I mixed up the patch for -current & -stable, sorry ....sos2002-03-071-4/+4
|
* Fix a couble of bugs in the rebuild code, return errors properly.sos2002-03-071-37/+38
|
* Fixed a printf format error again. Rev.127 was clobbered in rev.1.128bde2002-03-061-1/+1
| | | | | | | | | | | | | by removing parentheses. The main bug is in gcc: on machines with 64-bit longs and 64-bit long longs, (unsigned long long)rdp->total_sectors / ((1024L * 1024L) / DEV_BSIZE)) has type plain unsigned long instead of the correctly promoted type unsigned long long, so it can not be printfed using %llu format. Even 1ULL / 1L is mispromoted. Anyway, casting the correct operand automatically avoids the problem. We do not want to to pessimize the division; we just want to convert to a common maximal type for printing.
* Misc little cleanups:sos2002-03-051-9/+9
| | | | | | | Link if only ATAPI device in kernel config Remove unused #includes Rearrange a bit in ata-raid to make diff against -stable smaller Enable wc as default again, dunne how this happend...
* Forgot this litte patch, scale the individual disk size from thesos2002-03-031-3/+3
| | | | arrays total size depending on width of the array.
* Major update of the ATA RAID code, part 3:sos2002-03-031-224/+359
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add code to properly detach/attach disks that are part of a RAID. Mark a disk that is attached on an ATA channel belonging to a RAID as a spare disk that can be used for rebuilding failed RAID1's. Add support for rebuilding failed RAID1's. Several fixes to the detach/attach code. For replacing a disk in a failed RAID1 do the following: Find the controller channel# of the failed disk. Exec 'atacontrol detach <channel#>' to free the disk from the system. Replace the failed disk with a new one of at least the same size. If your have your disks in drawers/enclosures this can be done with the system still running. Exec 'atacontrol attach <channel#>' to add the disk to the system and mark it as a valid spare for rebuild. Exec 'atacontrol rebuild <array#>' The system will rebuild the array on the fly, the array can still be used during this, although with slower performance. Please let me know of any problems with this! Sponsored by: Advanis Inc. MFC after: 2 weeks
* Fixed a printf format error.bde2002-03-021-1/+3
|
* Add support for the Highpoint HPT372 based cards (rocketraid 133).sos2002-02-181-0/+1
| | | | HW Sponsored by: Mike Tancsa
* Dont try to attach ATA RAID's if none found.sos2002-02-161-0/+3
|
* Major update of the ATA RAID code, part 2:sos2002-02-121-127/+398
| | | | | | | | More cleanups of the RAID1 failure mode code. Add functionality that writes the changed RAID config setup back to the disks (in controller BIOS specific format), so that a reboot will make the BIOS pick up the changed config.
* Make LINT compile after fruitless attempts to get the authorsjulian2002-02-061-1/+1
| | | | | | | | | to fix their code. ata stuff: Change name of ar_attach to not colide with existing ar_attach in if_ar.c. usb stuff: Create a dummy function to satisfy a call to it when in DEBUG mode.
* Major update of the ATA RAID code, part 1:sos2002-02-041-268/+476
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Overhaul of the attach/detach code and structures, there were some nasty bugs in the old implementation. This made it possible to collapse the ATA/ATAPI device control structures into one generic structure. A note here, the kernel is NOT ready for detach of active devices, it fails all over in random places, but for inactive devices it works. However for ATA RAID this works, since the RAID abstration layer insulates the buggy^H^H^H^H^H^Hfragile device subsystem from the physical disks. Proberly detect the RAID's from the BIOS, and mark critical RAID1 arrays as such, but continue if there is enough of the mirror left to do so. Properly fail arrays on a live system. For RAID0 that means return EIO, and for RAID1 it means continue on the still working part of the mirror if possible, else return EIO. If the state changes, log this to the console. Allow for Promise & Highpoint controllers/arrays to coexist on the same machine. It is not possible to distribute arrays over different makes of controllers though. If Promise SuperSwap enclosures are used, signal disk state on the status LED on the front. Misc fixes that I had lying around for various minor bugs. Sponsored by: Advanis Inc.
* Update with latest ATA/ATAPI ver 6 rev 2 items.sos2001-10-061-3/+2
|
* Update the promise raid structure with some of the info I've gatheredsos2001-10-041-2/+7
| | | | before I'm accused of "lending" it from somebody else.
* Overhaul to minimize stack usage, in some places >2K was usedsos2001-09-201-68/+83
| | | | on the stack *blush*...
* KSE Milestone 2julian2001-09-121-1/+1
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* Add support for the newer Promise chips here as well.sos2001-08-211-0/+2
|
* Make the disk mini-layer check for and handle zero-length transfersphk2001-05-061-7/+0
| | | | instead of the underlying drivers.
* Send the remains (such as I have located) of "block major numbers" tophk2001-03-261-1/+0
| | | | the bit-bucket.
* Handle the case where the last piece of a RAID0 (striped) disk issos2001-03-211-4/+16
| | | | not of interleave size.
* Add sysctls for reading the tunables as suggested by des.sos2001-03-191-13/+2
| | | | | Minor cleanups plus checks of the ->active state. Cosmetics.
* Provide the interface to atacontrol and associated logic.sos2001-03-151-0/+1
| | | | | | | | | see atacontrol(8) for more. Also the ATA_ENABLE_ATAPI_DMA, ATA_ENABLE_WC and ATA_ENABLE_TAGS options are gone, use the tuneables listed in ata.4 instead from the loader (this makes it possible to switch off DMA before the driver has to touch the devices on broken hardware).
* Introduce busspace instead of the good old in/out instructions.sos2001-02-061-2/+4
| | | | Not pretty but it works (I hope)...
* Add session argument to *close_disk, allowing to set session type on fixate.sos2001-01-101-1/+1
| | | | | | Add support for different blank/erase types. Update headers.
* Proberly calculate the RAID structure on the Promise Fasttrak.sos2001-01-041-1/+2
|
* Use M_ZERO flag on malloc when approbiate.sos2000-12-261-4/+3
|
* Staticize some malloc M_ instances.phk2000-12-081-1/+1
|
* Only offset raid disks > 1 on the HPT, this should solve thesos2000-11-121-1/+2
| | | | | | | boot problems.. However this demands that dangerously dedicated disks use an offset of at least 10 from the start to not overwrite the raid config sector on the HPT...
* Update the config gathering code for both Promise & HPTsos2000-11-011-138/+103
|
* Update the Promise RAID code, there are differences between BIOSsos2000-10-301-6/+6
| | | | version unfortunately...
* Clean up the raid code a bit, also allow disks on HPT controllers tosos2000-10-221-65/+95
| | | | be swapped around and still be put in the correct order in a raid.
* Minor changes to the ATA RAID support code, remove some verbositysos2000-10-181-33/+14
| | | | and put some under bootverbose..
* Add support for ATA "pseudo" RAID controllers as the Promise Fasttraksos2000-10-131-0/+571
and HighPoint HPT370 controllers. Use by defining the RAID in the BIOS and the "ar driver will pick it up automagically...
OpenPOWER on IntegriCloud