]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.25/patches.drivers/bnx2x-Adding-restriction-on-sge_buf_size.patch
Revert "Move xen patchset to new version's subdir."
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.drivers / bnx2x-Adding-restriction-on-sge_buf_size.patch
CommitLineData
00e5a55c
BS
1From 916c775ff297dc60219a4f0e5527ba6ab4a88ed4 Mon Sep 17 00:00:00 2001
2From: Eilon Greenstein <eilong@broadcom.com>
3Date: Mon, 9 Mar 2009 00:52:14 +0000
4Subject: [PATCH] bnx2x: Adding restriction on sge_buf_size
5References: bnc#481074
6
7sge_buff_size may not be more than 0xffff.
8
9Reported-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
10Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
11Tested-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
12Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
13Signed-off-by: David S. Miller <davem@davemloft.net>
14Signed-off-by: Brandon Philips <bphilips@suse.de>
15---
16 drivers/net/bnx2x_main.c | 3 ++-
17 1 file changed, 2 insertions(+), 1 deletion(-)
18
19--- a/drivers/net/bnx2x_main.c
20+++ b/drivers/net/bnx2x_main.c
21@@ -4521,7 +4521,8 @@ static void bnx2x_init_context(struct bn
22 (USTORM_ETH_ST_CONTEXT_CONFIG_ENABLE_TPA |
23 USTORM_ETH_ST_CONTEXT_CONFIG_ENABLE_SGE_RING);
24 context->ustorm_st_context.common.sge_buff_size =
25- (u16)(BCM_PAGE_SIZE*PAGES_PER_SGE);
26+ (u16)min((u32)SGE_PAGE_SIZE*PAGES_PER_SGE,
27+ (u32)0xffff);
28 context->ustorm_st_context.common.sge_page_base_hi =
29 U64_HI(fp->rx_sge_mapping);
30 context->ustorm_st_context.common.sge_page_base_lo =