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 22 /* 23 * Copyright (c) 2002-2005 Neterion, Inc. 24 * All right Reserved. 25 * 26 * FileName : xgehal-event.h 27 * 28 * Description: event types 29 * 30 * Created: 7 June 2004 31 */ 32 33 #ifndef XGE_HAL_EVENT_H 34 #define XGE_HAL_EVENT_H 35 36 #include "xge-os-pal.h" 37 38 #define XGE_HAL_EVENT_BASE 0 39 #define XGE_LL_EVENT_BASE 100 40 41 /** 42 * enum xge_hal_event_e - Enumerates slow-path HAL events. 43 * @XGE_HAL_EVENT_UNKNOWN: Unknown (and invalid) event. 44 * @XGE_HAL_EVENT_SERR: Serious hardware error event. 45 * @XGE_HAL_EVENT_LINK_IS_UP: The link state has changed from 'down' to 46 * 'up'; upper-layer driver (typically, link layer) is 47 * supposed to wake the queue, etc. 48 * @XGE_HAL_EVENT_LINK_IS_DOWN: Link-down event. 49 * The link state has changed from 'down' to 'up'; 50 * upper-layer driver is supposed to stop traffic, etc. 51 * @XGE_HAL_EVENT_ECCERR: ECC error event. 52 * @XGE_HAL_EVENT_PARITYERR: Parity error event. 53 * @XGE_HAL_EVENT_TARGETABORT: Target abort event. Used when device 54 * aborts transmit operation with the corresponding transfer code 55 * (for T_CODE enum see xgehal-fifo.h and xgehal-ring.h) 56 * @XGE_HAL_EVENT_SLOT_FREEZE: Slot-freeze event. Driver tries to distinguish 57 * slot-freeze from the rest critical events (e.g. ECC) when it is 58 * impossible to PIO read "through" the bus, i.e. when getting all-foxes. 59 * 60 * xge_hal_event_e enumerates slow-path HAL eventis. 61 * 62 * See also: xge_hal_uld_cbs_t{}, xge_uld_link_up_f{}, 63 * xge_uld_link_down_f{}. 64 */ 65 typedef enum xge_hal_event_e { 66 XGE_HAL_EVENT_UNKNOWN = 0, 67 /* HAL events */ 68 XGE_HAL_EVENT_SERR = XGE_HAL_EVENT_BASE + 1, 69 XGE_HAL_EVENT_LINK_IS_UP = XGE_HAL_EVENT_BASE + 2, 70 XGE_HAL_EVENT_LINK_IS_DOWN = XGE_HAL_EVENT_BASE + 3, 71 XGE_HAL_EVENT_ECCERR = XGE_HAL_EVENT_BASE + 4, 72 XGE_HAL_EVENT_PARITYERR = XGE_HAL_EVENT_BASE + 5, 73 XGE_HAL_EVENT_TARGETABORT = XGE_HAL_EVENT_BASE + 6, 74 XGE_HAL_EVENT_SLOT_FREEZE = XGE_HAL_EVENT_BASE + 7, 75 } xge_hal_event_e; 76 77 #endif /* XGE_HAL_EVENT_H */ 78