1171095Ssam/*-
2171095Ssam * Copyright (c) 2002-2007 Neterion, Inc.
3171095Ssam * All rights reserved.
4171095Ssam *
5171095Ssam * Redistribution and use in source and binary forms, with or without
6171095Ssam * modification, are permitted provided that the following conditions
7171095Ssam * are met:
8171095Ssam * 1. Redistributions of source code must retain the above copyright
9171095Ssam *    notice, this list of conditions and the following disclaimer.
10171095Ssam * 2. Redistributions in binary form must reproduce the above copyright
11171095Ssam *    notice, this list of conditions and the following disclaimer in the
12171095Ssam *    documentation and/or other materials provided with the distribution.
13171095Ssam *
14171095Ssam * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15171095Ssam * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16171095Ssam * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17171095Ssam * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18171095Ssam * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19171095Ssam * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20171095Ssam * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21171095Ssam * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22171095Ssam * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23171095Ssam * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24171095Ssam * SUCH DAMAGE.
25171095Ssam *
26171095Ssam * $FreeBSD$
27171095Ssam */
28171095Ssam
29171095Ssam#ifndef XGE_HAL_MGMTAUX_H
30171095Ssam#define XGE_HAL_MGMTAUX_H
31171095Ssam
32171095Ssam#include <dev/nxge/include/xgehal-mgmt.h>
33171095Ssam
34171095Ssam__EXTERN_BEGIN_DECLS
35171095Ssam
36173139Srwatson#define XGE_HAL_AUX_SEPA        ' '
37171095Ssam
38171095Ssamxge_hal_status_e xge_hal_aux_about_read(xge_hal_device_h devh, int bufsize,
39173139Srwatson	        char *retbuf, int *retsize);
40171095Ssam
41173139Srwatsonxge_hal_status_e xge_hal_aux_stats_tmac_read(xge_hal_device_h devh, int bufsize,
42173139Srwatson	        char *retbuf, int *retsize);
43171095Ssam
44173139Srwatsonxge_hal_status_e xge_hal_aux_stats_rmac_read(xge_hal_device_h devh, int bufsize,
45173139Srwatson	        char *retbuf, int *retsize);
46171095Ssam
47171095Ssamxge_hal_status_e xge_hal_aux_stats_sw_dev_read(xge_hal_device_h devh,
48173139Srwatson	        int bufsize, char *retbuf, int *retsize);
49171095Ssam
50171095Ssamxge_hal_status_e xge_hal_aux_stats_pci_read(xge_hal_device_h devh, int bufsize,
51173139Srwatson	        char *retbuf, int *retsize);
52171095Ssam
53171095Ssamxge_hal_status_e xge_hal_aux_stats_hal_read(xge_hal_device_h devh, int bufsize,
54173139Srwatson	        char *retbuf, int *retsize);
55171095Ssam
56173139Srwatsonxge_hal_status_e xge_hal_aux_bar0_read(xge_hal_device_h devh,
57173139Srwatson	        unsigned int offset, int bufsize, char *retbuf,
58173139Srwatson	        int *retsize);
59171095Ssam
60171095Ssamxge_hal_status_e xge_hal_aux_bar0_write(xge_hal_device_h devh,
61173139Srwatson	        unsigned int offset, u64 value);
62171095Ssam
63171095Ssamxge_hal_status_e xge_hal_aux_bar1_read(xge_hal_device_h devh,
64173139Srwatson	        unsigned int offset, int bufsize, char *retbuf,
65173139Srwatson	        int *retsize);
66171095Ssam
67173139Srwatsonxge_hal_status_e xge_hal_aux_pci_config_read(xge_hal_device_h devh, int bufsize,
68173139Srwatson	        char *retbuf, int *retsize);
69171095Ssam
70171095Ssamxge_hal_status_e xge_hal_aux_stats_herc_enchanced(xge_hal_device_h devh,
71173139Srwatson	        int bufsize, char *retbuf, int *retsize);
72171095Ssam
73171095Ssamxge_hal_status_e xge_hal_aux_channel_read(xge_hal_device_h devh, int bufsize,
74173139Srwatson	        char *retbuf, int *retsize);
75171095Ssam
76171095Ssamxge_hal_status_e xge_hal_aux_device_dump(xge_hal_device_h devh);
77171095Ssam
78171095Ssam
79171095Ssamxge_hal_status_e xge_hal_aux_driver_config_read(int bufsize, char *retbuf,
80173139Srwatson	        int *retsize);
81171095Ssam
82171095Ssamxge_hal_status_e xge_hal_aux_device_config_read(xge_hal_device_h devh,
83173139Srwatson	        int bufsize, char *retbuf, int *retsize);
84171095Ssam
85171095Ssam__EXTERN_END_DECLS
86171095Ssam
87171095Ssam#endif /* XGE_HAL_MGMTAUX_H */
88