--- /dev/null	2013-08-22 18:59:26.000000000 -0400
+++ new/usr/src/uts/common/io/sfxge/sft9001_impl.h	2013-08-22 18:59:26.757518474 -0400
@@ -0,0 +1,236 @@
+/*-
+ * 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_SFT9001_IMPL_H
+#define	_SYS_SFT9001_IMPL_H
+
+#ifdef	__cplusplus
+extern "C" {
+#endif
+
+#if EFSYS_OPT_PHY_SFT9001
+
+#define	SFT9001_MMD_MASK						\
+	    ((1 << PMA_PMD_MMD) |					\
+	    (1 << PCS_MMD) |						\
+	    (1 << PHY_XS_MMD) |						\
+	    (1 << AN_MMD) |						\
+	    (1 << CL22EXT_MMD))
+
+#define	PMA_PMD_PWR_BACKOFF_REG 0x83
+#define	LP_TX_PWR_BACKOFF_LBN 13
+#define	LP_TX_PWR_BACKOFF_WIDTH 3
+#define	TX_PWR_BACKOFF_LBN 10
+#define	TX_PWR_BACKOFF_WIDTH 3
+#define	SHORT_REACH_LBN 0
+#define	SHORT_REACH_WIDTH 1
+
+#define	PMA_PMD_XCONTROL_REG 0xc000
+#define	SSR_LBN 15
+#define	SSR_WIDTH 1
+#define	ROBUST_LBN 14
+#define	ROBUST_WIDTH 1
+#define	CLK312_OUT_SEL_LBN 8
+#define	CLK312_OUT_SEL_WIDTH 1
+#define	SEL_312MHZ_DECODE 1
+#define	SEL_156MHZ_DECODE 0
+#define	TEST_CLKOUT_SEL_LBN 4
+#define	TEST_CLKOUT_SEL_WIDTH 4
+#define	SEL_125MHZ_DECODE 5
+#define	TEST_CLKOUT_EN_LBN 3
+#define	TEST_CLKOUT_EN_WIDTH 1
+#define	CLK312_OUT_EN_LBN 2
+#define	CLK312_OUT_EN_WIDTH 1
+#define	GMII_EN_LBN 1
+#define	GMII_EN_WIDTH 1
+
+#define	PMA_PMD_LED_CONTROL_REG 0xc007
+#define	LED_ACTIVITY_EN_LBN 3
+#define	LED_ACTIVITY_EN_WIDTH 1
+#define	LED_FLASH_PERIOD_LBN 1
+#define	LED_FLASH_PERIOD_WIDTH 2
+
+#define	PMA_PMD_LED_OVERRIDE_REG 0xc009
+#define	LED_TMODE_LBN 14
+#define	LED_TMODE_WIDTH 2
+#define	LED_SPARE_LBN 12
+#define	LED_SPARE_WIDTH 2
+#define	LED_MS_LBN 10
+#define	LED_MS_WIDTH 2
+#define	LED_RX_LBN 8
+#define	LED_RX_WIDTH 2
+#define	LED_TX_LBN 6
+#define	LED_TX_WIDTH 2
+#define	LED_SPEED1_LBN 4
+#define	LED_SPEED1_WIDTH 2
+#define	LED_SPEED0_LBN 2
+#define	LED_SPEED0_WIDTH 2
+#define	LED_LINK_LBN 0
+#define	LED_LINK_WIDTH 2
+#define	LED_NORMAL_DECODE 0
+#define	LED_ON_DECODE 1
+#define	LED_OFF_DECODE 2
+#define	LED_FLASH_DECODE 3
+
+#define	PMA_PMD_DIAG_RESULT_REG 0xc016
+#define	PAIR_A_CODE_LBN 12
+#define	PAIR_A_CODE_WIDTH 4
+#define	PAIR_B_CODE_LBN 8
+#define	PAIR_B_CODE_WIDTH 4
+#define	PAIR_C_CODE_LBN 4
+#define	PAIR_C_CODE_WIDTH 4
+#define	PAIR_D_CODE_LBN 0
+#define	PAIR_D_CODE_WIDTH 4
+#define	PAIR_BUSY_DECODE 0x9
+#define	INTER_PAIR_SHORT_DECODE 0x4
+#define	INTRA_PAIR_SHORT_DECODE 0x3
+#define	PAIR_OPEN_DECODE 0x2
+#define	PAIR_OK_DECODE 0x1
+
+#define	PMA_PMD_DIAG_A_LENGTH_REG 0xc017
+#define	PMA_PMD_DIAG_B_LENGTH_REG 0xc018
+#define	PMA_PMD_DIAG_C_LENGTH_REG 0xc019
+#define	PMA_PMD_DIAG_D_LENGTH_REG 0xc01a
+
+#define	PMA_PMD_FW_REV0_REG 0xc026
+#define	PMA_PMD_FW_REV1_REG 0xc027
+
+#define	PMA_PMD_SPEED_REG 0xc028
+#define	SPEED_RES_LBN 4
+#define	SPEED_RES_WIDTH 4
+#define	SPEED_10BASE_T_DECODE 1
+#define	SPEED_100BASE_TX_DECODE 2
+#define	SPEED_1000BASE_T_DECODE 3
+#define	SPEED_10GBASE_T_DECODE 4
+
+#define	PMA_PMD_DIAG_CONTROL_REG 0xc03d
+#define	RUN_DIAG_IMMED_LBN 15
+#define	RUN_DIAG_IMMED_WIDTH 1
+#define	RUN_DIAG_AUTO_LBN 14
+#define	RUN_DIAG_AUTO_WIDTH 1
+#define	INTER_PAIR_CHECK_DIS_LBN 13
+#define	INTER_PAIR_CHECK_DIS_WIDTH 1
+#define	BREAK_LINK_LBN 12
+#define	BREAK_LINK_WIDTH 1
+#define	DIAG_RUNNING_LBN 11
+#define	DIAG_RUNNING_WIDTH 1
+#define	LENGTH_UNIT_LBN 10
+#define	LENGTH_UNIT_WIDTH 1
+#define	LENGTH_M_DECODE 1
+#define	LENGTH_CM_DECODE 0
+
+#define	PCS_BOOT_STATUS_REG 0xd000
+#define	RESET_CAUSE_LBN 8
+#define	RESET_CAUSE_WIDTH 2
+#define	HW_RESET_DECODE 0x0
+#define	SW_RESET_DECODE 0x1
+#define	WD_RESET_DECODE 0x2
+#define	SW_WD_RESET_DECODE 0x3
+#define	UPLOAD_PROGRESS_LBN 7
+#define	UPLOAD_PROGRESS_WIDTH 1
+#define	CODE_DOWNLOAD_LBN 6
+#define	CODE_DOWNLOAD_WIDTH 1
+#define	CKSUM_OK_LBN 5
+#define	CKSUM_OK_WIDTH 1
+#define	CODE_STARTED_LBN 4
+#define	CODE_STARTED_WIDTH 1
+#define	BOOT_STATUS_LBN 3
+#define	BOOT_STATUS_WIDTH 1
+#define	BOOT_PROGRESS_LBN 1
+#define	BOOT_PROGRESS_WIDTH 2
+#define	INIT_DECODE 0x0
+#define	MDIO_WAIT_DECODE 0x1
+#define	CKSUM_START_DECODE 0x2
+#define	APP_JMP_DECODE 0x3
+#define	FATAL_ERR_LBN 0
+#define	FATAL_ERR_WIDTH 1
+
+#define	PCS_LM_RAM_LS_ADDR_REG 0xd004
+#define	LM_RAM_LS_ADDR_LBN 0
+#define	LM_RAM_LS_ADDR_WIDTH 16
+
+#define	PCS_LM_RAM_MS_ADDR_REG 0xd005
+#define	LM_RAM_MS_ADDR_LBN 0
+#define	LM_RAM_MS_ADDR_WIDTH 3
+#define	BYTE_ACCESS_LBN 15
+#define	BYTE_ACCESS_WIDTH 1
+
+#define	PCS_LM_RAM_DATA_REG 0xd006
+#define	LM_RAM_DATA_LBN 0
+#define	LM_RAM_DATA_WIDTH 16
+
+#define	PHY_XS_TEST1_REG 0xc00a
+#define	PHY_XS_NE_LOOPBACK_LBN 8
+#define	PHY_XS_NE_LOOPBACK_WIDTH 1
+
+#define	CL22EXT_CONTROL_REG 0xc000
+#define	CL22EXT_NE_LOOPBACK_LBN 14
+#define	CL22EXT_NE_LOOPBACK_WIDTH 1
+
+#define	CL22EXT_STATUS_REG 0xc001
+#define	CL22EXT_LINK_UP_LBN 2
+#define	CL22EXT_LINK_UP_WIDTH 1
+#define	CL22EXT_JABBER_LBN 1
+#define	CL22EXT_JABBER_WIDTH 1
+
+#define	CL22EXT_MS_CONTROL_REG 0xc009
+#define	CL22EXT_1000BASE_T_ADV_LBN 8
+#define	CL22EXT_1000BASE_T_ADV_WIDTH 1
+#define	CL22EXT_1000BASE_T_FDX_ADV_LBN 9
+#define	CL22EXT_1000BASE_T_FDX_ADV_WIDTH 1
+
+#define	CL22EXT_MS_STATUS_REG 0xc00a
+#define	CL22EXT_1000BASE_T_LP_LBN 10
+#define	CL22EXT_1000BASE_T_LP_WIDTH 1
+#define	CL22EXT_1000BASE_T_FDX_LP_LBN 11
+#define	CL22EXT_1000BASE_T_FDX_LP_WIDTH 1
+
+#define	LOADER_MMD 1
+#define	LOADER_MAX_BUFF_SZ_REG 49192
+#define	LOADER_ACTUAL_BUFF_SZ_REG 49193
+#define	LOADER_CMD_RESPONSE_REG 49194
+#define	LOADER_CMD_ERASE_FLASH 0x0001
+#define	LOADER_CMD_FILL_BUFFER 0x0002
+#define	LOADER_CMD_PROGRAM_FLASH 0x0003
+#define	LOADER_CMD_READ_FLASH 0x0004
+#define	LOADER_RESPONSE_OK 0x0100
+#define	LOADER_RESPONSE_ERROR 0x0200
+#define	LOADER_RESPONSE_BUSY 0x0300
+#define	LOADER_WORDS_WRITTEN_REG 49195
+#define	LOADER_WORDS_READ_REG 49195
+#define	LOADER_FLASH_ADDR_LOW_REG 49196
+#define	LOADER_FLASH_ADDR_HI_REG  49197
+#define	LOADER_DATA_REG 49198
+
+#define	FIRMWARE_BLOCK_SIZE 0x4000
+#define	FIRMWARE_MAX_SIZE 0x30000
+
+#endif	/* EFSYS_OPT_PHY_SFT9001 */
+
+#ifdef	__cplusplus
+}
+#endif
+
+#endif	/* _SYS_SFT9001_IMPL_H */
