aac.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright (c) 2000 Michael Smith
* Copyright (c) 2001 Scott Long
* Copyright (c) 2000 BSDi
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
*/
#ifndef _AAC_H_
#define _AAC_H_
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#define AACOK 0
#define AACERR -1
/* for mode sense */
#define MODE_FORMAT_SIZE (sizeof (struct mode_format))
#ifndef SD_MODE_SENSE_PAGE3_CODE
#define SD_MODE_SENSE_PAGE3_CODE 0x03
#endif
#ifndef SD_MODE_SENSE_PAGE4_CODE
#define SD_MODE_SENSE_PAGE4_CODE 0x04
#endif
#ifndef SCMD_SYNCHRONIZE_CACHE
#define SCMD_SYNCHRONIZE_CACHE 0x35
#endif
#define AAC_SECTOR_SIZE 512
#define AAC_NUMBER_OF_HEADS 255
#define AAC_SECTORS_PER_TRACK 63
#define AAC_ROTATION_SPEED 10000
#define AAC_MAX_PFN 0xfffff
#define AAC_ADDITIONAL_LEN 31
#define AAC_ANSI_VER 2
#define AAC_RESP_DATA_FORMAT 2
struct aac_card_type {
char *desc;
};
struct aac_container {
};
struct sync_mode_res {
};
struct aac_cmd_queue {
};
struct aac_slot {
int next;
int index;
};
/* flags for aac_attach */
#define AAC_SOFT_STATE_ALLOCED (1 << 0)
struct aac_softstate {
int card;
char *pci_mem_base_addr;
struct sync_mode_res sync_mode;
/* the following is communication space */
struct aac_comm_space *comm_space;
/* the following is about aac queues */
struct aac_queue_table *qtablep;
/* the following is used for soft int */
/* aac command queues */
struct aac_cmd_queue q_comp;
struct aac_cmd_queue q_wait;
/* aac I/O slots */
int total_slotn;
int free_io_slot_head;
int free_io_slot_tail;
int flags;
};
#define AAC_CMD_CONSISTENT 1
struct aac_cmd {
int cmdlen;
int flags;
};
/* SCSI inquiry data */
struct inquiry_data {
/* Peripheral Device Type */
/* ANSI-approved version */
/* Linked |Reserved| CmdQue | SftRe */
};
#ifdef __cplusplus
}
#endif
#endif /* _AAC_H_ */