xgehal-event.h revision 8347601bcb0a439f6e50fc36b4039a73d08700e1
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 *
21 * Copyright (c) 2002-2006 Neterion, Inc.
22 */
23
24#ifndef XGE_HAL_EVENT_H
25#define XGE_HAL_EVENT_H
26
27#include "xge-os-pal.h"
28
29__EXTERN_BEGIN_DECLS
30
31#define XGE_HAL_EVENT_BASE		0
32#define XGE_LL_EVENT_BASE		100
33
34/**
35 * enum xge_hal_event_e - Enumerates slow-path HAL events.
36 * @XGE_HAL_EVENT_UNKNOWN: Unknown (and invalid) event.
37 * @XGE_HAL_EVENT_SERR: Serious hardware error event.
38 * @XGE_HAL_EVENT_LINK_IS_UP: The link state has changed from 'down' to
39 * 'up'; upper-layer driver (typically, link layer) is
40 * supposed to wake the queue, etc.
41 * @XGE_HAL_EVENT_LINK_IS_DOWN: Link-down event.
42 *                    The link state has changed from 'down' to 'up';
43 *                    upper-layer driver is supposed to stop traffic, etc.
44 * @XGE_HAL_EVENT_ECCERR: ECC error event.
45 * @XGE_HAL_EVENT_PARITYERR: Parity error event.
46 * @XGE_HAL_EVENT_TARGETABORT: Target abort event. Used when device
47 * aborts transmit operation with the corresponding transfer code
48 * (for T_CODE enum see xgehal-fifo.h and xgehal-ring.h)
49 * @XGE_HAL_EVENT_SLOT_FREEZE: Slot-freeze event. Driver tries to distinguish
50 * slot-freeze from the rest critical events (e.g. ECC) when it is
51 * impossible to PIO read "through" the bus, i.e. when getting all-foxes.
52 *
53 * xge_hal_event_e enumerates slow-path HAL eventis.
54 *
55 * See also: xge_hal_uld_cbs_t{}, xge_uld_link_up_f{},
56 * xge_uld_link_down_f{}.
57 */
58typedef enum xge_hal_event_e {
59	XGE_HAL_EVENT_UNKNOWN		= 0,
60	/* HAL events */
61	XGE_HAL_EVENT_SERR		= XGE_HAL_EVENT_BASE + 1,
62	XGE_HAL_EVENT_LINK_IS_UP	= XGE_HAL_EVENT_BASE + 2,
63	XGE_HAL_EVENT_LINK_IS_DOWN	= XGE_HAL_EVENT_BASE + 3,
64	XGE_HAL_EVENT_ECCERR		= XGE_HAL_EVENT_BASE + 4,
65	XGE_HAL_EVENT_PARITYERR		= XGE_HAL_EVENT_BASE + 5,
66	XGE_HAL_EVENT_TARGETABORT       = XGE_HAL_EVENT_BASE + 6,
67	XGE_HAL_EVENT_SLOT_FREEZE       = XGE_HAL_EVENT_BASE + 7,
68} xge_hal_event_e;
69
70__EXTERN_END_DECLS
71
72#endif /* XGE_HAL_EVENT_H */
73