Commit Graph

134 Commits

Author SHA1 Message Date
Alexander Motin
58ad43feb1 MFC r198486, r199050:
Increase ATA command timeouts. Introduce define and kernel option
ATA_REQUEST_TIMEOUT to control it.

PR:		kern/111023
2009-11-10 22:37:44 +00:00
Alexander Motin
ea74abd5f5 Revert my ata_identify()/ata_reinit() related changes: r189166, r189091
and partially r188903. Revert breaks new drives detection on reinit to the
state as it was before me, but fixes series of new bugs reported by some
people.

Unconditional queueing of ata_completed() calls can lead to deadlock if
due to timeout ata_reinit() was called at the same thread by previous
ata_completed(). Calling of ata_identify() on ata_reinit() in current
implementation opens numerous races and deadlocks.

Problems I was touching here are still exist and should be addresed, but
probably in different way.
2009-02-28 22:07:15 +00:00
Alexander Motin
69328334a6 Remove direct ata_completed() call options from ata_finish(), except for the
kernel dumping case.

ata_completed() may initiate ata_reinit() on error, that may lead to drives
attach or detach. Attach and detach are sending requests to drives and sleep
waiting for results. But ata_finish() can be called directly from
interrupt handler where sleeping is prohibited, so we must break this chain
somewhere. This place seems to fit best.
2009-02-26 21:33:48 +00:00
Scott Long
934dec8c2f Add basic support for DDF, often found on Adaptec HostRAID controllers.
Spares and rebuilds are not supported, so this code should be considered
for entertainment purposes only.
2009-02-20 06:10:12 +00:00
Søren Schmidt
104c094e06 Go back to preallocating everything possible on init.
This avoids calling busdma in the request processing path which caused a traumatic performance degradation.
Allocation has be postponed to after we know how many devices we possible can have on portmulitpliers to save some space.
2008-04-17 12:29:35 +00:00
Søren Schmidt
1a796873ca Fix identify of slave devices. 2008-04-13 16:05:34 +00:00
Søren Schmidt
dca5e1abd5 Fix the brokenness in the former commit, sorry for the mess.
The problem is that the PM support is part of a much larger WIP here, but due to popular demand I decided to get some of it imported.

Also I forgot the mention:

HW sponsored by: Vitsch Electronics / VEHosting
2008-04-11 11:30:27 +00:00
Søren Schmidt
9f82379c24 Add experimental support for SATA Port Multipliers
Support is working on the Silicon Image SiI3124/3132.
Support is working on some AHCI chips but far from all.

Remember this is WIP, so test reports and (constructive) suggestions are welcome!
2008-04-10 13:05:05 +00:00
Søren Schmidt
471798c310 Unbreak the last commit.
Changes from the PM WIP sneaked in and caused compile errors.
2008-03-20 21:21:31 +00:00
Søren Schmidt
8ab1ead1c0 Fix Problem with Intel Matrix RAID.
Fix from PR/121899.
2008-03-20 11:54:26 +00:00
John Baldwin
14657ee81f Expand the data structure returned by the ATA RAID status ioctl to include
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
2007-08-13 18:46:31 +00:00
Søren Schmidt
129230b816 Update copyright headers. 2007-02-21 19:07:19 +00:00
Pawel Jakub Dawidek
9cd394ea96 Implement BIO_FLUSH handling for da(4), amr(4), ata(4) and ataraid(4).
Sponsored by:	home.pl
2006-10-31 21:19:25 +00:00
Søren Schmidt
9e34f8233b Properly initialize and destroy the RAID lock.
Also dont mess with RAID's thats not attached yet and avoid panic.
2006-08-25 09:33:56 +00:00
Maxim Konovalov
a09367f089 o s/PsuedoRAID/PseudoRAID/.
PR:		kern/94306
Submitted by:	Esa Karkkainen
2006-04-15 10:27:41 +00:00
Søren Schmidt
2d7994d97e Get rid of all the "long long"/"maxint" casting around in printf's.
On all our platforms intmax == int64_t so simply using %j to print
int64_t's is safe all over, and doesn't pullute the code.
2006-03-09 08:34:44 +00:00
Søren Schmidt
608e65bb2a Add r/w support for JMicron ATA RAID metadata.
Acknowledgement should definitly go to JMicron Technology for providing full
docs on the metadata format as the only vendor so far, big thanks from here.
2006-02-17 13:02:10 +00:00
Søren Schmidt
8453acf105 Whitespace cleanup. 2006-01-18 13:10:17 +00:00
Søren Schmidt
f5f55db308 Add support for using DMA on dump, greatly speeds up the dump process.
Add dump support in ataraid.
2006-01-18 09:14:55 +00:00
Søren Schmidt
e2bf77c5c2 Get rid of the advertising clause in the copyright. 2006-01-05 21:27:19 +00:00
Søren Schmidt
8ec96d7b8d Fix rebuilds of arrays that got stuck.
Misc minor fixes.

