Browse Source

Merge branch 'mlxsw-fixes'

Jiri Pirko says:

====================
mlxsw: couple of fixes

Couple of fixes from Ido.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller 9 years ago
parent
commit
a383b7f0e0

+ 1 - 1
drivers/net/ethernet/mellanox/mlxsw/pci.c

@@ -215,7 +215,7 @@ mlxsw_pci_queue_elem_info_producer_get(struct mlxsw_pci_queue *q)
 {
 {
 	int index = q->producer_counter & (q->count - 1);
 	int index = q->producer_counter & (q->count - 1);
 
 
-	if ((q->producer_counter - q->consumer_counter) == q->count)
+	if ((u16) (q->producer_counter - q->consumer_counter) == q->count)
 		return NULL;
 		return NULL;
 	return mlxsw_pci_queue_elem_info_get(q, index);
 	return mlxsw_pci_queue_elem_info_get(q, index);
 }
 }

+ 1 - 3
drivers/net/ethernet/mellanox/mlxsw/spectrum.c

@@ -2358,9 +2358,7 @@ static int mlxsw_sp_port_lag_leave(struct mlxsw_sp_port *mlxsw_sp_port,
 	if (mlxsw_sp_port->bridged) {
 	if (mlxsw_sp_port->bridged) {
 		mlxsw_sp_port_active_vlans_del(mlxsw_sp_port);
 		mlxsw_sp_port_active_vlans_del(mlxsw_sp_port);
 		mlxsw_sp_port_bridge_leave(mlxsw_sp_port, false);
 		mlxsw_sp_port_bridge_leave(mlxsw_sp_port, false);
-
-		if (lag->ref_count == 1)
-			mlxsw_sp_master_bridge_dec(mlxsw_sp, NULL);
+		mlxsw_sp_master_bridge_dec(mlxsw_sp, NULL);
 	}
 	}
 
 
 	if (lag->ref_count == 1) {
 	if (lag->ref_count == 1) {