ia64/linux-2.6.18-xen.hg

view drivers/net/sfc/sfc_resource/ci/efhw/common_sysdep.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 8c8a097cae69
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 provides version-independent Linux kernel API for
7 * userland-to-kernel interfaces.
8 * Only kernels >=2.6.9 are supported.
9 *
10 * Copyright 2005-2007: Solarflare Communications Inc,
11 * 9501 Jeronimo Road, Suite 250,
12 * Irvine, CA 92618, USA
13 *
14 * Developed and maintained by Solarflare Communications:
15 * <linux-xen-drivers@solarflare.com>
16 * <onload-dev@solarflare.com>
17 *
18 * Certain parts of the driver were implemented by
19 * Alexandra Kossovsky <Alexandra.Kossovsky@oktetlabs.ru>
20 * OKTET Labs Ltd, Russia,
21 * http://oktetlabs.ru, <info@oktetlabs.ru>
22 * by request of Solarflare Communications
23 *
24 *
25 * This program is free software; you can redistribute it and/or modify it
26 * under the terms of the GNU General Public License version 2 as published
27 * by the Free Software Foundation, incorporated herein by reference.
28 *
29 * This program is distributed in the hope that it will be useful,
30 * but WITHOUT ANY WARRANTY; without even the implied warranty of
31 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 * GNU General Public License for more details.
33 *
34 * You should have received a copy of the GNU General Public License
35 * along with this program; if not, write to the Free Software
36 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
37 ****************************************************************************
38 */
40 #ifndef __CI_EFHW_COMMON_LINUX_H__
41 #define __CI_EFHW_COMMON_LINUX_H__
43 #include <linux/types.h>
44 #include <linux/version.h>
46 /* Dirty hack, but Linux kernel does not provide DMA_ADDR_T_FMT */
47 #if BITS_PER_LONG == 64 || defined(CONFIG_HIGHMEM64G)
48 #define DMA_ADDR_T_FMT "%llx"
49 #else
50 #define DMA_ADDR_T_FMT "%x"
51 #endif
53 /* Linux kernel also does not provide PRIx32... Sigh. */
54 #define PRIx32 "x"
56 #ifdef __ia64__
57 # define PRIx64 "lx"
58 #else
59 # define PRIx64 "llx"
60 #endif
62 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
63 enum {
64 false = 0,
65 true = 1
66 };
68 typedef _Bool bool;
69 #endif /* LINUX_VERSION_CODE < 2.6.19 */
71 #endif /* __CI_EFHW_COMMON_LINUX_H__ */