projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c035002
)
bnx2x: Adding restriction on sge_buf_size
author
Eilon Greenstein
<
[email protected]
>
Mon, 9 Mar 2009 00:52:14 +0000
(
00:52
+0000)
committer
David S. Miller
<
[email protected]
>
Tue, 10 Mar 2009 11:52:01 +0000
(
04:52
-0700)
sge_buff_size may not be more than 0xffff.
Reported-by: Bjorn Helgaas <
[email protected]
>
Signed-off-by: Vladislav Zolotarov <
[email protected]
>
Tested-by: Bjorn Helgaas <
[email protected]
>
Signed-off-by: Eilon Greenstein <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/bnx2x_main.c
patch
|
blob
|
history
diff --git
a/drivers/net/bnx2x_main.c
b/drivers/net/bnx2x_main.c
index d3e7775a9ccfaa2cc262c28ff4ba6c60b4a1ab6e..48127f11d033241c16e90fbb24cb9b2c9239ffad 100644
(file)
--- a/
drivers/net/bnx2x_main.c
+++ b/
drivers/net/bnx2x_main.c
@@
-4518,7
+4518,8
@@
static void bnx2x_init_context(struct bnx2x *bp)
(USTORM_ETH_ST_CONTEXT_CONFIG_ENABLE_TPA |
USTORM_ETH_ST_CONTEXT_CONFIG_ENABLE_SGE_RING);
context->ustorm_st_context.common.sge_buff_size =
- (u16)(BCM_PAGE_SIZE*PAGES_PER_SGE);
+ (u16)min((u32)SGE_PAGE_SIZE*PAGES_PER_SGE,
+ (u32)0xffff);
context->ustorm_st_context.common.sge_page_base_hi =
U64_HI(fp->rx_sge_mapping);
context->ustorm_st_context.common.sge_page_base_lo =