summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/ata-raid.h
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>2002-03-27 10:58:59 +0000
committersos <sos@FreeBSD.org>2002-03-27 10:58:59 +0000
commit3bb9163271874f3cdba2326c16e8f35837a58e79 (patch)
tree5b9ce4d04b09ba6aec883cbbd6eb25e2cc767bfe /sys/dev/ata/ata-raid.h
parentafeb63c358c75e735e779b5a81e44f8bbba5da78 (diff)
downloadFreeBSD-src-3bb9163271874f3cdba2326c16e8f35837a58e79.zip
FreeBSD-src-3bb9163271874f3cdba2326c16e8f35837a58e79.tar.gz
Add support for creating/deleting ATA RAID's.
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
Diffstat (limited to 'sys/dev/ata/ata-raid.h')
-rw-r--r--sys/dev/ata/ata-raid.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/ata/ata-raid.h b/sys/dev/ata/ata-raid.h
index f5cd69b..85f91c7 100644
--- a/sys/dev/ata/ata-raid.h
+++ b/sys/dev/ata/ata-raid.h
@@ -37,6 +37,7 @@
#define AR_WAIT 0x04
#define AR_STRATEGY(x) (x)->bio_dev->si_disk->d_devsw->d_strategy((x))
#define AD_SOFTC(x) ((struct ad_softc *)(x.device->driver))
+#define ATA_MAGIC "FreeBSD ATA driver RAID "
struct ar_disk {
struct ata_device *device;
@@ -62,6 +63,7 @@ struct ar_softc {
#define AR_F_REBUILDING 0x0400
#define AR_F_PROMISE_RAID 0x1000
#define AR_F_HIGHPOINT_RAID 0x2000
+#define AR_F_FREEBSD_RAID 0x4000
int total_disks; /* number of disks in this array */
int generation; /* generation of this array */
@@ -71,7 +73,7 @@ struct ar_softc {
u_int16_t sectors;
u_int32_t cylinders;
u_int64_t total_sectors;
- int interleave; /* interleave in bytes */
+ int interleave; /* interleave in blocks */
int reserved; /* sectors that are NOT to be used */
int offset; /* offset from start of disk */
u_int64_t lock_start; /* start of locked area for rebuild */
@@ -101,9 +103,9 @@ struct highpoint_raid_conf {
u_int32_t magic_0;
u_int32_t magic_1;
u_int32_t order;
-#define HPT_O_OK 0x01
+#define HPT_O_RAID0 0x01
#define HPT_O_RAID1 0x02
-#define HPT_O_RAID0 0x04
+#define HPT_O_OK 0x04
u_int8_t array_width;
u_int8_t stripe_shift;
@@ -224,4 +226,6 @@ int ata_raiddisk_probe(struct ad_softc *);
int ata_raiddisk_attach(struct ad_softc *);
int ata_raiddisk_detach(struct ad_softc *);
void ata_raid_attach(void);
+int ata_raid_create(struct raid_setup *);
+int ata_raid_delete(int);
int ata_raid_rebuild(int);
OpenPOWER on IntegriCloud