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