/*
* 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
*/
/*
*/
#ifndef _SI3124VAR_H
#define _SI3124VAR_H
#ifdef __cplusplus
extern "C" {
#endif
/*
* While the si_sge_t and si_sgt_t correspond to the actual SGE and SGT
* definitions as per the datasheet, the si_sgblock_t (i.e scatter gather
* block) is a logical data structure which can hold dynamic SGEs and it
* The idea is to use multiple tunable chained SGT tables per each PRB request.
*/
typedef struct si_sgblock {
} si_sgblock_t;
/*
* Each SGT (Scatter Gather Table) has 4 SGEs (Scatter Gather Entries).
* But each SGT effectively can host only 3 SGEs since the last SGE entry
* is used to hold a link to the next SGT in the chain. However the last
* SGT in the chain can host all the 4 entries since it does not need to
* link any more.
*/
/* Argument to be used for calls to timeout() */
typedef struct si_event_arg {
void *siea_ctlp;
int siea_port;
typedef struct si_portmult_state {
int sipm_num_ports;
/* one of PORT_TYPE_[NODEV | MULTIPLIER | ATAPI | DISK | UNKNOWN] */
/*
* sipm_port_type[] is good enough to capture the state of ports
* behind the multiplier. Since any of the port behind a multiplier
* is accessed through the same main controller port, we don't need
* additional si_port_state_t here.
*/
/* The following are for port types */
/* The following are for active state */
typedef struct si_port_state {
/* one of PORT_TYPE_[NODEV | MULTIPLIER | ATAPI | DISK | UNKNOWN] */
/*
* While the reset is in progress, we don't accept any more commands
* until we receive the command with SATA_CLEAR_DEV_RESET_STATE flag.
* However any commands with SATA_IGNORE_DEV_RESET_STATE are allowed in
* during such blockage.
*/
/* Argument to be used for calls to timeout() */
/*
* We mop the commands for either abort, reset, timeout or
* error handling cases. This counts how many mops are in progress.
* It is also used to return BUSY in tran_start if a mop is going on.
*/
int mopping_in_progress;
/* error recovery related info */
/* Warlock annotation */
typedef struct si_ctl_state {
int sictl_power_level;
/* pci config space handle */
/* mapping into bar 0 */
/* mapping into bar 1 */
/* Warlock annotation */
/*
* flags for si_flags
*/
/* progress values for si_attach */
/* clearing & setting the n'th bit in a given tag */
#if DEBUG
#endif /* DEBUG */
/* si_debug_flags */
extern uint32_t si_debug_flags;
if (si_debug_flags & (flag)) { \
}
if (si_debug_flags & (flag)) { \
}
if (si_debug_flags & (flag)) { \
}
/* Flags controlling the reset behavior */
#ifdef __cplusplus
}
#endif
#endif /* _SI3124VAR_H */