ia64/linux-2.6.18-xen.hg

view drivers/net/sfc/sfc_resource/ci/efhw/eventq.h @ 847:ad4d307bf9ce

net sfc: Update sfc and sfc_resource driver to latest release

...and update sfc_netfront, sfc_netback, sfc_netutil for any API changes

sfc_netback: Fix asymmetric use of SFC buffer table alloc and free
sfc_netback: Clean up if no SFC accel device found
sfc_netback: Gracefully handle case where page grant fails
sfc_netback: Disable net acceleration if the physical link goes down
sfc_netfront: Less verbose error messages, more verbose counters for
rx discard errors
sfc_netfront: Gracefully handle case where SFC netfront fails during
initialisation

Signed-off-by: Kieran Mansley <kmansley@solarflare.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Mar 31 11:59:10 2009 +0100 (2009-03-31)
parents e4dd072db259
children
line source
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 contains API provided by efhw/eventq.c file. This file is not
7 * designed for use outside of the SFC 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 */
39 #ifndef __CI_EFHW_EVENTQ_H__
40 #define __CI_EFHW_EVENTQ_H__
42 #include <ci/efhw/efhw_types.h>
43 #include <ci/efhw/eventq_macros.h>
45 /*! Poll the event queue. */
46 extern int efhw_keventq_poll(struct efhw_nic *, struct efhw_keventq *);
48 /*! Callbacks for handling events. */
49 struct efhw_ev_handler {
50 void (*wakeup_fn)(struct efhw_nic *nic, unsigned);
51 void (*timeout_fn)(struct efhw_nic *nic, unsigned);
52 void (*dmaq_flushed_fn) (struct efhw_nic *, unsigned, int);
53 };
55 extern int efhw_keventq_ctor(struct efhw_nic *, int instance,
56 struct efhw_keventq *, struct efhw_ev_handler *);
57 extern void efhw_keventq_dtor(struct efhw_nic *, struct efhw_keventq *);
59 extern void efhw_handle_txdmaq_flushed(struct efhw_nic *,
60 struct efhw_ev_handler *,
61 efhw_event_t *);
62 extern void efhw_handle_rxdmaq_flushed(struct efhw_nic *,
63 struct efhw_ev_handler *,
64 efhw_event_t *);
65 extern void efhw_handle_wakeup_event(struct efhw_nic *,
66 struct efhw_ev_handler *,
67 efhw_event_t *);
68 extern void efhw_handle_timeout_event(struct efhw_nic *,
69 struct efhw_ev_handler *,
70 efhw_event_t *);
72 #endif /* __CI_EFHW_EVENTQ_H__ */