/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_SCSI_ADAPTERS_EMUL64VAR_H
#define _SYS_SCSI_ADAPTERS_EMUL64VAR_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* Convenient short hand defines
*/
#define FALSE 0
/*
* max number of LUNs per target
*/
/*
* Default emul64 scsi-options
*/
#define EMUL64_DEFAULT_SCSI_OPTIONS \
SCSI_OPTIONS_DR | \
SCSI_OPTIONS_TAG | \
/*
* Tag reject
*/
/*
* Interrupt actions returned by emul64_i_flag_event()
*/
/*
* Reset actions for emul64_i_reset_interface()
*/
/*
* extracting period and offset from emul64_synch
*/
/*
* timeout values
*/
/*
* delay time for polling loops
*/
/*
* busy wait delay time after chip reset
*/
/*
* timeout for EMUL64 coming out of reset
*/
/*
* emul64_softstate flags for introducing hot plug
*/
/*
* ioctl command definitions
*/
#ifndef EMUL64_RESET_TARGET
#endif
/*
* Debugging macros
*/
/*
* translate scsi_pkt flags into EMUL64 request packet flags
* It would be illegal if two flags are set; the driver does not
* check for this. Setting NODISCON and a tag flag is harmless.
*/
}
/*
* throttle values for EMUL64 request queue
*/
}
/*
* mutex short hands
*/
/*
* HBA interface macros
*/
/*
* Results of checking for range overlap.
*/
typedef enum emul64_rng_overlap {
/*
* Rather than keep the entire image of the disk, we only keep
* the blocks which have been written with non-zeros. As the
* purpose of this driver is to exercise format and perhaps other
* large-disk management tools, only recording the label for
* i/o is sufficient
*/
typedef struct blklist {
} blklist_t;
/*
* Structure to track a range of blocks where writes are to be ignored.
*/
typedef struct emul64_nowrite {
typedef struct emul64_tgt {
/* skip writes */
/* Fields for error injection */
} emul64_tgt_t;
/*
* emul64 softstate structure
*/
/*
* deadline slot structure for timeout handling
*/
struct emul64_slot {
};
/*
* Record the reset notification requests from target drivers.
*/
struct emul64_reset_notify_entry {
};
struct emul64 {
/*
* Transport structure for this instance of the hba
*/
/*
* dev_info_t reference can be found in the transport structure
*/
/*
* Interrupt block cookie
*/
/*
* Firmware revision number
*/
/*
* timeout id
*/
/*
* scsi options, scsi_tag_age_limit per emul64
*/
int emul64_scsi_options;
/*
* scsi_reset_delay per emul64
*/
/*
* current host ID
*/
/*
* suspended flag for power management
*/
/*
*/
/*
* EMUL64 Hardware register pointer.
*/
/*
* for keeping track of the max LUNs per target on this bus
*/
/*
*/
};
extern void emul64_bsd_init();
extern void emul64_bsd_fini();
extern void emul64_bsd_get_props(dev_info_t *);
diskaddr_t, size_t);
extern int emul64_bsd_blkcompare(const void *, const void *);
extern int emul64debug;
extern long emul64_nowrite_count;
extern kmutex_t emul64_stats_mutex;
extern int emul64_collect_stats;
extern uint64_t emul64_taskq_max;
extern int emul64_max_task;
extern int emul64_task_nthreads;
#ifdef __cplusplus
}
#endif
#endif /* _SYS_SCSI_ADAPTERS_EMUL64VAR_H */