17956Sxiuyan.wang@Sun.COM /* 27956Sxiuyan.wang@Sun.COM * CDDL HEADER START 37956Sxiuyan.wang@Sun.COM * 47956Sxiuyan.wang@Sun.COM * The contents of this file are subject to the terms of the 57956Sxiuyan.wang@Sun.COM * Common Development and Distribution License (the "License"). 67956Sxiuyan.wang@Sun.COM * You may not use this file except in compliance with the License. 77956Sxiuyan.wang@Sun.COM * 87956Sxiuyan.wang@Sun.COM * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97956Sxiuyan.wang@Sun.COM * or http://www.opensolaris.org/os/licensing. 107956Sxiuyan.wang@Sun.COM * See the License for the specific language governing permissions 117956Sxiuyan.wang@Sun.COM * and limitations under the License. 127956Sxiuyan.wang@Sun.COM * 137956Sxiuyan.wang@Sun.COM * When distributing Covered Code, include this CDDL HEADER in each 147956Sxiuyan.wang@Sun.COM * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157956Sxiuyan.wang@Sun.COM * If applicable, add the following below this CDDL HEADER, with the 167956Sxiuyan.wang@Sun.COM * fields enclosed by brackets "[]" replaced with your own identifying 177956Sxiuyan.wang@Sun.COM * information: Portions Copyright [yyyy] [name of copyright owner] 187956Sxiuyan.wang@Sun.COM * 197956Sxiuyan.wang@Sun.COM * CDDL HEADER END 207956Sxiuyan.wang@Sun.COM */ 21*8687SJing.Xiong@Sun.COM 227956Sxiuyan.wang@Sun.COM /* 237956Sxiuyan.wang@Sun.COM * Copyright 2008 NetXen, Inc. All rights reserved. 247956Sxiuyan.wang@Sun.COM * Use is subject to license terms. 257956Sxiuyan.wang@Sun.COM */ 267956Sxiuyan.wang@Sun.COM /* 277956Sxiuyan.wang@Sun.COM * Error codes for HAL - NIC interface. 287956Sxiuyan.wang@Sun.COM * 297956Sxiuyan.wang@Sun.COM */ 307956Sxiuyan.wang@Sun.COM 317956Sxiuyan.wang@Sun.COM #ifndef _NX_ERRORCODE_H_ 327956Sxiuyan.wang@Sun.COM #define _NX_ERRORCODE_H_ 337956Sxiuyan.wang@Sun.COM 34*8687SJing.Xiong@Sun.COM #ifdef __cplusplus 35*8687SJing.Xiong@Sun.COM extern "C" { 36*8687SJing.Xiong@Sun.COM #endif 37*8687SJing.Xiong@Sun.COM 387956Sxiuyan.wang@Sun.COM /* 397956Sxiuyan.wang@Sun.COM * Common Error Codes 407956Sxiuyan.wang@Sun.COM */ 417956Sxiuyan.wang@Sun.COM 427956Sxiuyan.wang@Sun.COM #define NX_RCODE_SUCCESS 0 437956Sxiuyan.wang@Sun.COM /* Insuff. mem resource on host */ 447956Sxiuyan.wang@Sun.COM #define NX_RCODE_NO_HOST_MEM 1 457956Sxiuyan.wang@Sun.COM /* Insuff. misc. resources on host */ 467956Sxiuyan.wang@Sun.COM #define NX_RCODE_NO_HOST_RESOURCE 2 477956Sxiuyan.wang@Sun.COM /* Insuff. crb resources on card */ 487956Sxiuyan.wang@Sun.COM #define NX_RCODE_NO_CARD_CRB 3 497956Sxiuyan.wang@Sun.COM /* Insuff. mem resources on card */ 507956Sxiuyan.wang@Sun.COM #define NX_RCODE_NO_CARD_MEM 4 517956Sxiuyan.wang@Sun.COM /* Insuff. misc. resources on card */ 527956Sxiuyan.wang@Sun.COM #define NX_RCODE_NO_CARD_RESOURCE 5 537956Sxiuyan.wang@Sun.COM /* One or more args to routine were out-of-range */ 547956Sxiuyan.wang@Sun.COM #define NX_RCODE_INVALID_ARGS 6 557956Sxiuyan.wang@Sun.COM /* Requested action is invalid / in error */ 567956Sxiuyan.wang@Sun.COM #define NX_RCODE_INVALID_ACTION 7 577956Sxiuyan.wang@Sun.COM /* Requested RX/TX has invalid state */ 587956Sxiuyan.wang@Sun.COM #define NX_RCODE_INVALID_STATE 8 597956Sxiuyan.wang@Sun.COM /* Requested action is not supported */ 607956Sxiuyan.wang@Sun.COM #define NX_RCODE_NOT_SUPPORTED 9 617956Sxiuyan.wang@Sun.COM /* Requested action is not allowed */ 627956Sxiuyan.wang@Sun.COM #define NX_RCODE_NOT_PERMITTED 10 637956Sxiuyan.wang@Sun.COM /* System not ready for action */ 647956Sxiuyan.wang@Sun.COM #define NX_RCODE_NOT_READY 11 657956Sxiuyan.wang@Sun.COM /* Target of requested action does not exist */ 667956Sxiuyan.wang@Sun.COM #define NX_RCODE_DOES_NOT_EXIST 2 677956Sxiuyan.wang@Sun.COM /* Requested action already performed/complete */ 687956Sxiuyan.wang@Sun.COM #define NX_RCODE_ALREADY_EXISTSi 13 697956Sxiuyan.wang@Sun.COM /* Invalid signature provided */ 707956Sxiuyan.wang@Sun.COM #define NX_RCODE_BAD_SIGNATURE 14 717956Sxiuyan.wang@Sun.COM /* Valid command, not implemented */ 727956Sxiuyan.wang@Sun.COM #define NX_RCODE_CMD_NOT_IMPLi 15 737956Sxiuyan.wang@Sun.COM /* Invalid/Unknown command */ 747956Sxiuyan.wang@Sun.COM #define NX_RCODE_CMD_INVALID 16 757956Sxiuyan.wang@Sun.COM /* Timeout on polling rsp status */ 767956Sxiuyan.wang@Sun.COM #define NX_RCODE_TIMEOUT 17 777956Sxiuyan.wang@Sun.COM #define NX_RCODE_CMD_FAILED 18 787956Sxiuyan.wang@Sun.COM #define NX_RCODE_MAX_EXCEEDED 19 797956Sxiuyan.wang@Sun.COM #define NX_RCODE_MAX 20 807956Sxiuyan.wang@Sun.COM 817956Sxiuyan.wang@Sun.COM /* 827956Sxiuyan.wang@Sun.COM * Macros 837956Sxiuyan.wang@Sun.COM */ 847956Sxiuyan.wang@Sun.COM #define NX_IS_RCODE_VALID(ERR) (ERR >= NX_RCODE_MAX) 857956Sxiuyan.wang@Sun.COM 86*8687SJing.Xiong@Sun.COM #ifdef __cplusplus 87*8687SJing.Xiong@Sun.COM } 88*8687SJing.Xiong@Sun.COM #endif 89*8687SJing.Xiong@Sun.COM 907956Sxiuyan.wang@Sun.COM #endif /* _NX_ERRORCODE_H_ */ 91