<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18702"></HEAD>
<BODY>
<DIV><SPAN class=318321216-03122009><FONT color=#0000ff size=2
face=Arial>Applied on 2618.</FONT></SPAN></DIV>
<DIV><SPAN class=318321216-03122009><FONT color=#0000ff size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=318321216-03122009><FONT color=#0000ff size=2
face=Arial>Thanks</FONT></SPAN></DIV>
<DIV><SPAN class=318321216-03122009><FONT color=#0000ff size=2
face=Arial>Tzachi</FONT></SPAN></DIV><BR>
<BLOCKQUOTE
style="BORDER-LEFT: #0000ff 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px"
dir=ltr>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> ofw-bounces@lists.openfabrics.org
[mailto:ofw-bounces@lists.openfabrics.org] <B>On Behalf Of </B>Tzachi
Dar<BR><B>Sent:</B> Wednesday, December 02, 2009 6:12 PM<BR><B>To:</B>
ofw@lists.openfabrics.org<BR><B>Subject:</B> [ofw] patch: Fix for vlan
handling.<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT size=2 face=Arial><SPAN class=270391116-02122009>signed off
by:galina</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial>Index:
port.c<BR>===================================================================<BR>---
port.c (revision 5159)<BR>+++ port.c (revision 5160)<BR>@@ -60,6
+60,10 @@<BR> table->refs[i] =
0;<BR> }<BR> table->max = 1 <<
dev->caps.log_num_vlans;<BR>+ if(table->max >
MLX4_MAX_VLAN_NUM)<BR>+ {<BR>+ table->max =
MLX4_MAX_VLAN_NUM;<BR>+ }<BR> table->total =
0;<BR> }<BR> <BR>@@ -112,7 +116,7
@@<BR> }<BR> mlx4_dbg(dev, "Free mac index is %d\n",
free);<BR> <BR>- if (table->total == table->max)
{<BR>+ if (table->total == table->max || free < 0)
{<BR> /* No free mac entries */<BR> err =
-ENOSPC;<BR> goto out;<BR>@@ -207,7 +211,7
@@<BR> }<BR> }<BR> <BR>- if
(table->total == table->max) {<BR>+ if (table->total ==
table->max || free < 0) {<BR> /* No free vlan entries
*/<BR> err = -ENOSPC;<BR> goto
out;<BR></DIV></BLOCKQUOTE></FONT></BODY></HTML>