diff options
author | Ron Mercer <ron.mercer@qlogic.com> | 2010-01-02 05:37:42 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-01-06 23:30:33 -0500 |
commit | 572c526fb19a9a24098de814ab0601c1ce1bac82 (patch) | |
tree | 3fa7cad3dc93b5e67bae94e5ba1427b878bdfa5e /drivers/net/qlge/qlge.h | |
parent | c36531b9b2e00d9715c3a0f5788ac5311435e078 (diff) |
qlge: Turn on RX header split based on platform.
Using 4-byte aligned headers is problematic for some architectures.
Since qlge uses 4-byte aligned rx buffers we split headers for these
architectures into a separate buffer and then recopy to align on 2-byte boundary.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlge/qlge.h')
-rw-r--r-- | drivers/net/qlge/qlge.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/drivers/net/qlge/qlge.h b/drivers/net/qlge/qlge.h index 862c1aaf3860..ee0e2bd4842f 100644 --- a/drivers/net/qlge/qlge.h +++ b/drivers/net/qlge/qlge.h | |||
@@ -54,12 +54,8 @@ | |||
54 | #define RX_RING_SHADOW_SPACE (sizeof(u64) + \ | 54 | #define RX_RING_SHADOW_SPACE (sizeof(u64) + \ |
55 | MAX_DB_PAGES_PER_BQ(NUM_SMALL_BUFFERS) * sizeof(u64) + \ | 55 | MAX_DB_PAGES_PER_BQ(NUM_SMALL_BUFFERS) * sizeof(u64) + \ |
56 | MAX_DB_PAGES_PER_BQ(NUM_LARGE_BUFFERS) * sizeof(u64)) | 56 | MAX_DB_PAGES_PER_BQ(NUM_LARGE_BUFFERS) * sizeof(u64)) |
57 | #define SMALL_BUFFER_SIZE 512 | ||
58 | #define SMALL_BUF_MAP_SIZE (SMALL_BUFFER_SIZE / 2) | ||
59 | #define LARGE_BUFFER_MAX_SIZE 8192 | 57 | #define LARGE_BUFFER_MAX_SIZE 8192 |
60 | #define LARGE_BUFFER_MIN_SIZE 2048 | 58 | #define LARGE_BUFFER_MIN_SIZE 2048 |
61 | #define MAX_SPLIT_SIZE 1023 | ||
62 | #define QLGE_SB_PAD 32 | ||
63 | 59 | ||
64 | #define MAX_CQ 128 | 60 | #define MAX_CQ 128 |
65 | #define DFLT_COALESCE_WAIT 100 /* 100 usec wait for coalescing */ | 61 | #define DFLT_COALESCE_WAIT 100 /* 100 usec wait for coalescing */ |
@@ -737,6 +733,21 @@ enum { | |||
737 | PRB_MX_DATA = 0xfc, /* Use semaphore */ | 733 | PRB_MX_DATA = 0xfc, /* Use semaphore */ |
738 | }; | 734 | }; |
739 | 735 | ||
736 | #ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS | ||
737 | #define SMALL_BUFFER_SIZE 256 | ||
738 | #define SMALL_BUF_MAP_SIZE SMALL_BUFFER_SIZE | ||
739 | #define SPLT_SETTING FSC_DBRST_1024 | ||
740 | #define SPLT_LEN 0 | ||
741 | #define QLGE_SB_PAD 0 | ||
742 | #else | ||
743 | #define SMALL_BUFFER_SIZE 512 | ||
744 | #define SMALL_BUF_MAP_SIZE (SMALL_BUFFER_SIZE / 2) | ||
745 | #define SPLT_SETTING FSC_SH | ||
746 | #define SPLT_LEN (SPLT_HDR_EP | \ | ||
747 | min(SMALL_BUF_MAP_SIZE, 1023)) | ||
748 | #define QLGE_SB_PAD 32 | ||
749 | #endif | ||
750 | |||
740 | /* | 751 | /* |
741 | * CAM output format. | 752 | * CAM output format. |
742 | */ | 753 | */ |