#ifndef _AIC79XX_H_
#define _AIC79XX_H_
#include "aic79xx_reg.h"
struct ahd_platform_data;
struct scb_platform_data;
#ifndef TRUE
#define TRUE …
#endif
#ifndef FALSE
#define FALSE …
#endif
#define ALL_CHANNELS …
#define ALL_TARGETS_MASK …
#define INITIATOR_WILDCARD …
#define SCB_LIST_NULL …
#define SCB_LIST_NULL_LE …
#define QOUTFIFO_ENTRY_VALID …
#define SCBID_IS_NULL(scbid) …
#define SCSIID_TARGET(ahd, scsiid) …
#define SCSIID_OUR_ID(scsiid) …
#define SCSIID_CHANNEL(ahd, scsiid) …
#define SCB_IS_SCSIBUS_B(ahd, scb) …
#define SCB_GET_OUR_ID(scb) …
#define SCB_GET_TARGET(ahd, scb) …
#define SCB_GET_CHANNEL(ahd, scb) …
#define SCB_GET_LUN(scb) …
#define SCB_GET_TARGET_OFFSET(ahd, scb) …
#define SCB_GET_TARGET_MASK(ahd, scb) …
#ifdef AHD_DEBUG
#define SCB_IS_SILENT(scb) …
#else
#define SCB_IS_SILENT …
#endif
#define TCL_TARGET_OFFSET(tcl) …
#define TCL_LUN(tcl) …
#define BUILD_TCL(scsiid, lun) …
#define BUILD_TCL_RAW(target, channel, lun) …
#define SCB_GET_TAG(scb) …
#ifndef AHD_TARGET_MODE
#undef AHD_TMODE_ENABLE
#define AHD_TMODE_ENABLE …
#endif
#define AHD_BUILD_COL_IDX(target, lun) …
#define AHD_GET_SCB_COL_IDX(ahd, scb) …
#define AHD_SET_SCB_COL_IDX(scb, col_idx) …
#define AHD_COPY_SCB_COL_IDX(dst, src) …
#define AHD_NEVER_COL_IDX …
#define AHD_NUM_TARGETS …
#define AHD_NUM_LUNS_NONPKT …
#define AHD_NUM_LUNS …
#define AHD_MAXTRANSFER_SIZE …
#define AHD_SCB_MAX …
#define AHD_MAX_QUEUE …
#define AHD_QIN_SIZE …
#define AHD_QOUT_SIZE …
#define AHD_QIN_WRAP(x) …
#define AHD_SCB_MAX_ALLOC …
#define AHD_TMODE_CMDS …
#define AHD_BUSRESET_DELAY …
ahd_chip;
ahd_feature;
ahd_bug;
ahd_flag;
struct initiator_status { … };
struct target_status { … };
sense_addr_t;
#define MAX_CDB_LEN …
#define MAX_CDB_LEN_WITH_SENSE_ADDR …
initiator_data;
struct target_data { … };
struct hardware_scb { … };
struct ahd_dma_seg { … };
struct ahd_dma64_seg { … };
struct map_node { … };
scb_flag;
struct scb { … };
TAILQ_HEAD(scb_tailq, scb);
BSD_LIST_HEAD(scb_list, scb);
struct scb_data { … };
struct target_cmd { … };
#define AHD_TMODE_EVENT_BUFFER_SIZE …
struct ahd_tmode_event { … };
#ifdef AHD_TARGET_MODE
struct ahd_tmode_lstate {
struct cam_path *path;
struct ccb_hdr_slist accept_tios;
struct ccb_hdr_slist immed_notifies;
struct ahd_tmode_event event_buffer[AHD_TMODE_EVENT_BUFFER_SIZE];
uint8_t event_r_idx;
uint8_t event_w_idx;
};
#else
struct ahd_tmode_lstate;
#endif
#define AHD_TRANS_CUR …
#define AHD_TRANS_ACTIVE …
#define AHD_TRANS_GOAL …
#define AHD_TRANS_USER …
#define AHD_PERIOD_10MHz …
#define AHD_WIDTH_UNKNOWN …
#define AHD_PERIOD_UNKNOWN …
#define AHD_OFFSET_UNKNOWN …
#define AHD_PPR_OPTS_UNKNOWN …
struct ahd_transinfo { … };
struct ahd_initiator_tinfo { … };
struct ahd_tmode_tstate { … };
#define AHD_SYNCRATE_160 …
#define AHD_SYNCRATE_PACED …
#define AHD_SYNCRATE_DT …
#define AHD_SYNCRATE_ULTRA2 …
#define AHD_SYNCRATE_ULTRA …
#define AHD_SYNCRATE_FAST …
#define AHD_SYNCRATE_MIN_DT …
#define AHD_SYNCRATE_SYNC …
#define AHD_SYNCRATE_MIN …
#define AHD_SYNCRATE_ASYNC …
#define AHD_SYNCRATE_MAX …
#define AHD_ASYNC_XFER_PERIOD …
#define AHD_SYNCRATE_REVA_120 …
#define AHD_SYNCRATE_REVA_160 …
struct ahd_phase_table_entry { … };
struct seeprom_config { … };
struct vpd_config { … };
#define FLXADDR_TERMCTL …
#define FLX_TERMCTL_ENSECHIGH …
#define FLX_TERMCTL_ENSECLOW …
#define FLX_TERMCTL_ENPRIHIGH …
#define FLX_TERMCTL_ENPRILOW …
#define FLXADDR_ROMSTAT_CURSENSECTL …
#define FLX_ROMSTAT_SEECFG …
#define FLX_ROMSTAT_EECFG …
#define FLX_ROMSTAT_SEE_93C66 …
#define FLX_ROMSTAT_SEE_NONE …
#define FLX_ROMSTAT_EE_512x8 …
#define FLX_ROMSTAT_EE_1MBx8 …
#define FLX_ROMSTAT_EE_2MBx8 …
#define FLX_ROMSTAT_EE_4MBx8 …
#define FLX_ROMSTAT_EE_16MBx8 …
#define CURSENSE_ENB …
#define FLXADDR_FLEXSTAT …
#define FLX_FSTAT_BUSY …
#define FLXADDR_CURRENT_STAT …
#define FLX_CSTAT_SEC_HIGH …
#define FLX_CSTAT_SEC_LOW …
#define FLX_CSTAT_PRI_HIGH …
#define FLX_CSTAT_PRI_LOW …
#define FLX_CSTAT_MASK …
#define FLX_CSTAT_SHIFT …
#define FLX_CSTAT_OKAY …
#define FLX_CSTAT_OVER …
#define FLX_CSTAT_UNDER …
#define FLX_CSTAT_INVALID …
int ahd_read_seeprom(struct ahd_softc *ahd, uint16_t *buf,
u_int start_addr, u_int count, int bstream);
int ahd_write_seeprom(struct ahd_softc *ahd, uint16_t *buf,
u_int start_addr, u_int count);
int ahd_verify_cksum(struct seeprom_config *sc);
int ahd_acquire_seeprom(struct ahd_softc *ahd);
void ahd_release_seeprom(struct ahd_softc *ahd);
ahd_msg_flags;
ahd_msg_type;
msg_loop_stat;
struct ahd_suspend_channel_state { … };
struct ahd_suspend_pci_state { … };
struct ahd_suspend_state { … };
ahd_bus_intr_t;
ahd_mode;
#define AHD_MK_MSK(x) …
#define AHD_MODE_DFF0_MSK …
#define AHD_MODE_DFF1_MSK …
#define AHD_MODE_CCHAN_MSK …
#define AHD_MODE_SCSI_MSK …
#define AHD_MODE_CFG_MSK …
#define AHD_MODE_UNKNOWN_MSK …
#define AHD_MODE_ANY_MSK …
ahd_mode_state;
struct ahd_completion
{ … };
struct ahd_softc { … };
#define AHD_PRECOMP_SLEW_INDEX …
#define AHD_AMPLITUDE_INDEX …
#define AHD_SET_SLEWRATE(ahd, new_slew) …
#define AHD_SET_PRECOMP(ahd, new_pcomp) …
#define AHD_SET_AMPLITUDE(ahd, new_amp) …
role_t;
struct ahd_devinfo { … };
#define AHD_PCI_IOADDR0 …
#define AHD_PCI_MEMADDR …
#define AHD_PCI_IOADDR1 …
ahd_device_setup_t;
struct ahd_pci_identity { … };
struct aic7770_identity { … };
extern struct aic7770_identity aic7770_ident_table [];
extern const int ahd_num_aic7770_devs;
#define AHD_EISA_SLOT_OFFSET …
#define AHD_EISA_IOSIZE …
const struct ahd_pci_identity *ahd_find_pci_device(ahd_dev_softc_t);
int ahd_pci_config(struct ahd_softc *,
const struct ahd_pci_identity *);
int ahd_pci_test_register_access(struct ahd_softc *);
void __maybe_unused ahd_pci_suspend(struct ahd_softc *);
void __maybe_unused ahd_pci_resume(struct ahd_softc *);
void ahd_qinfifo_requeue_tail(struct ahd_softc *ahd,
struct scb *scb);
struct ahd_softc *ahd_alloc(void *platform_arg, char *name);
int ahd_softc_init(struct ahd_softc *);
void ahd_controller_info(struct ahd_softc *ahd, char *buf);
int ahd_init(struct ahd_softc *ahd);
int __maybe_unused ahd_suspend(struct ahd_softc *ahd);
void __maybe_unused ahd_resume(struct ahd_softc *ahd);
int ahd_default_config(struct ahd_softc *ahd);
int ahd_parse_vpddata(struct ahd_softc *ahd,
struct vpd_config *vpd);
int ahd_parse_cfgdata(struct ahd_softc *ahd,
struct seeprom_config *sc);
void ahd_intr_enable(struct ahd_softc *ahd, int enable);
void ahd_pause_and_flushwork(struct ahd_softc *ahd);
void ahd_set_unit(struct ahd_softc *, int);
void ahd_set_name(struct ahd_softc *, char *);
struct scb *ahd_get_scb(struct ahd_softc *ahd, u_int col_idx);
void ahd_free_scb(struct ahd_softc *ahd, struct scb *scb);
void ahd_free(struct ahd_softc *ahd);
int ahd_reset(struct ahd_softc *ahd, int reinit);
int ahd_write_flexport(struct ahd_softc *ahd,
u_int addr, u_int value);
int ahd_read_flexport(struct ahd_softc *ahd, u_int addr,
uint8_t *value);
ahd_search_action;
int ahd_search_qinfifo(struct ahd_softc *ahd, int target,
char channel, int lun, u_int tag,
role_t role, uint32_t status,
ahd_search_action action);
int ahd_search_disc_list(struct ahd_softc *ahd, int target,
char channel, int lun, u_int tag,
int stop_on_first, int remove,
int save_state);
int ahd_reset_channel(struct ahd_softc *ahd, char channel,
int initiate_reset);
void ahd_compile_devinfo(struct ahd_devinfo *devinfo,
u_int our_id, u_int target,
u_int lun, char channel,
role_t role);
void ahd_find_syncrate(struct ahd_softc *ahd, u_int *period,
u_int *ppr_options, u_int maxsync);
ahd_neg_type;
int ahd_update_neg_request(struct ahd_softc*,
struct ahd_devinfo*,
struct ahd_tmode_tstate*,
struct ahd_initiator_tinfo*,
ahd_neg_type);
void ahd_set_width(struct ahd_softc *ahd,
struct ahd_devinfo *devinfo,
u_int width, u_int type, int paused);
void ahd_set_syncrate(struct ahd_softc *ahd,
struct ahd_devinfo *devinfo,
u_int period, u_int offset,
u_int ppr_options,
u_int type, int paused);
ahd_queue_alg;
#ifdef AHD_TARGET_MODE
void ahd_send_lstate_events(struct ahd_softc *,
struct ahd_tmode_lstate *);
void ahd_handle_en_lun(struct ahd_softc *ahd,
struct cam_sim *sim, union ccb *ccb);
cam_status ahd_find_tmode_devs(struct ahd_softc *ahd,
struct cam_sim *sim, union ccb *ccb,
struct ahd_tmode_tstate **tstate,
struct ahd_tmode_lstate **lstate,
int notfound_failure);
#ifndef AHD_TMODE_ENABLE
#define AHD_TMODE_ENABLE …
#endif
#endif
#ifdef AHD_DEBUG
extern uint32_t ahd_debug;
#define AHD_SHOW_MISC …
#define AHD_SHOW_SENSE …
#define AHD_SHOW_RECOVERY …
#define AHD_DUMP_SEEPROM …
#define AHD_SHOW_TERMCTL …
#define AHD_SHOW_MEMORY …
#define AHD_SHOW_MESSAGES …
#define AHD_SHOW_MODEPTR …
#define AHD_SHOW_SELTO …
#define AHD_SHOW_FIFOS …
#define AHD_SHOW_QFULL …
#define AHD_SHOW_DV …
#define AHD_SHOW_MASKED_ERRORS …
#define AHD_SHOW_QUEUE …
#define AHD_SHOW_TQIN …
#define AHD_SHOW_SG …
#define AHD_SHOW_INT_COALESCING …
#define AHD_DEBUG_SEQUENCER …
#endif
void ahd_print_devinfo(struct ahd_softc *ahd,
struct ahd_devinfo *devinfo);
void ahd_dump_card_state(struct ahd_softc *ahd);
int ahd_print_register(const ahd_reg_parse_entry_t *table,
u_int num_entries,
const char *name,
u_int address,
u_int value,
u_int *cur_column,
u_int wrap_point);
#endif