[ofw] patch: Fix for vlan handling.

Tzachi Dar tzachid at mellanox.co.il
Thu Dec 3 08:12:49 PST 2009


Applied on 2618.
 
Thanks
Tzachi


________________________________

	From: ofw-bounces at lists.openfabrics.org
[mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Tzachi Dar
	Sent: Wednesday, December 02, 2009 6:12 PM
	To: ofw at lists.openfabrics.org
	Subject: [ofw] patch: Fix for vlan handling.
	
	
	signed off by:galina
	Index: port.c
	
===================================================================
	--- port.c (revision 5159)
	+++ port.c (revision 5160)
	@@ -60,6 +60,10 @@
	   table->refs[i] = 0;
	  }
	  table->max = 1 << dev->caps.log_num_vlans;
	+ if(table->max > MLX4_MAX_VLAN_NUM)
	+ {
	+  table->max = MLX4_MAX_VLAN_NUM;
	+ }
	  table->total = 0;
	 }
	 
	@@ -112,7 +116,7 @@
	  }
	  mlx4_dbg(dev, "Free mac index is %d\n", free);
	 
	- if (table->total == table->max) {
	+ if (table->total == table->max || free < 0) {
	   /* No free mac entries */
	   err = -ENOSPC;
	   goto out;
	@@ -207,7 +211,7 @@
	   }
	  }
	 
	- if (table->total == table->max) {
	+ if (table->total == table->max || free < 0) {
	   /* No free vlan entries */
	   err = -ENOSPC;
	   goto out;
	

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20091203/e6278913/attachment.html>


More information about the ofw mailing list