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 * Copyright 2008 NetXen, Inc. All rights reserved. 23 * Use is subject to license terms. 24 */ 25 /* 26 * Error codes for HAL - NIC interface. 27 * 28 */ 29 30 #ifndef _NX_ERRORCODE_H_ 31 #define _NX_ERRORCODE_H_ 32 33 /* 34 * Common Error Codes 35 */ 36 37 #define NX_RCODE_SUCCESS 0 38 /* Insuff. mem resource on host */ 39 #define NX_RCODE_NO_HOST_MEM 1 40 /* Insuff. misc. resources on host */ 41 #define NX_RCODE_NO_HOST_RESOURCE 2 42 /* Insuff. crb resources on card */ 43 #define NX_RCODE_NO_CARD_CRB 3 44 /* Insuff. mem resources on card */ 45 #define NX_RCODE_NO_CARD_MEM 4 46 /* Insuff. misc. resources on card */ 47 #define NX_RCODE_NO_CARD_RESOURCE 5 48 /* One or more args to routine were out-of-range */ 49 #define NX_RCODE_INVALID_ARGS 6 50 /* Requested action is invalid / in error */ 51 #define NX_RCODE_INVALID_ACTION 7 52 /* Requested RX/TX has invalid state */ 53 #define NX_RCODE_INVALID_STATE 8 54 /* Requested action is not supported */ 55 #define NX_RCODE_NOT_SUPPORTED 9 56 /* Requested action is not allowed */ 57 #define NX_RCODE_NOT_PERMITTED 10 58 /* System not ready for action */ 59 #define NX_RCODE_NOT_READY 11 60 /* Target of requested action does not exist */ 61 #define NX_RCODE_DOES_NOT_EXIST 2 62 /* Requested action already performed/complete */ 63 #define NX_RCODE_ALREADY_EXISTSi 13 64 /* Invalid signature provided */ 65 #define NX_RCODE_BAD_SIGNATURE 14 66 /* Valid command, not implemented */ 67 #define NX_RCODE_CMD_NOT_IMPLi 15 68 /* Invalid/Unknown command */ 69 #define NX_RCODE_CMD_INVALID 16 70 /* Timeout on polling rsp status */ 71 #define NX_RCODE_TIMEOUT 17 72 #define NX_RCODE_CMD_FAILED 18 73 #define NX_RCODE_MAX_EXCEEDED 19 74 #define NX_RCODE_MAX 20 75 76 /* 77 * Macros 78 */ 79 #define NX_IS_RCODE_VALID(ERR) (ERR >= NX_RCODE_MAX) 80 81 #endif /* _NX_ERRORCODE_H_ */ 82