- supported.conf: Added sparse_keymap (eeepc_laptop depends on it)
[linux-flexiantxendom0-3.2.10.git] / drivers / net / sfc / sfc_resource / ci / efrm / driver_private.h
1 /****************************************************************************
2  * Driver for Solarflare network controllers -
3  *          resource management for Xen backend, OpenOnload, etc
4  *           (including support for SFE4001 10GBT NIC)
5  *
6  * This file provides private API of efrm library to be used from the SFC
7  * resource driver.
8  *
9  * Copyright 2005-2007: Solarflare Communications Inc,
10  *                      9501 Jeronimo Road, Suite 250,
11  *                      Irvine, CA 92618, USA
12  *
13  * Developed and maintained by Solarflare Communications:
14  *                      <linux-xen-drivers@solarflare.com>
15  *                      <onload-dev@solarflare.com>
16  *
17  * Certain parts of the driver were implemented by
18  *          Alexandra Kossovsky <Alexandra.Kossovsky@oktetlabs.ru>
19  *          OKTET Labs Ltd, Russia,
20  *          http://oktetlabs.ru, <info@oktetlabs.ru>
21  *          by request of Solarflare Communications
22  *
23  *
24  * This program is free software; you can redistribute it and/or modify it
25  * under the terms of the GNU General Public License version 2 as published
26  * by the Free Software Foundation, incorporated herein by reference.
27  *
28  * This program is distributed in the hope that it will be useful,
29  * but WITHOUT ANY WARRANTY; without even the implied warranty of
30  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
31  * GNU General Public License for more details.
32  *
33  * You should have received a copy of the GNU General Public License
34  * along with this program; if not, write to the Free Software
35  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
36  ****************************************************************************
37  */
38
39 #ifndef __CI_EFRM_DRIVER_PRIVATE_H__
40 #define __CI_EFRM_DRIVER_PRIVATE_H__
41
42 #include <ci/efrm/resource.h>
43 #include <ci/efrm/sysdep.h>
44
45 /*--------------------------------------------------------------------
46  *
47  * global variables
48  *
49  *--------------------------------------------------------------------*/
50
51 /* Internal structure for resource driver */
52 extern struct efrm_resource_manager *efrm_rm_table[];
53
54 /*--------------------------------------------------------------------
55  *
56  * efrm_nic_table handling
57  *
58  *--------------------------------------------------------------------*/
59
60 struct efrm_nic;
61
62 extern void efrm_driver_ctor(void);
63 extern void efrm_driver_dtor(void);
64 extern int efrm_driver_register_nic(struct efrm_nic *, int nic_index,
65                                     int ifindex);
66 extern int efrm_driver_unregister_nic(struct efrm_nic *);
67
68 /*--------------------------------------------------------------------
69  *
70  * create/destroy resource managers
71  *
72  *--------------------------------------------------------------------*/
73
74 struct vi_resource_dimensions {
75         unsigned evq_int_min, evq_int_lim;
76         unsigned evq_timer_min, evq_timer_lim;
77         unsigned rxq_min, rxq_lim;
78         unsigned txq_min, txq_lim;
79 };
80
81 /*! Initialise resources */
82 extern int
83 efrm_resources_init(const struct vi_resource_dimensions *,
84                     int buffer_table_min, int buffer_table_lim);
85
86 /*! Tear down resources */
87 extern void efrm_resources_fini(void);
88
89 #endif /* __CI_EFRM_DRIVER_PRIVATE_H__ */