xref: /onnv-gate/usr/src/uts/common/sys/ib/adapters/hermon/hermon_fm.h (revision 12965:b65a8427f8fe)
19517SBill.Taylor@Sun.COM /*
29517SBill.Taylor@Sun.COM  * CDDL HEADER START
39517SBill.Taylor@Sun.COM  *
49517SBill.Taylor@Sun.COM  * The contents of this file are subject to the terms of the
59517SBill.Taylor@Sun.COM  * Common Development and Distribution License (the "License").
69517SBill.Taylor@Sun.COM  * You may not use this file except in compliance with the License.
79517SBill.Taylor@Sun.COM  *
89517SBill.Taylor@Sun.COM  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
99517SBill.Taylor@Sun.COM  * or http://www.opensolaris.org/os/licensing.
109517SBill.Taylor@Sun.COM  * See the License for the specific language governing permissions
119517SBill.Taylor@Sun.COM  * and limitations under the License.
129517SBill.Taylor@Sun.COM  *
139517SBill.Taylor@Sun.COM  * When distributing Covered Code, include this CDDL HEADER in each
149517SBill.Taylor@Sun.COM  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
159517SBill.Taylor@Sun.COM  * If applicable, add the following below this CDDL HEADER, with the
169517SBill.Taylor@Sun.COM  * fields enclosed by brackets "[]" replaced with your own identifying
179517SBill.Taylor@Sun.COM  * information: Portions Copyright [yyyy] [name of copyright owner]
189517SBill.Taylor@Sun.COM  *
199517SBill.Taylor@Sun.COM  * CDDL HEADER END
209517SBill.Taylor@Sun.COM  */
219517SBill.Taylor@Sun.COM 
229517SBill.Taylor@Sun.COM /*
23*12965SWilliam.Taylor@Oracle.COM  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
249517SBill.Taylor@Sun.COM  */
259517SBill.Taylor@Sun.COM 
269517SBill.Taylor@Sun.COM #ifndef	_SYS_IB_ADAPTERS_HERMON_FM_H
279517SBill.Taylor@Sun.COM #define	_SYS_IB_ADAPTERS_HERMON_FM_H
289517SBill.Taylor@Sun.COM 
299517SBill.Taylor@Sun.COM /*
309517SBill.Taylor@Sun.COM  * hermon_fm.h
319517SBill.Taylor@Sun.COM  */
329517SBill.Taylor@Sun.COM #include <sys/ddifm.h>
339517SBill.Taylor@Sun.COM #include <sys/fm/protocol.h>
349517SBill.Taylor@Sun.COM #include <sys/fm/util.h>
359517SBill.Taylor@Sun.COM #include <sys/fm/io/ddi.h>
369517SBill.Taylor@Sun.COM 
379517SBill.Taylor@Sun.COM #ifdef __cplusplus
389517SBill.Taylor@Sun.COM extern "C" {
399517SBill.Taylor@Sun.COM #endif
409517SBill.Taylor@Sun.COM 
419517SBill.Taylor@Sun.COM /*
429517SBill.Taylor@Sun.COM  * HCA FMA compile note.
439517SBill.Taylor@Sun.COM  *
449517SBill.Taylor@Sun.COM  * FMA_TEST is used for HCA function tests, and
459517SBill.Taylor@Sun.COM  * the macro can be on by changing Makefile.
469517SBill.Taylor@Sun.COM  *
479517SBill.Taylor@Sun.COM  * in case of DEBUG
489517SBill.Taylor@Sun.COM  * 	FMA_TEST is on
499517SBill.Taylor@Sun.COM  *
509517SBill.Taylor@Sun.COM  * in case of non-DEBUG (DEBUG is off)
519517SBill.Taylor@Sun.COM  * 	FMA_TEST is off
529517SBill.Taylor@Sun.COM  */
539517SBill.Taylor@Sun.COM 
549517SBill.Taylor@Sun.COM /*
559517SBill.Taylor@Sun.COM  * HCA FM common data structure
569517SBill.Taylor@Sun.COM  */
579517SBill.Taylor@Sun.COM 
589517SBill.Taylor@Sun.COM /*
599517SBill.Taylor@Sun.COM  * HCA FM Structure
609517SBill.Taylor@Sun.COM  * This structure is used to catch HCA HW errors.
619517SBill.Taylor@Sun.COM  */
629517SBill.Taylor@Sun.COM struct i_hca_fm {
639517SBill.Taylor@Sun.COM 	uint32_t ref_cnt;	/* the number of instances referring to this */
649517SBill.Taylor@Sun.COM 	kmutex_t lock;		/* protection for last_err & polling thread */
659517SBill.Taylor@Sun.COM 	struct i_hca_acc_handle *hdl;	/* HCA FM acc handle structure */
669517SBill.Taylor@Sun.COM 	struct kmem_cache *fm_acc_cache; /* HCA acc handle cache */
679517SBill.Taylor@Sun.COM 
689517SBill.Taylor@Sun.COM };
699517SBill.Taylor@Sun.COM 
709517SBill.Taylor@Sun.COM /*
719517SBill.Taylor@Sun.COM  * HCA FM acc handle structure
729517SBill.Taylor@Sun.COM  * This structure is holding ddi_acc_handle_t and other members
739517SBill.Taylor@Sun.COM  * to deal with HCA PIO FM.
749517SBill.Taylor@Sun.COM  */
759517SBill.Taylor@Sun.COM struct i_hca_acc_handle {
769517SBill.Taylor@Sun.COM 	struct i_hca_acc_handle *next;	/* next structure */
779517SBill.Taylor@Sun.COM 	ddi_acc_handle_t save_hdl;	/* acc handle */
789517SBill.Taylor@Sun.COM 	kmutex_t lock;			/* mutex lock for thread count */
799517SBill.Taylor@Sun.COM 	uint32_t thread_cnt;		/* number of threads issuing PIOs */
809517SBill.Taylor@Sun.COM };
819517SBill.Taylor@Sun.COM _NOTE(SCHEME_PROTECTS_DATA("safe sharing", i_hca_acc_handle::save_hdl))
829517SBill.Taylor@Sun.COM #define	fm_acc_hdl(hdl)	(((struct i_hca_acc_handle *)(hdl))->save_hdl)
839517SBill.Taylor@Sun.COM #define	FM_POLL_INTERVAL (10000000)	/* 10ms (nano) */
849517SBill.Taylor@Sun.COM 
859517SBill.Taylor@Sun.COM /*
869517SBill.Taylor@Sun.COM  * HCA FM function test structure
879517SBill.Taylor@Sun.COM  * This structure can be used to test the basic fm function test for HCA.
889517SBill.Taylor@Sun.COM  * The test code is included if the FMA_TEST macro is defined.
899517SBill.Taylor@Sun.COM  */
909517SBill.Taylor@Sun.COM struct i_hca_fm_test {
919517SBill.Taylor@Sun.COM 	int num;		/* serial numner */
929517SBill.Taylor@Sun.COM 	int type;		/* PIO or Hermon specific errors */
939517SBill.Taylor@Sun.COM #define	HCA_TEST_PIO	0x1
949517SBill.Taylor@Sun.COM #define	HCA_TEST_IBA	0x2
959517SBill.Taylor@Sun.COM 	int trigger;		/* how to trigger a HW error */
969517SBill.Taylor@Sun.COM #define	HCA_TEST_TRANSIENT		0x0001
979517SBill.Taylor@Sun.COM #define	HCA_TEST_PERSISTENT		0x0002
989517SBill.Taylor@Sun.COM #define	HCA_TEST_ATTACH			0x0010
999517SBill.Taylor@Sun.COM #define	HCA_TEST_START			0x0100
1009517SBill.Taylor@Sun.COM #define	HCA_TEST_END			0x0200
1019517SBill.Taylor@Sun.COM 	void (*pio_injection)(struct i_hca_fm_test *, ddi_fm_error_t *);
1029517SBill.Taylor@Sun.COM 	int errcnt;		/* how many transient error occurs */
1039517SBill.Taylor@Sun.COM 	int line_num;		/* line number in the source code */
1049517SBill.Taylor@Sun.COM 	char *file_name;	/* source filename */
1059517SBill.Taylor@Sun.COM 	char *hash_key;		/* hash table for test items */
1069517SBill.Taylor@Sun.COM 	void *private;		/* private data */
1079517SBill.Taylor@Sun.COM };
1089517SBill.Taylor@Sun.COM 
1099517SBill.Taylor@Sun.COM /*
1109517SBill.Taylor@Sun.COM  * Hermon FM data structure
1119517SBill.Taylor@Sun.COM  */
1129517SBill.Taylor@Sun.COM typedef struct i_hca_fm hermon_hca_fm_t;
1139517SBill.Taylor@Sun.COM typedef struct i_hca_acc_handle hermon_acc_handle_t;
1149517SBill.Taylor@Sun.COM typedef struct i_hca_fm_test hermon_test_t;
1159517SBill.Taylor@Sun.COM 
1169517SBill.Taylor@Sun.COM /*
1179517SBill.Taylor@Sun.COM  * The following defines are to supplement device error reporting.
1189517SBill.Taylor@Sun.COM  * At each place where the planned FMA error matrix specifies that
1199517SBill.Taylor@Sun.COM  * an ereport will be generated, for now there is a HERMON_FMANOTE()
1209517SBill.Taylor@Sun.COM  * call generating an appropriate message string.
121*12965SWilliam.Taylor@Oracle.COM  *
122*12965SWilliam.Taylor@Oracle.COM  * This has been revised since it has been realized that FMA is only
123*12965SWilliam.Taylor@Oracle.COM  * to be used for hardware errors.  HERMON_FMANOTE() is used to report
124*12965SWilliam.Taylor@Oracle.COM  * errors that are likely to be hardware, but possibly are not.
1259517SBill.Taylor@Sun.COM  */
1269517SBill.Taylor@Sun.COM #define	HERMON_FMANOTE(state, string)					\
127*12965SWilliam.Taylor@Oracle.COM 	cmn_err(CE_WARN, "hermon%d: Device Error: %s",			\
1289517SBill.Taylor@Sun.COM 		(state)->hs_instance, string)
1299517SBill.Taylor@Sun.COM 
1309517SBill.Taylor@Sun.COM /* CQE Syndrome errors - see hermon_cq.c */
1319517SBill.Taylor@Sun.COM 
1329517SBill.Taylor@Sun.COM #define	HERMON_FMA_LOCLEN 	"CQE local length error"
1339517SBill.Taylor@Sun.COM #define	HERMON_FMA_LOCQPOP	"CQE local qp operation error"
1349517SBill.Taylor@Sun.COM #define	HERMON_FMA_LOCPROT	"CQE local protection error"
1359517SBill.Taylor@Sun.COM #define	HERMON_FMA_WQFLUSH	"CQE wqe flushed in error"
1369517SBill.Taylor@Sun.COM #define	HERMON_FMA_MWBIND	"CQE memory window bind error"
1379517SBill.Taylor@Sun.COM #define	HERMON_FMA_RESP		"CQE bad response"
1389517SBill.Taylor@Sun.COM #define	HERMON_FMA_LOCACC	"CQE local access error"
1399517SBill.Taylor@Sun.COM #define	HERMON_FMA_REMREQ	"CQE remote invalid request error"
1409517SBill.Taylor@Sun.COM #define	HERMON_FMA_REMACC	"CQE remote access error"
1419517SBill.Taylor@Sun.COM #define	HERMON_FMA_REMOP	"CQE remote operation error"
1429517SBill.Taylor@Sun.COM #define	HERMON_FMA_XPORTCNT	"CQE transport retry counter exceeded"
1439517SBill.Taylor@Sun.COM #define	HERMON_FMA_RNRCNT	"CQE RNR retry counter exceeded"
1449517SBill.Taylor@Sun.COM #define	HERMON_FMA_REMABRT	"CQE remote aborted error"
1459517SBill.Taylor@Sun.COM #define	HERMON_FMA_UNKN		"CQE unknown/reserved error returned"
1469517SBill.Taylor@Sun.COM 
1479517SBill.Taylor@Sun.COM /* event errors - see hermon_event.c */
1489517SBill.Taylor@Sun.COM #define	HERMON_FMA_OVERRUN	"EQE cq overrun or protection error"
1499517SBill.Taylor@Sun.COM #define	HERMON_FMA_LOCCAT	"EQE local work queue catastrophic error"
1509517SBill.Taylor@Sun.COM #define	HERMON_FMA_QPCAT	"EQE local queue pair catastrophic error"
1519517SBill.Taylor@Sun.COM #define	HERMON_FMA_PATHMIG	"EQE path migration failed"
1529517SBill.Taylor@Sun.COM #define	HERMON_FMA_LOCINV	"EQE invalid request - local work queue"
1539517SBill.Taylor@Sun.COM #define	HERMON_FMA_LOCACEQ	"EQE local access violation"
1549517SBill.Taylor@Sun.COM #define	HERMON_FMA_SRQCAT	"EQE shared received queue catastrophic"
1559517SBill.Taylor@Sun.COM #define	HERMON_FMA_INTERNAL	"EQE hca internal error"
1569517SBill.Taylor@Sun.COM 
1579517SBill.Taylor@Sun.COM /* HCR device failure returns - see hermon_cmd.c */
1589517SBill.Taylor@Sun.COM #define	HERMON_FMA_HCRINT	"HCR internal error processing command"
1599517SBill.Taylor@Sun.COM #define	HERMON_FMA_NVMEM	"HCR NVRAM checksum/CRC failure"
1609517SBill.Taylor@Sun.COM #define	HERMON_FMA_TOTOG	"HCR Timeout waiting for command toggle"
1619517SBill.Taylor@Sun.COM #define	HERMON_FMA_GOBIT	"HCR Timeout waiting for command go bit"
1629517SBill.Taylor@Sun.COM #define	HERMON_FMA_RSRC		"HCR Command insufficient resources"
1639517SBill.Taylor@Sun.COM #define	HERMON_FMA_CMDINV	"HCR Command invalid status returned"
1649517SBill.Taylor@Sun.COM 
1659517SBill.Taylor@Sun.COM /* HCA initialization errors - see hermon.c */
1669517SBill.Taylor@Sun.COM #define	HERMON_FMA_FWVER	"HCA firmware not at minimum version"
1679517SBill.Taylor@Sun.COM #define	HERMON_FMA_PCIID	"HCA PCIe devid not supported"
1689517SBill.Taylor@Sun.COM #define	HERMON_FMA_MAINT	"HCA device set to memory controller mode"
1699517SBill.Taylor@Sun.COM #define	HERMON_FMA_BADNVMEM	"HCR bad NVMEM error"
1709517SBill.Taylor@Sun.COM 
1719517SBill.Taylor@Sun.COM /*
1729517SBill.Taylor@Sun.COM  * HCA FM constants
1739517SBill.Taylor@Sun.COM  */
1749517SBill.Taylor@Sun.COM 
1759517SBill.Taylor@Sun.COM /* HCA FM state */
1769517SBill.Taylor@Sun.COM #define	HCA_NO_FM		0x0000	/* HCA FM is not supported */
1779517SBill.Taylor@Sun.COM /* HCA FM state flags */
1789517SBill.Taylor@Sun.COM #define	HCA_PIO_FM		0x0001	/* PIO is fma-protected */
1799517SBill.Taylor@Sun.COM #define	HCA_DMA_FM		0x0002	/* DMA is fma-protected */
1809517SBill.Taylor@Sun.COM #define	HCA_EREPORT_FM		0x0004	/* FMA ereport is available */
1819517SBill.Taylor@Sun.COM #define	HCA_ERRCB_FM		0x0010	/* FMA error callback is supported */
1829517SBill.Taylor@Sun.COM 
1839517SBill.Taylor@Sun.COM #define	HCA_ATTCH_FM		0x0100	/* HCA FM attach mode */
1849517SBill.Taylor@Sun.COM #define	HCA_RUNTM_FM		0x0200	/* HCA FM runtime mode */
1859517SBill.Taylor@Sun.COM 
1869517SBill.Taylor@Sun.COM /* HCA ererport type */
1879517SBill.Taylor@Sun.COM #define	HCA_SYS_ERR		0x001	/* HW error reported by Solaris FMA */
1889517SBill.Taylor@Sun.COM #define	HCA_IBA_ERR		0x002	/* IB specific HW error */
1899517SBill.Taylor@Sun.COM 
1909517SBill.Taylor@Sun.COM /* HCA ereport detail */
1919517SBill.Taylor@Sun.COM #define	HCA_ERR_TRANSIENT	0x010	/* HCA temporary error */
1929517SBill.Taylor@Sun.COM #define	HCA_ERR_NON_FATAL	0x020	/* HCA persistent error */
1939517SBill.Taylor@Sun.COM #define	HCA_ERR_SRV_LOST	0x040	/* HCA attach failure */
1949517SBill.Taylor@Sun.COM #define	HCA_ERR_DEGRADED	0x080	/* HCA maintenance mode */
1959517SBill.Taylor@Sun.COM #define	HCA_ERR_FATAL		0x100	/* HCA critical situation */
1969517SBill.Taylor@Sun.COM #define	HCA_ERR_IOCTL		0x200	/* EIO */
1979517SBill.Taylor@Sun.COM 
1989517SBill.Taylor@Sun.COM /* Ignore HCA HW error check */
1999517SBill.Taylor@Sun.COM #define	HCA_SKIP_HW_CHK		(-1)
2009517SBill.Taylor@Sun.COM 
2019517SBill.Taylor@Sun.COM /* HCA FM pio retry operation state */
2029517SBill.Taylor@Sun.COM #define	HCA_PIO_OK		(0)	/* No HW errors */
2039517SBill.Taylor@Sun.COM #define	HCA_PIO_TRANSIENT	(1)	/* transient error */
2049517SBill.Taylor@Sun.COM #define	HCA_PIO_PERSISTENT	(2)	/* persistent error */
2059517SBill.Taylor@Sun.COM #define	HCA_PIO_RETRY_CNT	(3)
2069517SBill.Taylor@Sun.COM 
20710125SEiji.Ota@Sun.COM /* HCA firmware faults */
20810125SEiji.Ota@Sun.COM #define	HCA_FW_MISC		0x1	/* firmware misc faults */
20910125SEiji.Ota@Sun.COM #define	HCA_FW_CORRUPT		0x2	/* firmware corruption */
21010125SEiji.Ota@Sun.COM #define	HCA_FW_MISMATCH		0x3	/* firmware version mismatch */
21110125SEiji.Ota@Sun.COM 
2129517SBill.Taylor@Sun.COM /*
2139517SBill.Taylor@Sun.COM  * Hermon FM macros
2149517SBill.Taylor@Sun.COM  */
2159517SBill.Taylor@Sun.COM 
2169517SBill.Taylor@Sun.COM #ifdef FMA_TEST
2179517SBill.Taylor@Sun.COM #define	TEST_DECLARE(tst)		hermon_test_t *tst;
2189517SBill.Taylor@Sun.COM #define	REGISTER_PIO_TEST(st, tst)					\
2199517SBill.Taylor@Sun.COM     tst = hermon_test_register(st, __FILE__, __LINE__, HCA_TEST_PIO)
2209517SBill.Taylor@Sun.COM #define	PIO_START(st, hdl, tst)		hermon_PIO_start(st, hdl, tst)
2219517SBill.Taylor@Sun.COM #define	PIO_END(st, hdl, cnt, tst)	hermon_PIO_end(st, hdl, &cnt, tst)
2229517SBill.Taylor@Sun.COM #else
2239517SBill.Taylor@Sun.COM #define	TEST_DECLARE(tst)
2249517SBill.Taylor@Sun.COM #define	REGISTER_PIO_TEST(st, tst)
2259517SBill.Taylor@Sun.COM #define	PIO_START(st, hdl, tst)		hermon_PIO_start(st, hdl, NULL)
2269517SBill.Taylor@Sun.COM #define	PIO_END(st, hdl, cnt, tst)	hermon_PIO_end(st, hdl, &cnt, NULL)
2279517SBill.Taylor@Sun.COM #endif /* FMA_TEST */
2289517SBill.Taylor@Sun.COM 
2299517SBill.Taylor@Sun.COM /*
2309517SBill.Taylor@Sun.COM  * hermon_pio_init() is a macro initializing variables.
2319517SBill.Taylor@Sun.COM  */
2329517SBill.Taylor@Sun.COM #define	hermon_pio_init(cnt, status, tst)				\
2339517SBill.Taylor@Sun.COM 	TEST_DECLARE(tst)						\
2349517SBill.Taylor@Sun.COM 	int	status = HCA_PIO_OK;					\
2359517SBill.Taylor@Sun.COM 	int	cnt = HCA_PIO_RETRY_CNT
2369517SBill.Taylor@Sun.COM 
2379517SBill.Taylor@Sun.COM /*
2389517SBill.Taylor@Sun.COM  * hermon_pio_start() is one of a pair of macros checking HW errors
2399517SBill.Taylor@Sun.COM  * at PIO requests, which should be called before the requests are issued.
2409517SBill.Taylor@Sun.COM  */
2419517SBill.Taylor@Sun.COM #define	hermon_pio_start(st, hdl, label, cnt, status, tst)		\
2429517SBill.Taylor@Sun.COM 	if (st->hs_fm_state & HCA_PIO_FM) {				\
2439517SBill.Taylor@Sun.COM 		if (st->hs_fm_async_fatal) {				\
2449517SBill.Taylor@Sun.COM 			hermon_fm_ereport(st, HCA_SYS_ERR,		\
2459517SBill.Taylor@Sun.COM 			    HCA_ERR_NON_FATAL);				\
2469517SBill.Taylor@Sun.COM 			goto label;					\
2479517SBill.Taylor@Sun.COM 		} else {						\
2489517SBill.Taylor@Sun.COM 			REGISTER_PIO_TEST(st, tst);			\
2499517SBill.Taylor@Sun.COM 			cnt = HCA_PIO_RETRY_CNT;			\
2509517SBill.Taylor@Sun.COM 			if (PIO_START(st, hdl, tst) ==			\
2519517SBill.Taylor@Sun.COM 			    HCA_PIO_PERSISTENT) {			\
2529517SBill.Taylor@Sun.COM 				goto label;				\
2539517SBill.Taylor@Sun.COM 			}						\
2549517SBill.Taylor@Sun.COM 		}							\
2559517SBill.Taylor@Sun.COM 	} else {							\
2569517SBill.Taylor@Sun.COM 		status = HCA_SKIP_HW_CHK;				\
2579517SBill.Taylor@Sun.COM 	}								\
2589517SBill.Taylor@Sun.COM 	do {
2599517SBill.Taylor@Sun.COM 
2609517SBill.Taylor@Sun.COM /*
2619517SBill.Taylor@Sun.COM  * hermon_pio_end() is the other of a pair of macros checking HW errors
2629517SBill.Taylor@Sun.COM  * at PIO requests, which should be called after the requests end.
2639517SBill.Taylor@Sun.COM  * If a HW error is detected and can be isolated well, these macros
2649517SBill.Taylor@Sun.COM  * retry the operation to determine if the error is persistent or not.
2659517SBill.Taylor@Sun.COM  */
2669517SBill.Taylor@Sun.COM #define	hermon_pio_end(st, hdl, label, cnt, status, tst)		\
2679517SBill.Taylor@Sun.COM 	if (status != HCA_SKIP_HW_CHK) {				\
2689517SBill.Taylor@Sun.COM 		if (st->hs_fm_async_fatal) {				\
2699517SBill.Taylor@Sun.COM 			hermon_fm_ereport(st, HCA_SYS_ERR,		\
2709517SBill.Taylor@Sun.COM 			    HCA_ERR_NON_FATAL);				\
2719517SBill.Taylor@Sun.COM 			goto label;					\
2729517SBill.Taylor@Sun.COM 		}							\
2739517SBill.Taylor@Sun.COM 		if ((status = PIO_END(st, hdl, cnt, tst)) ==		\
2749517SBill.Taylor@Sun.COM 		    HCA_PIO_PERSISTENT) {				\
2759517SBill.Taylor@Sun.COM 			goto label;					\
2769517SBill.Taylor@Sun.COM 		} else if (status == HCA_PIO_TRANSIENT) {		\
2779517SBill.Taylor@Sun.COM 			hermon_fm_ereport(st, HCA_SYS_ERR,		\
2789517SBill.Taylor@Sun.COM 			    HCA_ERR_TRANSIENT);				\
2799517SBill.Taylor@Sun.COM 		}							\
2809517SBill.Taylor@Sun.COM 	}								\
2819517SBill.Taylor@Sun.COM 	} while (status == HCA_PIO_TRANSIENT)
2829517SBill.Taylor@Sun.COM 
2839517SBill.Taylor@Sun.COM extern void hermon_fm_init(hermon_state_t *);
2849517SBill.Taylor@Sun.COM extern void hermon_fm_fini(hermon_state_t *);
2859517SBill.Taylor@Sun.COM extern int hermon_fm_ereport_init(hermon_state_t *);
2869517SBill.Taylor@Sun.COM extern void hermon_fm_ereport_fini(hermon_state_t *);
2879517SBill.Taylor@Sun.COM extern int hermon_get_state(hermon_state_t *);
2889517SBill.Taylor@Sun.COM extern boolean_t hermon_init_failure(hermon_state_t *);
2899517SBill.Taylor@Sun.COM extern boolean_t hermon_cmd_retry_ok(hermon_cmd_post_t *, int);
2909517SBill.Taylor@Sun.COM extern void hermon_fm_ereport(hermon_state_t *, int, int);
2919517SBill.Taylor@Sun.COM extern int hermon_regs_map_setup(hermon_state_t *, uint_t, caddr_t *, offset_t,
2929517SBill.Taylor@Sun.COM     offset_t, ddi_device_acc_attr_t *, ddi_acc_handle_t *);
2939517SBill.Taylor@Sun.COM extern void hermon_regs_map_free(hermon_state_t *, ddi_acc_handle_t *);
2949517SBill.Taylor@Sun.COM extern int hermon_pci_config_setup(hermon_state_t *, ddi_acc_handle_t *);
2959517SBill.Taylor@Sun.COM extern void hermon_pci_config_teardown(hermon_state_t *, ddi_acc_handle_t *);
2969517SBill.Taylor@Sun.COM extern ushort_t hermon_devacc_attr_version(hermon_state_t *);
2979517SBill.Taylor@Sun.COM extern uchar_t hermon_devacc_attr_access(hermon_state_t *);
2989517SBill.Taylor@Sun.COM extern int hermon_PIO_start(hermon_state_t *, ddi_acc_handle_t,
2999517SBill.Taylor@Sun.COM     hermon_test_t *);
3009517SBill.Taylor@Sun.COM extern int hermon_PIO_end(hermon_state_t *, ddi_acc_handle_t, int *,
3019517SBill.Taylor@Sun.COM     hermon_test_t *);
3029517SBill.Taylor@Sun.COM extern ddi_acc_handle_t hermon_rsrc_alloc_uarhdl(hermon_state_t *);
3039517SBill.Taylor@Sun.COM extern ddi_acc_handle_t hermon_get_uarhdl(hermon_state_t *);
3049517SBill.Taylor@Sun.COM extern ddi_acc_handle_t hermon_get_cmdhdl(hermon_state_t *);
3059517SBill.Taylor@Sun.COM extern ddi_acc_handle_t hermon_get_msix_tblhdl(hermon_state_t *);
3069517SBill.Taylor@Sun.COM extern ddi_acc_handle_t hermon_get_msix_pbahdl(hermon_state_t *);
3079517SBill.Taylor@Sun.COM extern ddi_acc_handle_t hermon_get_pcihdl(hermon_state_t *);
3089517SBill.Taylor@Sun.COM extern void hermon_clr_state_nolock(hermon_state_t *, int);
3099517SBill.Taylor@Sun.COM extern void hermon_inter_err_chk(void *);
3109517SBill.Taylor@Sun.COM 
3119517SBill.Taylor@Sun.COM #ifdef FMA_TEST
3129517SBill.Taylor@Sun.COM extern hermon_test_t *hermon_test_register(hermon_state_t *, char *, int, int);
3139517SBill.Taylor@Sun.COM extern void hermon_test_deregister(void);
3149517SBill.Taylor@Sun.COM extern int hermon_test_num;
3159517SBill.Taylor@Sun.COM #endif /* FMA_TEST */
3169517SBill.Taylor@Sun.COM 
3179517SBill.Taylor@Sun.COM #ifdef __cplusplus
3189517SBill.Taylor@Sun.COM }
3199517SBill.Taylor@Sun.COM #endif
3209517SBill.Taylor@Sun.COM 
3219517SBill.Taylor@Sun.COM #endif	/* _SYS_IB_ADAPTERS_HERMON_FM_H */
322