diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-12-09 01:14:38 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-12-09 01:14:38 -0500 |
commit | bcd6acd51f3d4d1ada201e9bc5c40a31d6d80c71 (patch) | |
tree | 2f6dffd2d3e4dd67355a224de7e7a960335a92fd /drivers/net/sfc/bitfield.h | |
parent | 11c34c7deaeeebcee342cbc35e1bb2a6711b2431 (diff) | |
parent | 3ff6a468b45b5dfeb0e903e56f4eb27d34b2437c (diff) |
Merge commit 'origin/master' into next
Conflicts:
include/linux/kvm.h
Diffstat (limited to 'drivers/net/sfc/bitfield.h')
-rw-r--r-- | drivers/net/sfc/bitfield.h | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/drivers/net/sfc/bitfield.h b/drivers/net/sfc/bitfield.h index d54d84c267b9..098ac2ad757d 100644 --- a/drivers/net/sfc/bitfield.h +++ b/drivers/net/sfc/bitfield.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | * Driver for Solarflare Solarstorm network controllers and boards | 2 | * Driver for Solarflare Solarstorm network controllers and boards |
3 | * Copyright 2005-2006 Fen Systems Ltd. | 3 | * Copyright 2005-2006 Fen Systems Ltd. |
4 | * Copyright 2006-2008 Solarflare Communications Inc. | 4 | * Copyright 2006-2009 Solarflare Communications Inc. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms of the GNU General Public License version 2 as published | 7 | * under the terms of the GNU General Public License version 2 as published |
@@ -37,6 +37,8 @@ | |||
37 | #define EFX_DWORD_2_WIDTH 32 | 37 | #define EFX_DWORD_2_WIDTH 32 |
38 | #define EFX_DWORD_3_LBN 96 | 38 | #define EFX_DWORD_3_LBN 96 |
39 | #define EFX_DWORD_3_WIDTH 32 | 39 | #define EFX_DWORD_3_WIDTH 32 |
40 | #define EFX_QWORD_0_LBN 0 | ||
41 | #define EFX_QWORD_0_WIDTH 64 | ||
40 | 42 | ||
41 | /* Specified attribute (e.g. LBN) of the specified field */ | 43 | /* Specified attribute (e.g. LBN) of the specified field */ |
42 | #define EFX_VAL(field, attribute) field ## _ ## attribute | 44 | #define EFX_VAL(field, attribute) field ## _ ## attribute |
@@ -520,19 +522,6 @@ typedef union efx_oword { | |||
520 | #define EFX_SET_QWORD_FIELD EFX_SET_QWORD_FIELD32 | 522 | #define EFX_SET_QWORD_FIELD EFX_SET_QWORD_FIELD32 |
521 | #endif | 523 | #endif |
522 | 524 | ||
523 | #define EFX_SET_OWORD_FIELD_VER(efx, oword, field, value) do { \ | ||
524 | if (falcon_rev(efx) >= FALCON_REV_B0) { \ | ||
525 | EFX_SET_OWORD_FIELD((oword), field##_B0, (value)); \ | ||
526 | } else { \ | ||
527 | EFX_SET_OWORD_FIELD((oword), field##_A1, (value)); \ | ||
528 | } \ | ||
529 | } while (0) | ||
530 | |||
531 | #define EFX_QWORD_FIELD_VER(efx, qword, field) \ | ||
532 | (falcon_rev(efx) >= FALCON_REV_B0 ? \ | ||
533 | EFX_QWORD_FIELD((qword), field##_B0) : \ | ||
534 | EFX_QWORD_FIELD((qword), field##_A1)) | ||
535 | |||
536 | /* Used to avoid compiler warnings about shift range exceeding width | 525 | /* Used to avoid compiler warnings about shift range exceeding width |
537 | * of the data types when dma_addr_t is only 32 bits wide. | 526 | * of the data types when dma_addr_t is only 32 bits wide. |
538 | */ | 527 | */ |