Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/contrib/sys/dev/ic Add NetBSD RCSID.
details: https://anonhg.NetBSD.org/src/rev/96a55d676d19
branches: trunk
changeset: 553228:96a55d676d19
user: dyoung <dyoung%NetBSD.org@localhost>
date: Mon Oct 13 04:47:45 2003 +0000
description:
Add NetBSD RCSID.
For future use, add HAL status code -> status string mapping.
Set the right #include path for NetBSD's athhal_osdep.h.
diffstat:
contrib/sys/dev/ic/athhal.h | 30 ++++++++++++++++++++++++++++++
1 files changed, 30 insertions(+), 0 deletions(-)
diffs (52 lines):
diff -r 96cd52feee02 -r 96a55d676d19 contrib/sys/dev/ic/athhal.h
--- a/contrib/sys/dev/ic/athhal.h Mon Oct 13 04:38:20 2003 +0000
+++ b/contrib/sys/dev/ic/athhal.h Mon Oct 13 04:47:45 2003 +0000
@@ -1,3 +1,4 @@
+/* $NetBSD$ */
/*-
* Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting, Atheros
* Communications, Inc. All rights reserved.
@@ -46,7 +47,12 @@
* follow must call back into the HAL through interface, supplying the
* reference as the first parameter.
*/
+#ifdef __FreeBSD__
#include "ah_osdep.h"
+#endif
+#ifdef __NetBSD__
+#include <../contrib/sys/dev/ic/athhal_osdep.h>
+#endif
/*
* Status codes that may be returned by the HAL. Note that
@@ -72,6 +78,30 @@
HAL_EINPROGRESS, /* Operation incomplete */
} HAL_STATUS;
+#define HAL_STATUS_STRING(code, message) { code, message "(" #code ")" }
+#define HAL_STATUS_SENTINEL { 0, NULL }
+
+#define HAL_STATUS_STRINGS { \
+ HAL_STATUS_STRING(HAL_OK, "No error"), \
+ HAL_STATUS_STRING(HAL_ENXIO, "No hardware present"), \
+ HAL_STATUS_STRING(HAL_ENOMEM, "Memory allocation failed"), \
+ HAL_STATUS_STRING(HAL_EIO, "Hardware didn't respond as expected"), \
+ HAL_STATUS_STRING(HAL_EEMAGIC, "EEPROM magic number invalid"), \
+ HAL_STATUS_STRING(HAL_EEVERSION, "EEPROM version invalid"), \
+ HAL_STATUS_STRING(HAL_EELOCKED, "EEPROM unreadable"), \
+ HAL_STATUS_STRING(HAL_EEBADSUM, "EEPROM checksum invalid"), \
+ HAL_STATUS_STRING(HAL_EEREAD, "EEPROM read problem"), \
+ HAL_STATUS_STRING(HAL_EEBADMAC, "EEPROM mac address invalid"), \
+ HAL_STATUS_STRING(HAL_EESIZE, "EEPROM size not supported"), \
+ HAL_STATUS_STRING(HAL_EEWRITE, \
+ "Attempt to change write-locked EEPROM"), \
+ HAL_STATUS_STRING(HAL_EINVAL, "Invalid parameter to function"), \
+ HAL_STATUS_STRING(HAL_ENOTSUPP, "Hardware revision not supported"), \
+ HAL_STATUS_STRING(HAL_ESELFTEST, "Hardware self-test failed"), \
+ HAL_STATUS_STRING(HAL_EINPROGRESS, "Operation incomplete"), \
+ HAL_STATUS_SENTINEL \
+}
+
typedef enum {
AH_FALSE = 0, /* NB: lots of code assumes false is zero */
AH_TRUE = 1,
Home |
Main Index |
Thread Index |
Old Index