diff options
Diffstat (limited to 'sys/dev/aac')
| -rw-r--r-- | sys/dev/aac/aac.c | 4 | ||||
| -rw-r--r-- | sys/dev/aac/aac_cam.c | 4 | ||||
| -rw-r--r-- | sys/dev/aac/aac_debug.c | 72 | ||||
| -rw-r--r-- | sys/dev/aac/aac_disk.c | 2 | ||||
| -rw-r--r-- | sys/dev/aac/aac_pci.c | 8 | ||||
| -rw-r--r-- | sys/dev/aac/aac_tables.h | 70 | ||||
| -rw-r--r-- | sys/dev/aac/aacreg.h | 104 | ||||
| -rw-r--r-- | sys/dev/aac/aacvar.h | 20 |
8 files changed, 144 insertions, 140 deletions
diff --git a/sys/dev/aac/aac.c b/sys/dev/aac/aac.c index 642a2dbf7ae4..b928dba02990 100644 --- a/sys/dev/aac/aac.c +++ b/sys/dev/aac/aac.c @@ -1880,7 +1880,7 @@ aac_init(struct aac_softc *sc) ip->InitFlags = 0; if (sc->flags & AAC_FLAGS_NEW_COMM) { - ip->InitFlags = INITFLAGS_NEW_COMM_SUPPORTED; + ip->InitFlags |= AAC_INITFLAGS_NEW_COMM_SUPPORTED; device_printf(sc->aac_dev, "New comm. interface enabled\n"); } @@ -2004,7 +2004,7 @@ aac_setup_intr(struct aac_softc *sc) } if (sc->flags & AAC_FLAGS_NEW_COMM) { if (bus_setup_intr(sc->aac_dev, sc->aac_irq, - INTR_MPSAFE|INTR_TYPE_BIO, NULL, + INTR_MPSAFE|INTR_TYPE_BIO, NULL, aac_new_intr, sc, &sc->aac_intr)) { device_printf(sc->aac_dev, "can't set up interrupt\n"); return (EINVAL); diff --git a/sys/dev/aac/aac_cam.c b/sys/dev/aac/aac_cam.c index c1164aa2d3f9..4bfe0ed5747b 100644 --- a/sys/dev/aac/aac_cam.c +++ b/sys/dev/aac/aac_cam.c @@ -395,7 +395,7 @@ aac_cam_action(struct cam_sim *sim, union ccb *ccb) srb->cdb_len); /* Set command */ - fib->Header.Command = (sc->flags & AAC_FLAGS_SG_64BIT) ? + fib->Header.Command = (sc->flags & AAC_FLAGS_SG_64BIT) ? ScsiPortCommandU64 : ScsiPortCommand; /* Map the s/g list. XXX 32bit addresses only! */ @@ -512,7 +512,7 @@ aac_cam_complete(struct aac_command *cm) scsi_sense_len = sizeof(struct scsi_sense_data); bzero(&ccb->csio.sense_data, scsi_sense_len); - sense_len = (srbr->sense_len > + sense_len = (srbr->sense_len > scsi_sense_len) ? scsi_sense_len : srbr->sense_len; bcopy(&srbr->sense[0], &ccb->csio.sense_data, diff --git a/sys/dev/aac/aac_debug.c b/sys/dev/aac/aac_debug.c index 9d79b0bca441..9cdfd3fb271a 100644 --- a/sys/dev/aac/aac_debug.c +++ b/sys/dev/aac/aac_debug.c @@ -62,62 +62,62 @@ aac_print_queues(struct aac_softc *sc) device_printf(sc->aac_dev, "FIB queue header at %p queues at %p\n", &sc->aac_queues->qt_qindex[AAC_HOST_NORM_CMD_QUEUE][0], &sc->aac_queues->qt_HostNormCmdQueue[0]); - device_printf(sc->aac_dev, "HOST_NORM_CMD %d/%d (%d)\n", + device_printf(sc->aac_dev, "HOST_NORM_CMD %d/%d (%d)\n", sc->aac_queues->qt_qindex[AAC_HOST_NORM_CMD_QUEUE][ AAC_PRODUCER_INDEX], sc->aac_queues->qt_qindex[AAC_HOST_NORM_CMD_QUEUE][ - AAC_CONSUMER_INDEX], + AAC_CONSUMER_INDEX], AAC_HOST_NORM_CMD_ENTRIES); - device_printf(sc->aac_dev, "HOST_HIGH_CMD %d/%d (%d)\n", + device_printf(sc->aac_dev, "HOST_HIGH_CMD %d/%d (%d)\n", sc->aac_queues->qt_qindex[AAC_HOST_HIGH_CMD_QUEUE][ AAC_PRODUCER_INDEX], sc->aac_queues->qt_qindex[AAC_HOST_HIGH_CMD_QUEUE][ - AAC_CONSUMER_INDEX], + AAC_CONSUMER_INDEX], AAC_HOST_HIGH_CMD_ENTRIES); - device_printf(sc->aac_dev, "ADAP_NORM_CMD %d/%d (%d)\n", + device_printf(sc->aac_dev, "ADAP_NORM_CMD %d/%d (%d)\n", sc->aac_queues->qt_qindex[AAC_ADAP_NORM_CMD_QUEUE][ AAC_PRODUCER_INDEX], sc->aac_queues->qt_qindex[AAC_ADAP_NORM_CMD_QUEUE][ - AAC_CONSUMER_INDEX], + AAC_CONSUMER_INDEX], AAC_ADAP_NORM_CMD_ENTRIES); - device_printf(sc->aac_dev, "ADAP_HIGH_CMD %d/%d (%d)\n", + device_printf(sc->aac_dev, "ADAP_HIGH_CMD %d/%d (%d)\n", sc->aac_queues->qt_qindex[AAC_ADAP_HIGH_CMD_QUEUE][ AAC_PRODUCER_INDEX], sc->aac_queues->qt_qindex[AAC_ADAP_HIGH_CMD_QUEUE][ - AAC_CONSUMER_INDEX], + AAC_CONSUMER_INDEX], AAC_ADAP_HIGH_CMD_ENTRIES); - device_printf(sc->aac_dev, "HOST_NORM_RESP %d/%d (%d)\n", + device_printf(sc->aac_dev, "HOST_NORM_RESP %d/%d (%d)\n", sc->aac_queues->qt_qindex[AAC_HOST_NORM_RESP_QUEUE][ AAC_PRODUCER_INDEX], sc->aac_queues->qt_qindex[AAC_HOST_NORM_RESP_QUEUE][ AAC_CONSUMER_INDEX], AAC_HOST_NORM_RESP_ENTRIES); - device_printf(sc->aac_dev, "HOST_HIGH_RESP %d/%d (%d)\n", + device_printf(sc->aac_dev, "HOST_HIGH_RESP %d/%d (%d)\n", sc->aac_queues->qt_qindex[AAC_HOST_HIGH_RESP_QUEUE][ AAC_PRODUCER_INDEX], sc->aac_queues->qt_qindex[AAC_HOST_HIGH_RESP_QUEUE][ AAC_CONSUMER_INDEX], AAC_HOST_HIGH_RESP_ENTRIES); - device_printf(sc->aac_dev, "ADAP_NORM_RESP %d/%d (%d)\n", + device_printf(sc->aac_dev, "ADAP_NORM_RESP %d/%d (%d)\n", sc->aac_queues->qt_qindex[AAC_ADAP_NORM_RESP_QUEUE][ AAC_PRODUCER_INDEX], sc->aac_queues->qt_qindex[AAC_ADAP_NORM_RESP_QUEUE][ AAC_CONSUMER_INDEX], AAC_ADAP_NORM_RESP_ENTRIES); - device_printf(sc->aac_dev, "ADAP_HIGH_RESP %d/%d (%d)\n", + device_printf(sc->aac_dev, "ADAP_HIGH_RESP %d/%d (%d)\n", sc->aac_queues->qt_qindex[AAC_ADAP_HIGH_RESP_QUEUE][ AAC_PRODUCER_INDEX], sc->aac_queues->qt_qindex[AAC_ADAP_HIGH_RESP_QUEUE][ AAC_CONSUMER_INDEX], AAC_ADAP_HIGH_RESP_ENTRIES); - device_printf(sc->aac_dev, "AACQ_FREE %d/%d\n", + device_printf(sc->aac_dev, "AACQ_FREE %d/%d\n", sc->aac_qstat[AACQ_FREE].q_length, sc->aac_qstat[AACQ_FREE].q_max); - device_printf(sc->aac_dev, "AACQ_BIO %d/%d\n", + device_printf(sc->aac_dev, "AACQ_BIO %d/%d\n", sc->aac_qstat[AACQ_BIO].q_length, sc->aac_qstat[AACQ_BIO].q_max); - device_printf(sc->aac_dev, "AACQ_READY %d/%d\n", + device_printf(sc->aac_dev, "AACQ_READY %d/%d\n", sc->aac_qstat[AACQ_READY].q_length, sc->aac_qstat[AACQ_READY].q_max); - device_printf(sc->aac_dev, "AACQ_BUSY %d/%d\n", + device_printf(sc->aac_dev, "AACQ_BUSY %d/%d\n", sc->aac_qstat[AACQ_BUSY].q_length, sc->aac_qstat[AACQ_BUSY].q_max); } @@ -225,8 +225,8 @@ aac_print_fib(struct aac_softc *sc, struct aac_fib *fib, const char *caller) if (br->Command == VM_CtBlockRead) { device_printf(sc->aac_dev, - " BlockRead: container %d 0x%x/%d\n", - br->ContainerId, br->BlockNumber, + " BlockRead: container %d 0x%x/%d\n", + br->ContainerId, br->BlockNumber, br->ByteCount); sg = &br->SgMap; } @@ -234,7 +234,7 @@ aac_print_fib(struct aac_softc *sc, struct aac_fib *fib, const char *caller) device_printf(sc->aac_dev, " BlockWrite: container %d 0x%x/%d " "(%s)\n", bw->ContainerId, - bw->BlockNumber, bw->ByteCount, + bw->BlockNumber, bw->ByteCount, bw->Stable == CSTABLE ? "stable" : "unstable"); sg = &bw->SgMap; @@ -267,7 +267,7 @@ aac_print_aif(struct aac_softc *sc, struct aac_aif_command *aif) device_printf(sc->aac_dev, "EventNotify(%d)\n", aif->seqNumber); switch(aif->data.EN.type) { case AifEnGeneric: /* Generic notification */ - device_printf(sc->aac_dev, "(Generic) %.*s\n", + device_printf(sc->aac_dev, "(Generic) %.*s\n", (int)sizeof(aif->data.EN.data.EG), aif->data.EN.data.EG.text); break; @@ -281,21 +281,21 @@ aac_print_aif(struct aac_softc *sc, struct aac_aif_command *aif) case AifEnContainerChange: /* Adapter specific container * configuration change */ device_printf(sc->aac_dev, "(ContainerChange) " - "container %d,%d\n", - aif->data.EN.data.ECC.container[0], + "container %d,%d\n", + aif->data.EN.data.ECC.container[0], aif->data.EN.data.ECC.container[1]); break; case AifEnDeviceFailure: /* SCSI device failed */ device_printf(sc->aac_dev, "(DeviceFailure) " - "handle %d\n", + "handle %d\n", aif->data.EN.data.EDF.deviceHandle); break; case AifEnMirrorFailover: /* Mirror failover started */ device_printf(sc->aac_dev, "(MirrorFailover) " "container %d failed, " "migrating from slice %d to %d\n", - aif->data.EN.data.EMF.container, - aif->data.EN.data.EMF.failedSlice, + aif->data.EN.data.EMF.container, + aif->data.EN.data.EMF.failedSlice, aif->data.EN.data.EMF.creatingSlice); break; case AifEnContainerEvent: /* Significant container @@ -325,7 +325,7 @@ aac_print_aif(struct aac_softc *sc, struct aac_aif_command *aif) device_printf(sc->aac_dev, "(EnclosureManagement) " "EMPID %d unit %d " "event %d\n", aif->data.EN.data.EEE.empID, - aif->data.EN.data.EEE.unitID, + aif->data.EN.data.EEE.unitID, aif->data.EN.data.EEE.eventType); break; case AifEnBatteryEvent: /* Significant NV battery @@ -348,14 +348,14 @@ aac_print_aif(struct aac_softc *sc, struct aac_aif_command *aif) device_printf(sc->aac_dev, "(BatteryNeedsRecond)\n"); break; case AifEnClusterEvent: /* Some cluster event */ - device_printf(sc->aac_dev, "(ClusterEvent) event %d\n", + device_printf(sc->aac_dev, "(ClusterEvent) event %d\n", aif->data.EN.data.ECLE.eventType); break; case AifEnDiskSetEvent: /* A disk set event occured. */ device_printf(sc->aac_dev, "(DiskSetEvent) event %d " "diskset %jd creator %jd\n", - aif->data.EN.data.EDS.eventType, - (intmax_t)aif->data.EN.data.EDS.DsNum, + aif->data.EN.data.EDS.eventType, + (intmax_t)aif->data.EN.data.EDS.DsNum, (intmax_t)aif->data.EN.data.EDS.CreatorId); break; case AifDenMorphComplete: /* A morph operation @@ -392,7 +392,7 @@ aac_print_aif(struct aac_softc *sc, struct aac_aif_command *aif) } device_printf(sc->aac_dev, "JobProgress (%d) - %s (%d, %d)\n", - aif->seqNumber, status, + aif->seqNumber, status, aif->data.PR[0].currentTick, aif->data.PR[0].finalTick); switch(aif->data.PR[0].jd.type) { @@ -418,12 +418,12 @@ aac_print_aif(struct aac_softc *sc, struct aac_aif_command *aif) break; case AifJobCtrZero: /* Container clear operation */ device_printf(sc->aac_dev, - "(ContainerZero) container %d\n", + "(ContainerZero) container %d\n", aif->data.PR[0].jd.client.container.src); break; case AifJobCtrCopy: /* Container copy operation */ device_printf(sc->aac_dev, - "(ContainerCopy) container %d to %d\n", + "(ContainerCopy) container %d to %d\n", aif->data.PR[0].jd.client.container.src, aif->data.PR[0].jd.client.container.dst); break; @@ -456,12 +456,12 @@ aac_print_aif(struct aac_softc *sc, struct aac_aif_command *aif) case AifJobCtrScrubRaid5: /* Container Scrub Raid5 * operation */ device_printf(sc->aac_dev, - "(ContainerScrubRaid5) container %d\n", + "(ContainerScrubRaid5) container %d\n", aif->data.PR[0].jd.client.container.src); break; case AifJobCtrMorph: /* Container morph operation */ device_printf(sc->aac_dev, - "(ContainerMorph) container %d\n", + "(ContainerMorph) container %d\n", aif->data.PR[0].jd.client.container.src); /* XXX two containers? */ break; @@ -476,13 +476,13 @@ aac_print_aif(struct aac_softc *sc, struct aac_aif_command *aif) case AifJobCtrRebuildMirror: /* Container Rebuild Mirror * operation */ device_printf(sc->aac_dev, - "(ContainerRebuildMirror) container " + "(ContainerRebuildMirror) container " "%d\n", aif->data.PR[0].jd.client.container.src); break; case AifJobCtrCrazyCache: /* crazy cache */ device_printf(sc->aac_dev, - "(ContainerCrazyCache) container %d\n", + "(ContainerCrazyCache) container %d\n", aif->data.PR[0].jd.client.container.src); /* XXX two containers? */ break; diff --git a/sys/dev/aac/aac_disk.c b/sys/dev/aac/aac_disk.c index 4a1a82b148a5..fa3b66b87c15 100644 --- a/sys/dev/aac/aac_disk.c +++ b/sys/dev/aac/aac_disk.c @@ -87,7 +87,7 @@ DRIVER_MODULE(aacd, aac, aac_disk_driver, aac_disk_devclass, 0, 0); /* * Handle open from generic layer. * - * This is called by the diskslice code on first open in order to get the + * This is called by the diskslice code on first open in order to get the * basic device geometry paramters. */ static int diff --git a/sys/dev/aac/aac_pci.c b/sys/dev/aac/aac_pci.c index bc993791f8ba..6f59e68053db 100644 --- a/sys/dev/aac/aac_pci.c +++ b/sys/dev/aac/aac_pci.c @@ -177,7 +177,7 @@ struct aac_ident {0x9005, 0x0285, 0x1014, 0x0312, AAC_HWIF_I960RX, 0, "IBM ServeRAID 8i"}, {0x9005, 0x0285, 0x9005, 0x0298, AAC_HWIF_I960RX, 0, - "Adaptec SAS RAID 4000SAS"}, + "Adaptec RAID 4000"}, {0x9005, 0x0285, 0x9005, 0x0299, AAC_HWIF_I960RX, 0, "Adaptec SAS RAID 4800SAS"}, {0x9005, 0x0285, 0x9005, 0x029a, AAC_HWIF_I960RX, 0, @@ -353,7 +353,7 @@ aac_pci_attach(device_t dev) /* assume failure is 'not configured' */ error = ENXIO; - /* + /* * Verify that the adapter is correctly set up in PCI space. */ command = pci_read_config(sc->aac_dev, PCIR_COMMAND, 2); @@ -401,7 +401,7 @@ aac_pci_attach(device_t dev) /* * Allocate the parent bus DMA tag appropriate for our PCI interface. - * + * * Note that some of these controllers are 64-bit capable. */ if (bus_dma_tag_create(NULL, /* parent */ @@ -419,7 +419,7 @@ aac_pci_attach(device_t dev) goto out; } - /* + /* * Detect the hardware interface version, set up the bus interface * indirection. */ diff --git a/sys/dev/aac/aac_tables.h b/sys/dev/aac/aac_tables.h index 4a0d0e3dddd4..fe687fb8477b 100644 --- a/sys/dev/aac/aac_tables.h +++ b/sys/dev/aac/aac_tables.h @@ -34,40 +34,42 @@ * relevant only to FSA operations. */ static struct aac_code_lookup aac_command_status_table[] = { - {"OK", 0}, - {"operation not permitted", 1}, - {"not found", 2}, - {"I/O error", 5}, - {"device not configured", 6}, - {"too big", 7}, - {"permission denied", 13}, - {"file exists", 17}, - {"cross-device link", 18}, - {"operation not supported by device", 19}, - {"not a directory", 20}, - {"is a directory", 21}, - {"invalid argument", 22}, - {"file too large", 27}, - {"no space on device", 28}, - {"readonly filesystem", 30}, - {"too many links", 31}, - {"operation would block", 35}, - {"file name too long", 63}, - {"directory not empty", 66}, - {"quota exceeded", 69}, - {"stale file handle", 70}, - {"too many levels of remote in path", 71}, - {"bad file handle", 10001}, - {"not sync", 10002}, - {"bad cookie", 10003}, - {"operation not supported", 10004}, - {"too small", 10005}, - {"server fault", 10006}, - {"bad type", 10007}, - {"jukebox", 10008}, - {"not mounted", 10009}, - {"in maintenance mode", 10010}, - {"stale ACL", 10011}, + {"OK", ST_OK}, + {"operation not permitted", ST_PERM}, + {"not found", ST_NOENT}, + {"I/O error", ST_IO}, + {"device not configured", ST_NXIO}, + {"too big", ST_E2BIG}, + {"permission denied", ST_ACCES}, + {"file exists", ST_EXIST}, + {"cross-device link", ST_XDEV}, + {"operation not supported by device", ST_NODEV}, + {"not a directory", ST_NOTDIR}, + {"is a directory", ST_ISDIR}, + {"invalid argument", ST_INVAL}, + {"file too large", ST_FBIG}, + {"no space on device", ST_NOSPC}, + {"readonly filesystem", ST_ROFS}, + {"too many links", ST_MLINK}, + {"operation would block", ST_WOULDBLOCK}, + {"file name too long", ST_NAMETOOLONG}, + {"directory not empty", ST_NOTEMPTY}, + {"quota exceeded", ST_DQUOT}, + {"stale file handle", ST_STALE}, + {"too many levels of remote in path", ST_REMOTE}, + {"device busy (spinning up)", ST_NOT_READY}, + {"bad file handle", ST_BADHANDLE}, + {"not sync", ST_NOT_SYNC}, + {"bad cookie", ST_BAD_COOKIE}, + {"operation not supported", ST_NOTSUPP}, + {"too small", ST_TOOSMALL}, + {"server fault", ST_SERVERFAULT}, + {"bad type", ST_BADTYPE}, + {"jukebox", ST_JUKEBOX}, + {"not mounted", ST_NOTMOUNTED}, + {"in maintenance mode", ST_MAINTMODE}, + {"stale ACL", ST_STALEACL}, + {"bus reset - command aborted", ST_BUS_RESET}, {NULL, 0}, {"unknown command status", 0} }; diff --git a/sys/dev/aac/aacreg.h b/sys/dev/aac/aacreg.h index 5c849664a476..ccec8b214b71 100644 --- a/sys/dev/aac/aacreg.h +++ b/sys/dev/aac/aacreg.h @@ -220,20 +220,20 @@ typedef enum { IsAdapterPaused = 704, SendHostTime = 705, RequestSupplementAdapterInfo = 706, /* Supp. Info for set in UCC - * use only if supported + * use only if supported * (RequestAdapterInfo first) */ LastMiscCommand = 707, - - OnLineDiagnostic = 800, - FduAdapterTest = 801, + + OnLineDiagnostic = 800, + FduAdapterTest = 801, RequestCompatibilityId = 802, AdapterEnvironmentInfo = 803, /* temp. sensors */ NvsramEventLog = 900, ResetNvsramEventLogPointers = 901, EnableEventLog = 902, DisableEventLog = 903, - EncryptedKeyTransportFIB= 904, - KeyableFeaturesFIB= 905 + EncryptedKeyTransportFIB= 904, + KeyableFeaturesFIB= 905 } AAC_FibCommands; /* @@ -283,7 +283,7 @@ typedef enum { #define AAC_ERROR_FIB_DEALLOCATION_FAILED 0x08 /* - * Adapter Init Structure: this is passed to the adapter with the + * Adapter Init Structure: this is passed to the adapter with the * AAC_MONKER_INITSTRUCT command to point it at our control structures. */ struct aac_adapter_init { @@ -306,7 +306,7 @@ struct aac_adapter_init { u_int32_t HostElapsedSeconds; /* ADAPTER_INIT_STRUCT_REVISION_4 begins here */ u_int32_t InitFlags; /* flags for supported features */ -#define INITFLAGS_NEW_COMM_SUPPORTED 1 +#define AAC_INITFLAGS_NEW_COMM_SUPPORTED 1 u_int32_t MaxIoCommands; /* max outstanding commands */ u_int32_t MaxIoSize; /* largest I/O command */ u_int32_t MaxFibSize; /* largest FIB to adapter */ @@ -329,14 +329,14 @@ typedef enum { CT_MORPH, CT_PASSTHRU, CT_RAID4, - CT_RAID10, /* stripe of mirror */ - CT_RAID00, /* stripe of stripe */ - CT_VOLUME_OF_MIRRORS, /* volume of mirror */ - CT_PSEUDO_RAID3, /* really raid4 */ - CT_RAID50, /* stripe of raid5 */ - CT_RAID5D, /* raid5 distributed hot-sparing */ + CT_RAID10, /* stripe of mirror */ + CT_RAID00, /* stripe of stripe */ + CT_VOLUME_OF_MIRRORS, /* volume of mirror */ + CT_PSEUDO_RAID3, /* really raid4 */ + CT_RAID50, /* stripe of raid5 */ + CT_RAID5D, /* raid5 distributed hot-sparing */ CT_RAID5D0, - CT_RAID1E, /* extended raid1 mirroring */ + CT_RAID1E, /* extended raid1 mirroring */ CT_RAID6, CT_RAID60, } AAC_FSAVolType; @@ -345,23 +345,23 @@ typedef enum { * Host-addressable object types */ typedef enum { - FT_REG = 1, /* regular file */ - FT_DIR, /* directory */ - FT_BLK, /* "block" device - reserved */ - FT_CHR, /* "character special" device - reserved */ - FT_LNK, /* symbolic link */ - FT_SOCK, /* socket */ - FT_FIFO, /* fifo */ - FT_FILESYS, /* ADAPTEC's "FSA"(tm) filesystem */ - FT_DRIVE, /* physical disk - addressable in scsi by b/t/l */ - FT_SLICE, /* virtual disk - raw volume - slice */ - FT_PARTITION, /* FSA partition - carved out of a slice - building + FT_REG = 1, /* regular file */ + FT_DIR, /* directory */ + FT_BLK, /* "block" device - reserved */ + FT_CHR, /* "character special" device - reserved */ + FT_LNK, /* symbolic link */ + FT_SOCK, /* socket */ + FT_FIFO, /* fifo */ + FT_FILESYS, /* ADAPTEC's "FSA"(tm) filesystem */ + FT_DRIVE, /* physical disk - addressable in scsi by b/t/l */ + FT_SLICE, /* virtual disk - raw volume - slice */ + FT_PARTITION, /* FSA partition - carved out of a slice - building * block for containers */ - FT_VOLUME, /* Container - Volume Set */ - FT_STRIPE, /* Container - Stripe Set */ - FT_MIRROR, /* Container - Mirror Set */ - FT_RAID5, /* Container - Raid 5 Set */ - FT_DATABASE /* Storage object with "foreign" content manager */ + FT_VOLUME, /* Container - Volume Set */ + FT_STRIPE, /* Container - Stripe Set */ + FT_MIRROR, /* Container - Mirror Set */ + FT_RAID5, /* Container - Raid 5 Set */ + FT_DATABASE /* Storage object with "foreign" content manager */ } AAC_FType; /* @@ -467,7 +467,7 @@ typedef enum { CPU_MIPS, CPU_XSCALE, CPU__last -} AAC_CpuType; +} AAC_CpuType; typedef enum { CPUI960_JX = 1, @@ -544,7 +544,7 @@ typedef enum { * XXX the aac-2622 with no battery present reports PLATFORM_BAT_OPT_PRESENT */ typedef enum -{ +{ PLATFORM_BAT_REQ_PRESENT = 1, /* BATTERY REQUIRED AND PRESENT */ PLATFORM_BAT_REQ_NOTPRESENT, /* BATTERY REQUIRED AND NOT PRESENT */ PLATFORM_BAT_OPT_PRESENT, /* BATTERY OPTIONAL AND PRESENT */ @@ -552,9 +552,9 @@ typedef enum PLATFORM_BAT_NOT_SUPPORTED /* BATTERY NOT SUPPORTED */ } AAC_BatteryPlatform; -/* +/* * options supported by this board - * there has to be a one to one mapping of these defines and the ones in + * there has to be a one to one mapping of these defines and the ones in * fsaapi.h, search for FSA_SUPPORT_SNAPSHOT */ #define AAC_SUPPORTED_SNAPSHOT 0x01 @@ -577,24 +577,24 @@ typedef enum #define AAC_SUPPORTED_64BIT_ARRAYSIZE 0x40000 #define AAC_SUPPORTED_HEAT_SENSOR 0x80000 -/* +/* * Structure used to respond to a RequestAdapterInfo fib. */ struct aac_adapter_info { - AAC_Platform PlatformBase; /* adapter type */ + AAC_Platform PlatformBase; /* adapter type */ AAC_CpuType CpuArchitecture; /* adapter CPU type */ - AAC_CpuSubType CpuVariant; /* adapter CPU subtype */ - u_int32_t ClockSpeed; /* adapter CPU clockspeed */ - u_int32_t ExecutionMem; /* adapter Execution Memory + AAC_CpuSubType CpuVariant; /* adapter CPU subtype */ + u_int32_t ClockSpeed; /* adapter CPU clockspeed */ + u_int32_t ExecutionMem; /* adapter Execution Memory * size */ - u_int32_t BufferMem; /* adapter Data Memory */ - u_int32_t TotalMem; /* adapter Total Memory */ + u_int32_t BufferMem; /* adapter Data Memory */ + u_int32_t TotalMem; /* adapter Total Memory */ struct FsaRevision KernelRevision; /* adapter Kernel Software * Revision */ struct FsaRevision MonitorRevision; /* adapter Monitor/Diagnostic * Software Revision */ struct FsaRevision HardwareRevision;/* TBD */ - struct FsaRevision BIOSRevision; /* adapter BIOS Revision */ + struct FsaRevision BIOSRevision; /* adapter BIOS Revision */ u_int32_t ClusteringEnabled; u_int32_t ClusterChannelMask; u_int64_t SerialNumber; @@ -604,7 +604,7 @@ struct aac_adapter_info { AAC_OemFlavor OemVariant; } __packed; -/* +/* * Structure used to respond to a RequestSupplementAdapterInfo fib. */ struct vpd_info { @@ -692,7 +692,7 @@ struct aac_supplement_adapter_info { #define AAC_KERNEL_PANIC 0x00000100 /* - * Data types relating to control and monitoring of the NVRAM/WriteCache + * Data types relating to control and monitoring of the NVRAM/WriteCache * subsystem. */ @@ -867,7 +867,7 @@ typedef enum { AifEnGeneric = 1, /* Generic notification */ AifEnTaskComplete, /* Task has completed */ AifEnConfigChange, /* Adapter config change occurred */ - AifEnContainerChange, /* Adapter specific container + AifEnContainerChange, /* Adapter specific container * configuration change */ AifEnDeviceFailure, /* SCSI device failed */ AifEnMirrorFailover, /* Mirror failover started */ @@ -881,7 +881,7 @@ typedef enum { AifEnBatteryEvent, /* Significant NV battery event */ AifEnAddContainer, /* A new container was created. */ AifEnDeleteContainer, /* A container was deleted. */ - AifEnSMARTEvent, /* SMART Event */ + AifEnSMARTEvent, /* SMART Event */ AifEnBatteryNeedsRecond, /* The battery needs reconditioning */ AifEnClusterEvent, /* Some cluster event */ AifEnDiskSetEvent, /* A disk set event occured. */ @@ -967,7 +967,7 @@ struct aac_AifEventNotify { /* * Adapter Initiated FIB command structures. Start with the adapter * initiated FIBs that really come from the adapter, and get responded - * to by the host. + * to by the host. */ #define AAC_AIF_REPORT_MAX_SIZE 64 @@ -1081,6 +1081,7 @@ typedef enum { ST_DQUOT = 69, ST_STALE = 70, ST_REMOTE = 71, + ST_NOT_READY = 72, ST_BADHANDLE = 10001, ST_NOT_SYNC = 10002, ST_BAD_COOKIE = 10003, @@ -1091,7 +1092,8 @@ typedef enum { ST_JUKEBOX = 10008, ST_NOTMOUNTED = 10009, ST_MAINTMODE = 10010, - ST_STALEACL = 10011 + ST_STALEACL = 10011, + ST_BUS_RESET = 20001 } AAC_FSAStatus; /* @@ -1120,7 +1122,7 @@ typedef enum _VM_COMMANDS { VM_CtHostRead64, VM_CtHostWrite64, VM_DrvErrTblLog, /* drive error table/log type of command */ - VM_NameServe64 + VM_NameServe64 } AAC_VMCommand; /* @@ -1526,7 +1528,7 @@ enum { /* * The adapter can request the host print a message by setting the * DB_PRINTF flag in DOORBELL0. The driver responds by collecting the - * message from the printf buffer, clearing the DB_PRINTF flag in + * message from the printf buffer, clearing the DB_PRINTF flag in * DOORBELL0 and setting it in DOORBELL1. * (ODBR and IDBR respectively for the i960Rx adapters) */ diff --git a/sys/dev/aac/aacvar.h b/sys/dev/aac/aacvar.h index 3ecb262ca7eb..29eb8169e02d 100644 --- a/sys/dev/aac/aacvar.h +++ b/sys/dev/aac/aacvar.h @@ -56,7 +56,7 @@ */ /* - * The firmware interface allows for a 16-bit s/g list length. We limit + * The firmware interface allows for a 16-bit s/g list length. We limit * ourselves to a reasonable maximum and ensure alignment. */ #define AAC_MAXSGENTRIES 64 /* max S/G entries, limit 65535 */ @@ -78,7 +78,7 @@ #define AAC_PRINTF_BUFSIZE 256 /* - * We wait this many seconds for the adapter to come ready if it is still + * We wait this many seconds for the adapter to come ready if it is still * booting */ #define AAC_BOOT_TIMEOUT (3 * 60) @@ -126,7 +126,7 @@ struct aac_sim /* * Per-disk structure */ -struct aac_disk +struct aac_disk { device_t ad_dev; struct aac_softc *ad_controller; @@ -216,7 +216,7 @@ struct aac_common { AAC_QUEUE_ALIGN]; /* buffer for text messages from the controller */ - char ac_printf[AAC_PRINTF_BUFSIZE]; + char ac_printf[AAC_PRINTF_BUFSIZE]; /* fib for synchronous commands */ struct aac_fib ac_sync_fib; @@ -225,7 +225,7 @@ struct aac_common { /* * Interface operations */ -struct aac_interface +struct aac_interface { int (*aif_get_fwstatus)(struct aac_softc *sc); void (*aif_qnotify)(struct aac_softc *sc, int qbit); @@ -300,7 +300,7 @@ struct aac_fib_context { /* * Per-controller structure. */ -struct aac_softc +struct aac_softc { /* bus connections */ device_t aac_dev; @@ -347,7 +347,7 @@ struct aac_softc struct aac_command *aac_commands; /* command management */ - TAILQ_HEAD(,aac_command) aac_free; /* command structures + TAILQ_HEAD(,aac_command) aac_free; /* command structures * available for reuse */ TAILQ_HEAD(,aac_command) aac_ready; /* commands on hold for * controller resources */ @@ -416,7 +416,7 @@ struct aac_softc struct callout aac_daemontime; /* clock daemon callout */ - u_int32_t aac_max_fibs; /* max. FIB count */ + u_int32_t aac_max_fibs; /* max. FIB count */ u_int32_t aac_max_fibs_alloc; /* max. alloc. per alloc_commands() */ u_int32_t aac_max_fib_size; /* max. FIB size */ u_int32_t aac_sg_tablesize; /* max. sg count from host */ @@ -447,7 +447,7 @@ extern void aac_free(struct aac_softc *sc); extern int aac_attach(struct aac_softc *sc); extern int aac_detach(device_t dev); extern int aac_shutdown(device_t dev); -extern int aac_suspend(device_t dev); +extern int aac_suspend(device_t dev); extern int aac_resume(device_t dev); extern void aac_new_intr(void *arg); extern int aac_filter(void *arg); @@ -561,7 +561,7 @@ aac_dequeue_ ## name (struct aac_softc *sc) \ if ((cm = TAILQ_FIRST(&sc->aac_ ## name)) != NULL) { \ if ((cm->cm_flags & AAC_ON_ ## index) == 0) { \ printf("command %p not in queue, flags = %#x, " \ - "bit = %#x\n", cm, cm->cm_flags, \ + "bit = %#x\n", cm, cm->cm_flags, \ AAC_ON_ ## index); \ panic("command not in queue"); \ } \ |
