Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183422
b: refs/heads/master
c: 572c526
h: refs/heads/master
v: v3
  • Loading branch information
Ron Mercer authored and David S. Miller committed Jan 7, 2010
1 parent c509022 commit 5df2e4e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c36531b9b2e00d9715c3a0f5788ac5311435e078
refs/heads/master: 572c526fb19a9a24098de814ab0601c1ce1bac82
19 changes: 15 additions & 4 deletions trunk/drivers/net/qlge/qlge.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,8 @@
#define RX_RING_SHADOW_SPACE (sizeof(u64) + \
MAX_DB_PAGES_PER_BQ(NUM_SMALL_BUFFERS) * sizeof(u64) + \
MAX_DB_PAGES_PER_BQ(NUM_LARGE_BUFFERS) * sizeof(u64))
#define SMALL_BUFFER_SIZE 512
#define SMALL_BUF_MAP_SIZE (SMALL_BUFFER_SIZE / 2)
#define LARGE_BUFFER_MAX_SIZE 8192
#define LARGE_BUFFER_MIN_SIZE 2048
#define MAX_SPLIT_SIZE 1023
#define QLGE_SB_PAD 32

#define MAX_CQ 128
#define DFLT_COALESCE_WAIT 100 /* 100 usec wait for coalescing */
Expand Down Expand Up @@ -737,6 +733,21 @@ enum {
PRB_MX_DATA = 0xfc, /* Use semaphore */
};

#ifdef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
#define SMALL_BUFFER_SIZE 256
#define SMALL_BUF_MAP_SIZE SMALL_BUFFER_SIZE
#define SPLT_SETTING FSC_DBRST_1024
#define SPLT_LEN 0
#define QLGE_SB_PAD 0
#else
#define SMALL_BUFFER_SIZE 512
#define SMALL_BUF_MAP_SIZE (SMALL_BUFFER_SIZE / 2)
#define SPLT_SETTING FSC_SH
#define SPLT_LEN (SPLT_HDR_EP | \
min(SMALL_BUF_MAP_SIZE, 1023))
#define QLGE_SB_PAD 32
#endif

/*
* CAM output format.
*/
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/net/qlge/qlge_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3332,15 +3332,15 @@ static int ql_adapter_initialize(struct ql_adapter *qdev)

/* Enable the function, set pagesize, enable error checking. */
value = FSC_FE | FSC_EPC_INBOUND | FSC_EPC_OUTBOUND |
FSC_EC | FSC_VM_PAGE_4K | FSC_SH;
FSC_EC | FSC_VM_PAGE_4K;
value |= SPLT_SETTING;

/* Set/clear header splitting. */
mask = FSC_VM_PAGESIZE_MASK |
FSC_DBL_MASK | FSC_DBRST_MASK | (value << 16);
ql_write32(qdev, FSC, mask | value);

ql_write32(qdev, SPLT_HDR, SPLT_HDR_EP |
min(SMALL_BUF_MAP_SIZE, MAX_SPLIT_SIZE));
ql_write32(qdev, SPLT_HDR, SPLT_LEN);

/* Set RX packet routing to use port/pci function on which the
* packet arrived on in addition to usual frame routing.
Expand Down

0 comments on commit 5df2e4e

Please sign in to comment.