[ofw] patch: Fix for vlan handling.
Tzachi Dar
tzachid at mellanox.co.il
Wed Dec 2 08:12:25 PST 2009
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/20091202/c7dd83ca/attachment.html>
More information about the ofw
mailing list