/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* scsa1394 definitions
*/
#ifdef __cplusplus
extern "C" {
#endif
/*
* each lun uses a worker thread for various deferred processing
*/
typedef enum {
/* thread requests */
enum {
};
typedef struct scsa1394_thread {
/* 1394 device state */
typedef enum {
SCSA1394_DEV_INIT = 0,
/* per-lun statistics */
typedef struct scsa1394_lun_stat {
/*
* ring buffer of the last N failed commands. stat_cmd_fail_last_idx
* is an index into stat_cmd_fail_last the array and points to the
* entry to be written next. The first 16 bytes are CDB bytes,
* the last 8 bytes are a timestamp (lbolt).
*/
/*
* errors
*/
/* logical unit */
typedef struct scsa1394_lun {
/* workarounds */
/* l_softintr_req */
enum {
};
/* per-instance statistics */
typedef struct scsa1394_inst_stat {
/*
* errors
*/
/* per-instance soft state structure */
typedef struct scsa1394_state {
/* for sbp2_bus_buf.bb_hdl */
typedef struct scsa1394_bus_buf {
/* various translation macros */
/* macros to calculate LBA for 6/10/12-byte commands */
/* macro to calculate LEN for SCMD_READ_CD command */
/* calculate block size for CD-RW writes */
typedef struct scsa1394_bw_list {
int vid_match;
int vid;
/* match type */
enum {
};
#define NELEM(a) (sizeof (a) / sizeof (*(a)))
/* misc constants */
enum {
};
/* SBP-2 routines */
int scsa1394_sbp2_attach(scsa1394_state_t *);
void scsa1394_sbp2_detach(scsa1394_state_t *);
int scsa1394_sbp2_login(scsa1394_state_t *, int);
void scsa1394_sbp2_req(scsa1394_state_t *, int, int);
void scsa1394_sbp2_disconnect(scsa1394_state_t *);
void scsa1394_sbp2_nudge(scsa1394_lun_t *);
void scsa1394_sbp2_flush_cmds(scsa1394_lun_t *, int, int, int);
/* HBA public routines */
void scsa1394_thr_cancel(scsa1394_thread_t *);
void scsa1394_thr_wake(scsa1394_thread_t *, int);
void scsa1394_thr_clear_req(scsa1394_thread_t *, int);
#ifdef __cplusplus
}
#endif
#endif /* _SYS_1394_TARGETS_SCSA1394_IMPL_H */