<!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><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></FONT></BODY></HTML>