Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 916c775f authored by Eilon Greenstein's avatar Eilon Greenstein Committed by David S. Miller
Browse files

bnx2x: Adding restriction on sge_buf_size



sge_buff_size may not be more than 0xffff.

Reported-by: default avatarBjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: default avatarVladislav Zolotarov <vladz@broadcom.com>
Tested-by: default avatarBjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: default avatarEilon Greenstein <eilong@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c0350024
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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 =