Bughunting and initial fixes by Pav@ and Anton.
2005-12-27 16:49:33 +00:00
Scott Long
7f512e8f29 Make this compile on 64bit systems. It likely isn't correct, but that can
be sorted out later.
2005-12-16 06:11:22 +00:00
Søren Schmidt
5608e472c1 Add support for writing VIA metadata.
Null out the metadata on disks when array is deleted.
2005-12-15 13:30:23 +00:00
Søren Schmidt
59a269294f Add RAID0+1 and RAID5 support to VIA RAID code.
Fix support for multiple arrays.
2005-12-14 13:07:49 +00:00
Søren Schmidt
c6c6c58a89 Correct calculation of RAID0 sizes on VIA RAID arrays. 2005-12-14 12:11:51 +00:00
Søren Schmidt
921f15117f Add support for writing SiS metadata. 2005-12-12 14:13:55 +00:00
Søren Schmidt
02268a2d11 Switch off debugging that was left on in last commit. 2005-12-05 17:58:11 +00:00
Søren Schmidt
eed08844c9 Add support for writing Intel MatrixRAID arrays.
Do a little better on handling volumes as well, however we cant create
multiple volumes from FreeBSD yet.

HW sponsored by:        Mullet Scandinavia AB
2005-12-05 17:33:57 +00:00
Søren Schmidt
ddaf769709 Update the ICH7 support so it deals better with chips without AHCI.
Update Intel MatrixRAID support to be able to pick up RAID0+1 (RAID10)
and RAID5 arrays without panic'ing.
This has the side effect of now also supporting multiple volumes on
MatrixRAID's now I have the metadata better understood..

HW sponsored by:	Mullet Scandinavia AB
2005-12-02 10:13:53 +00:00
Søren Schmidt
e9bd25bff0 Fix the ata_composite/ata_request leak when using RAID0+1.
Submitted by:	Michael Butler

Minor changes to fit ATA style by me.
2005-11-29 20:08:26 +00:00
Søren Schmidt
7c7e96f58c Fix SiS SATA support, the SATA registers was off.
Add support for SiS metadata.

HW donated by:	obrien
2005-11-28 23:08:37 +00:00
Robert Watson
5bb84bc84b Normalize a significant number of kernel malloc type names:
- Prefer '_' to ' ', as it results in more easily parsed results in
  memory monitoring tools such as vmstat.

- Remove punctuation that is incompatible with using memory type names
  as file names, such as '/' characters.

- Disambiguate some collisions by adding subsystem prefixes to some
  memory types.

- Generally prefer lower case to upper case.

- If the same type is defined in multiple architecture directories,
  attempt to use the same name in additional cases.

Not all instances were caught in this change, so more work is required to
finish this conversion.  Similar changes are required for UMA zone names.
2005-10-31 15:41:29 +00:00
Søren Schmidt
ca107a4b1e Minor cleanups, no functional changes 2005-10-13 08:05:21 +00:00
Søren Schmidt
7ebce0231b Add support for the ATI IXP[234]00 series chipsets.
HW donated by: sentex
2005-10-12 20:00:26 +00:00
Søren Schmidt
fba8a154bd Fix problem with finding the still working disk in a broken mirror on VIA. 2005-09-06 19:17:48 +00:00
Søren Schmidt
08f7225609 Dont limit all transfers to DEV_BSIZE (stale dbug code)
Hide the loaded/unloaded message behind bootverbose
2005-08-04 18:39:36 +00:00
Marcel Moolenaar
217578215b Avoid GCC optimizations from injecting a call to memset(?) in order
to initialize the buffer array in ata_raid_attach() by removing the
initializer. There's no memset(?) in the kernel. Instead, assign
'\0' to the first element. The buffer array holds strings only, so
this is functionally equivalent.

Applies to: ia64
Tripped over by: tinderbox
2005-06-11 03:21:20 +00:00
Søren Schmidt
167719c3b2 Apply the usual woodoo for 64bitness. 2005-06-06 15:49:09 +00:00
Søren Schmidt
b397739aab Add support for nVidia's software RAID "MediaShield".
HW Sponsored by:	Yahoo!
2005-06-06 13:35:24 +00:00
Søren Schmidt
6667b30d15 Change the way ioctls are issue to ATA.
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.
2005-05-16 13:07:27 +00:00
Søren Schmidt
265da99ce9 Cleanup comments 2005-05-13 10:25:19 +00:00
Søren Schmidt
4156b20c71 Always attach a subdisk even if no valid metadata found.
This allows the disks to be used later in a raid create.
2005-05-02 07:06:50 +00:00
Søren Schmidt
0068f98f88 Take newbusification one step further, ie use the device_t more consequently
all way through the code down the layers, instead of the mix'n'match that
resulted from the conversion done earlier.

Sponsored by:	pair.com
2005-04-30 16:22:07 +00:00
Søren Schmidt
f1be1cdc88 Fix a bug introduced in r1.89 thats caused leak of requests, and possibly
bogus data to be written.
2005-04-26 06:42:33 +00:00
Søren Schmidt
46917bb6f4 When a rebuild is done, properly mark the arrays as functional again. 2005-04-20 14:14:08 +00:00
Søren Schmidt
e30a3e750f Fix indentation problem in the last commit 2005-04-19 05:28:08 +00:00
Søren Schmidt
b3c3ba2ed7 Add uma zone for composite ops.
Submitted by:	des
2005-04-18 16:01:56 +00:00
Søren Schmidt
964ac9d507 Adjust the RAID type pickup code for the VIA, we dont actually care
if the array is bootable or not (yet).
2005-04-18 13:51:03 +00:00
Søren Schmidt
b71229c0ac On amd64 int64_t != long long. 2005-04-12 15:24:00 +00:00
Søren Schmidt
5c2fe6346d Better use the right name for the VIA software RAID. 2005-04-12 13:29:47 +00:00