[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1236595934.11030.12.camel@lb-tlvb-eliezer>
Date: Mon, 09 Mar 2009 12:52:14 +0200
From: "Eilon Greenstein" <eilong@...adcom.com>
To: "David Miller" <davem@...emloft.net>
cc: netdev@...r.kernel.org, "Alex Chiang" <achiang@...com>,
"Bjorn Helgaas" <bjorn.helgaas@...com>,
"Vladislav Zolotarov" <vladz@...adcom.com>
Subject: [PATCH 1/3] bnx2x: Adding restriction on sge_buf_size
Subject: [PATCH 1/3] bnx2x: Adding restriction on sge_buf_size.
sge_buff_size may not be more than 0xffff.
Reported-by: Bjorn Helgaas <bjorn.helgaas@...com>
Signed-off-by: Vladislav Zolotarov <vladz@...adcom.com>
Tested-by: Bjorn Helgaas <bjorn.helgaas@...com>
Signed-off-by: Eilon Greenstein <eilong@...adcom.com>
---
drivers/net/bnx2x_main.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index d3e7775..48127f1 100644
--- 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 =
--
1.5.6.3
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists