提交 916c775f 编写于 作者: E Eilon Greenstein 提交者: David S. Miller

bnx2x: Adding restriction on sge_buf_size

sge_buff_size may not be more than 0xffff.
Reported-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: NVladislav Zolotarov <vladz@broadcom.com>
Tested-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: NEilon Greenstein <eilong@broadcom.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c0350024
...@@ -4518,7 +4518,8 @@ static void bnx2x_init_context(struct bnx2x *bp) ...@@ -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_TPA |
USTORM_ETH_ST_CONTEXT_CONFIG_ENABLE_SGE_RING); USTORM_ETH_ST_CONTEXT_CONFIG_ENABLE_SGE_RING);
context->ustorm_st_context.common.sge_buff_size = 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 = context->ustorm_st_context.common.sge_page_base_hi =
U64_HI(fp->rx_sge_mapping); U64_HI(fp->rx_sge_mapping);
context->ustorm_st_context.common.sge_page_base_lo = context->ustorm_st_context.common.sge_page_base_lo =
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册