aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/qlge/qlge.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/qlge/qlge.h')
-rw-r--r--drivers/net/qlge/qlge.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/net/qlge/qlge.h b/drivers/net/qlge/qlge.h
index b1ddfd1b8d53..156e02e8905d 100644
--- a/drivers/net/qlge/qlge.h
+++ b/drivers/net/qlge/qlge.h
@@ -41,7 +41,18 @@
41 41
42#define NUM_SMALL_BUFFERS 512 42#define NUM_SMALL_BUFFERS 512
43#define NUM_LARGE_BUFFERS 512 43#define NUM_LARGE_BUFFERS 512
44#define DB_PAGE_SIZE 4096
45
46/* Calculate the number of (4k) pages required to
47 * contain a buffer queue of the given length.
48 */
49#define MAX_DB_PAGES_PER_BQ(x) \
50 (((x * sizeof(u64)) / DB_PAGE_SIZE) + \
51 (((x * sizeof(u64)) % DB_PAGE_SIZE) ? 1 : 0))
44 52
53#define RX_RING_SHADOW_SPACE (sizeof(u64) + \
54 MAX_DB_PAGES_PER_BQ(NUM_SMALL_BUFFERS) * sizeof(u64) + \
55 MAX_DB_PAGES_PER_BQ(NUM_LARGE_BUFFERS) * sizeof(u64))
45#define SMALL_BUFFER_SIZE 256 56#define SMALL_BUFFER_SIZE 256
46#define LARGE_BUFFER_SIZE PAGE_SIZE 57#define LARGE_BUFFER_SIZE PAGE_SIZE
47#define MAX_SPLIT_SIZE 1023 58#define MAX_SPLIT_SIZE 1023
@@ -65,8 +76,6 @@
65#define TX_DESC_PER_OAL 0 76#define TX_DESC_PER_OAL 0
66#endif 77#endif
67 78
68#define DB_PAGE_SIZE 4096
69
70/* MPI test register definitions. This register 79/* MPI test register definitions. This register
71 * is used for determining alternate NIC function's 80 * is used for determining alternate NIC function's
72 * PCI->func number. 81 * PCI->func number.