1 /****************************************************************************
2 * Driver for Solarflare network controllers -
3 * resource management for Xen backend, OpenOnload, etc
4 * (including support for SFE4001 10GBT NIC)
6 * This file provides version-independent Linux kernel API for
7 * userland-to-kernel interfaces.
8 * Only kernels >=2.6.9 are supported.
10 * Copyright 2005-2007: Solarflare Communications Inc,
11 * 9501 Jeronimo Road, Suite 250,
12 * Irvine, CA 92618, USA
14 * Developed and maintained by Solarflare Communications:
15 * <linux-xen-drivers@solarflare.com>
16 * <onload-dev@solarflare.com>
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
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.
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.
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 ****************************************************************************
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"
50 #define DMA_ADDR_T_FMT "%x"
53 /* Linux kernel also does not provide PRIx32... Sigh. */
58 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
65 #endif /* LINUX_VERSION_CODE < 2.6.19 */
67 #endif /* __CI_EFHW_COMMON_LINUX_H__ */