Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-3]: src/sys/dev/ata Pull up revision 1.2 (requested by briggs in ...
details: https://anonhg.NetBSD.org/src/rev/57aed32f3d7c
branches: netbsd-3
changeset: 576468:57aed32f3d7c
user: tron <tron%NetBSD.org@localhost>
date: Sun Jul 03 21:10:51 2005 +0000
description:
Pull up revision 1.2 (requested by briggs in ticket #521):
Basic support for RAID0 and RAID1 for the Adaptec HostRAID format as found
on the Intel 6300ESB on-board RAID. Adapted from FreeBSD.
diffstat:
sys/dev/ata/ata_raidreg.h | 62 ++++++++++++++++++++++++++++++++++++++++++++++-
sys/dev/ata/ata_raidvar.h | 8 ++++-
2 files changed, 67 insertions(+), 3 deletions(-)
diffs (101 lines):
diff -r 7e7dad6a3b24 -r 57aed32f3d7c sys/dev/ata/ata_raidreg.h
--- a/sys/dev/ata/ata_raidreg.h Sun Jul 03 17:09:09 2005 +0000
+++ b/sys/dev/ata/ata_raidreg.h Sun Jul 03 21:10:51 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ata_raidreg.h,v 1.1 2003/01/27 18:21:28 thorpej Exp $ */
+/* $NetBSD: ata_raidreg.h,v 1.1.16.1 2005/07/03 21:10:51 tron Exp $ */
/*-
* Copyright (c) 2000,2001,2002 Søren Schmidt <sos%FreeBSD.org@localhost>
@@ -110,4 +110,64 @@
uint32_t checksum;
} __attribute__((__packed__));
+/*
+ * Macro to compute the LBA of the Adaptec HostRAID configuration structure,
+ * using the disk's softc structure.
+ */
+#define ADP_LBA(wd) \
+ ((wd)->sc_capacity - 17)
+
+struct adaptec_raid_conf {
+ uint32_t magic_0;
+#define ADP_MAGIC_0 0x900765c4
+
+ uint32_t generation;
+ uint16_t dummy_0;
+ uint16_t total_configs;
+ uint16_t dummy_1;
+ uint16_t checksum;
+ uint32_t dummy_2;
+ uint32_t dummy_3;
+ uint32_t flags;
+ uint32_t timestamp;
+ uint32_t dummy_4[4];
+ uint32_t dummy_5[4];
+ struct {
+ uint16_t total_disks;
+ uint16_t generation;
+ uint32_t magic_0;
+ uint8_t dummy_0;
+ uint8_t type;
+#define ADP_T_RAID0 0x00
+#define ADP_T_RAID1 0x01
+ uint8_t dummy_1;
+ uint8_t flags;
+
+ uint8_t dummy_2;
+ uint8_t dummy_3;
+ uint8_t dummy_4;
+ uint8_t dummy_5;
+
+ uint32_t disk_number;
+ uint32_t dummy_6;
+ uint32_t sectors;
+ uint16_t stripe_sectors;
+ uint16_t dummy_7;
+
+ uint32_t dummy_8[4];
+ uint8_t name[16];
+ } configs[127];
+ uint32_t dummy_6[13];
+ uint32_t magic_1;
+#define ADP_MAGIC_1 0x0950f89f
+ uint32_t dummy_7[3];
+ uint32_t magic_2;
+ uint32_t dummy_8[46];
+ uint32_t magic_3;
+#define ADP_MAGIC_3 0x4450544d
+ uint32_t magic_4;
+#define ADP_MAGIC_4 0x0950f89f
+ uint32_t dummy_9[62];
+} __attribute__((__packed__));
+
#endif /* _DEV_PCI_PCIIDE_PROMISE_RAID_H_ */
diff -r 7e7dad6a3b24 -r 57aed32f3d7c sys/dev/ata/ata_raidvar.h
--- a/sys/dev/ata/ata_raidvar.h Sun Jul 03 17:09:09 2005 +0000
+++ b/sys/dev/ata/ata_raidvar.h Sun Jul 03 21:10:51 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ata_raidvar.h,v 1.1 2003/01/27 18:21:28 thorpej Exp $ */
+/* $NetBSD: ata_raidvar.h,v 1.1.16.1 2005/07/03 21:10:51 tron Exp $ */
/*
* Copyright (c) 2003 Wasabi Systems, Inc.
@@ -46,7 +46,8 @@
* sorted.
*/
#define ATA_RAID_TYPE_PROMISE 0
-#define ATA_RAID_TYPE_MAX 0
+#define ATA_RAID_TYPE_ADAPTEC 1
+#define ATA_RAID_TYPE_MAX 1
/*
* Max # of disks supported by a single array. This is limited by
@@ -118,4 +119,7 @@
/* Promise RAID support */
int ata_raid_read_config_promise(struct wd_softc *);
+/* Adaptec HostRAID support */
+int ata_raid_read_config_adaptec(struct wd_softc *);
+
#endif /* _DEV_ATA_ATA_RAIDVAR_H_ */
Home |
Main Index |
Thread Index |
Old Index