--- /dev/null	2013-08-22 18:59:24.000000000 -0400
+++ new/usr/src/uts/common/io/sfxge/falcon_stats.h	2013-08-22 18:59:24.699308474 -0400
@@ -0,0 +1,245 @@
+/*-
+ * Copyright 2008-2013 Solarflare Communications Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef	_SYS_FALCON_STATS_H
+#define	_SYS_FALCON_STATS_H
+
+#ifdef	__cplusplus
+extern "C" {
+#endif
+
+/*
+ * Falcon GMAC stats
+ */
+#define	G_RX_GOOD_OCT_OFFSET 0x0
+#define	G_RX_GOOD_OCT_WIDTH 6
+#define	G_RX_BAD_OCT_OFFSET 0x8
+#define	G_RX_BAD_OCT_WIDTH 6
+#define	G_RX_MISS_PKT_OFFSET 0x10
+#define	G_RX_MISS_PKT_WIDTH 4
+#define	G_RX_FALSE_CRS_OFFSET 0x14
+#define	G_RX_FALSE_CRS_WIDTH 4
+#define	G_RX_PAUSE_PKT_OFFSET 0x18
+#define	G_RX_PAUSE_PKT_WIDTH 4
+#define	G_RX_BAD_PKT_OFFSET 0x1C
+#define	G_RX_BAD_PKT_WIDTH 4
+#define	G_RX_UCAST_PKT_OFFSET 0x20
+#define	G_RX_UCAST_PKT_WIDTH 4
+#define	G_RX_MCAST_PKT_OFFSET 0x24
+#define	G_RX_MCAST_PKT_WIDTH 4
+#define	G_RX_BCAST_PKT_OFFSET 0x28
+#define	G_RX_BCAST_PKT_WIDTH 4
+#define	G_RX_GOOD_LT_64_PKT_OFFSET 0x2C
+#define	G_RX_GOOD_LT_64_PKT_WIDTH 4
+#define	G_RX_BAD_LT_64_PKT_OFFSET 0x30
+#define	G_RX_BAD_LT_64_PKT_WIDTH 4
+#define	G_RX_64_PKT_OFFSET 0x34
+#define	G_RX_64_PKT_WIDTH 4
+#define	G_RX_65_TO_127_PKT_OFFSET 0x38
+#define	G_RX_65_TO_127_PKT_WIDTH 4
+#define	G_RX_128_TO_255_PKT_OFFSET 0x3C
+#define	G_RX_128_TO_255_PKT_WIDTH 4
+#define	G_RX_256_TO_511_PKT_OFFSET 0x40
+#define	G_RX_256_TO_511_PKT_WIDTH 4
+#define	G_RX_512_TO_1023_PKT_OFFSET 0x44
+#define	G_RX_512_TO_1023_PKT_WIDTH 4
+#define	G_RX_1024_TO_15XX_PKT_OFFSET 0x48
+#define	G_RX_1024_TO_15XX_PKT_WIDTH 4
+#define	G_RX_15XX_TO_JUMBO_PKT_OFFSET 0x4C
+#define	G_RX_15XX_TO_JUMBO_PKT_WIDTH 4
+#define	G_RX_GT_JUMBO_PKT_OFFSET 0x50
+#define	G_RX_GT_JUMBO_PKT_WIDTH 4
+#define	G_RX_FCS_ERR_64_TO_15XX_PKT_OFFSET 0x54
+#define	G_RX_FCS_ERR_64_TO_15XX_PKT_WIDTH 4
+#define	G_RX_FCS_ERR_15XX_TO_JUMBO_PKT_OFFSET 0x58
+#define	G_RX_FCS_ERR_15XX_TO_JUMBO_PKT_WIDTH 4
+#define	G_RX_FCS_ERR_GT_JUMBO_PKT_OFFSET 0x5C
+#define	G_RX_FCS_ERR_GT_JUMBO_PKT_WIDTH 4
+
+#define	G_TX_GOOD_BAD_OCT_OFFSET 0x80
+#define	G_TX_GOOD_BAD_OCT_WIDTH 6
+#define	G_TX_GOOD_OCT_OFFSET 0x88
+#define	G_TX_GOOD_OCT_WIDTH 6
+#define	G_TX_SGL_COL_PKT_OFFSET 0x90
+#define	G_TX_SGL_COL_PKT_WIDTH 4
+#define	G_TX_MULT_COL_PKT_OFFSET 0x94
+#define	G_TX_MULT_COL_PKT_WIDTH 4
+#define	G_TX_EX_COL_PKT_OFFSET 0x98
+#define	G_TX_EX_COL_PKT_WIDTH 4
+#define	G_TX_DEF_PKT_OFFSET 0x9C
+#define	G_TX_DEF_PKT_WIDTH 4
+#define	G_TX_LATE_COL_OFFSET 0xA0
+#define	G_TX_LATE_COL_WIDTH 4
+#define	G_TX_EX_DEF_PKT_OFFSET 0xA4
+#define	G_TX_EX_DEF_PKT_WIDTH 4
+#define	G_TX_PAUSE_PKT_OFFSET 0xA8
+#define	G_TX_PAUSE_PKT_WIDTH 4
+#define	G_TX_BAD_PKT_OFFSET 0xAC
+#define	G_TX_BAD_PKT_WIDTH 4
+#define	G_TX_UCAST_PKT_OFFSET 0xB0
+#define	G_TX_UCAST_PKT_WIDTH 4
+#define	G_TX_MCAST_PKT_OFFSET 0xB4
+#define	G_TX_MCAST_PKT_WIDTH 4
+#define	G_TX_BCAST_PKT_OFFSET 0xB8
+#define	G_TX_BCAST_PKT_WIDTH 4
+#define	G_TX_LT_64_PKT_OFFSET 0xBC
+#define	G_TX_LT_64_PKT_WIDTH 4
+#define	G_TX_64_PKT_OFFSET 0xC0
+#define	G_TX_64_PKT_WIDTH 4
+#define	G_TX_65_TO_127_PKT_OFFSET 0xC4
+#define	G_TX_65_TO_127_PKT_WIDTH 4
+#define	G_TX_128_TO_255_PKT_OFFSET 0xC8
+#define	G_TX_128_TO_255_PKT_WIDTH 4
+#define	G_TX_256_TO_511_PKT_OFFSET 0xCC
+#define	G_TX_256_TO_511_PKT_WIDTH 4
+#define	G_TX_512_TO_1023_PKT_OFFSET 0xD0
+#define	G_TX_512_TO_1023_PKT_WIDTH 4
+#define	G_TX_1024_TO_15XX_PKT_OFFSET 0xD4
+#define	G_TX_1024_TO_15XX_PKT_WIDTH 4
+#define	G_TX_15XX_TO_JUMBO_PKT_OFFSET 0xD8
+#define	G_TX_15XX_TO_JUMBO_PKT_WIDTH 4
+#define	G_TX_GT_JUMBO_PKT_OFFSET 0xDC
+#define	G_TX_GT_JUMBO_PKT_WIDTH 4
+#define	G_TX_NON_TCP_UDP_PKT_OFFSET 0xE0
+#define	G_TX_NON_TCP_UDP_PKT_WIDTH 2
+#define	G_TX_MAC_SRC_ERR_PKT_OFFSET 0xE4
+#define	G_TX_MAC_SRC_ERR_PKT_WIDTH 2
+#define	G_TX_IP_SRC_ERR_PKT_OFFSET 0xE8
+#define	G_TX_IP_SRC_ERR_PKT_WIDTH 2
+
+#define	G_DMA_DONE_OFFSET 0xEC
+#define	G_DMA_DONE_WIDTH 4
+
+#define	G_STAT_OFFSET(_id) G_ ## _id ## _OFFSET
+#define	G_STAT_WIDTH(_id) G_ ## _id ## _WIDTH
+
+/*
+ * Falcon XMAC stats
+ */
+#define	XG_RX_OCTETS_OFFSET 0x0
+#define	XG_RX_OCTETS_WIDTH 6
+#define	XG_RX_OCTETS_OK_OFFSET 0x8
+#define	XG_RX_OCTETS_OK_WIDTH 6
+#define	XG_RX_PKTS_OFFSET 0x10
+#define	XG_RX_PKTS_WIDTH 4
+#define	XG_RX_PKTS_OK_OFFSET 0x14
+#define	XG_RX_PKTS_OK_WIDTH 4
+#define	XG_RX_BROADCAST_PKTS_OFFSET 0x18
+#define	XG_RX_BROADCAST_PKTS_WIDTH 4
+#define	XG_RX_MULTICAST_PKTS_OFFSET 0x1C
+#define	XG_RX_MULTICAST_PKTS_WIDTH 4
+#define	XG_RX_UNICAST_PKTS_OFFSET 0x20
+#define	XG_RX_UNICAST_PKTS_WIDTH 4
+#define	XG_RX_UNDERSIZE_PKTS_OFFSET 0x24
+#define	XG_RX_UNDERSIZE_PKTS_WIDTH 4
+#define	XG_RX_OVERSIZE_PKTS_OFFSET 0x28
+#define	XG_RX_OVERSIZE_PKTS_WIDTH 4
+#define	XG_RX_JABBER_PKTS_OFFSET 0x2C
+#define	XG_RX_JABBER_PKTS_WIDTH 4
+#define	XG_RX_UNDERSIZE_FCS_ERROR_PKTS_OFFSET 0x30
+#define	XG_RX_UNDERSIZE_FCS_ERROR_PKTS_WIDTH 4
+#define	XG_RX_DROP_EVENTS_OFFSET 0x34
+#define	XG_RX_DROP_EVENTS_WIDTH 4
+#define	XG_RX_FCS_ERROR_PKTS_OFFSET 0x38
+#define	XG_RX_FCS_ERROR_PKTS_WIDTH 4
+#define	XG_RX_ALIGN_ERROR_OFFSET 0x3C
+#define	XG_RX_ALIGN_ERROR_WIDTH 4
+#define	XG_RX_SYMBOL_ERROR_OFFSET 0x40
+#define	XG_RX_SYMBOL_ERROR_WIDTH 4
+#define	XG_RX_INTERNAL_MAC_ERROR_OFFSET 0x44
+#define	XG_RX_INTERNAL_MAC_ERROR_WIDTH 4
+#define	XG_RX_CONTROL_PKTS_OFFSET 0x48
+#define	XG_RX_CONTROL_PKTS_WIDTH 4
+#define	XG_RX_PAUSE_PKTS_OFFSET 0x4C
+#define	XG_RX_PAUSE_PKTS_WIDTH 4
+#define	XG_RX_PKTS_64_OCTETS_OFFSET 0x50
+#define	XG_RX_PKTS_64_OCTETS_WIDTH 4
+#define	XG_RX_PKTS_65_TO_127_OCTETS_OFFSET 0x54
+#define	XG_RX_PKTS_65_TO_127_OCTETS_WIDTH 4
+#define	XG_RX_PKTS_128_TO_255_OCTETS_OFFSET 0x58
+#define	XG_RX_PKTS_128_TO_255_OCTETS_WIDTH 4
+#define	XG_RX_PKTS_256_TO_511_OCTETS_OFFSET 0x5C
+#define	XG_RX_PKTS_256_TO_511_OCTETS_WIDTH 4
+#define	XG_RX_PKTS_512_TO_1023_OCTETS_OFFSET 0x60
+#define	XG_RX_PKTS_512_TO_1023_OCTETS_WIDTH 4
+#define	XG_RX_PKTS_1024_TO_15XX_OCTETS_OFFSET 0x64
+#define	XG_RX_PKTS_1024_TO_15XX_OCTETS_WIDTH 4
+#define	XG_RX_PKTS_15XX_TO_MAX_OCTETS_OFFSET 0x68
+#define	XG_RX_PKTS_15XX_TO_MAX_OCTETS_WIDTH 4
+#define	XG_RX_LENGTH_ERROR_OFFSET 0x6C
+#define	XG_RX_LENGTH_ERROR_WIDTH 4
+
+#define	XG_TX_PKTS_OFFSET 0x80
+#define	XG_TX_PKTS_WIDTH 4
+#define	XG_TX_OCTETS_OFFSET 0x88
+#define	XG_TX_OCTETS_WIDTH 6
+#define	XG_TX_MULTICAST_PKTS_OFFSET 0x90
+#define	XG_TX_MULTICAST_PKTS_WIDTH 4
+#define	XG_TX_BROADCAST_PKTS_OFFSET 0x94
+#define	XG_TX_BROADCAST_PKTS_WIDTH 4
+#define	XG_TX_UNICAST_PKTS_OFFSET 0x98
+#define	XG_TX_UNICAST_PKTS_WIDTH 4
+#define	XG_TX_CONTROL_PKTS_OFFSET 0x9C
+#define	XG_TX_CONTROL_PKTS_WIDTH 4
+#define	XG_TX_PAUSE_PKTS_OFFSET 0xA0
+#define	XG_TX_PAUSE_PKTS_WIDTH 4
+#define	XG_TX_PKTS_64_OCTETS_OFFSET 0xA4
+#define	XG_TX_PKTS_64_OCTETS_WIDTH 4
+#define	XG_TX_PKTS_65_TO_127_OCTETS_OFFSET 0xA8
+#define	XG_TX_PKTS_65_TO_127_OCTETS_WIDTH 4
+#define	XG_TX_PKTS_128_TO_255_OCTETS_OFFSET 0xAC
+#define	XG_TX_PKTS_128_TO_255_OCTETS_WIDTH 4
+#define	XG_TX_PKTS_256_TO_511_OCTETS_OFFSET 0xB0
+#define	XG_TX_PKTS_256_TO_511_OCTETS_WIDTH 4
+#define	XG_TX_PKTS_512_TO_1023_OCTETS_OFFSET 0xB4
+#define	XG_TX_PKTS_512_TO_1023_OCTETS_WIDTH 4
+#define	XG_TX_PKTS_1024_TO_15XX_OCTETS_OFFSET 0xB8
+#define	XG_TX_PKTS_1024_TO_15XX_OCTETS_WIDTH 4
+#define	XG_TX_PKTS_15XX_TO_MAX_OCTETS_OFFSET 0xBC
+#define	XG_TX_PKTS_15XX_TO_MAX_OCTETS_WIDTH 4
+#define	XG_TX_UNDERSIZE_PKTS_OFFSET 0xC0
+#define	XG_TX_UNDERSIZE_PKTS_WIDTH 4
+#define	XG_TX_OVERSIZE_PKTS_OFFSET 0xC4
+#define	XG_TX_OVERSIZE_PKTS_WIDTH 4
+#define	XG_TX_NON_TCP_UDP_PKTS_OFFSET 0xC8
+#define	XG_TX_NON_TCP_UDP_PKTS_WIDTH 2
+#define	XG_TX_MAC_SRC_ERR_PKTS_OFFSET 0xCC
+#define	XG_TX_MAC_SRC_ERR_PKTS_WIDTH 2
+#define	XG_TX_IP_SRC_ERR_PKTS_OFFSET 0xD0
+#define	XG_TX_IP_SRC_ERR_PKTS_WIDTH 2
+
+#define	XG_DMA_DONE_OFFSET 0xD4
+#define	XG_DMA_DONE_WIDTH 4
+
+#define	DMA_IS_DONE 0xffffffff
+
+#define	XG_STAT_OFFSET(_id) XG_ ## _id ## _OFFSET
+#define	XG_STAT_WIDTH(_id) XG_ ## _id ## _WIDTH
+
+#ifdef	__cplusplus
+}
+#endif
+
+#endif	/* _SYS_FALCON_STATS_H */
