@@ -3853,9 +3853,13 @@ static int rocker_port_open(struct net_device *dev)
goto err_request_rx_irq;
}
+ err = rocker_port_set_untagged_vlan(rocker_port);
+ if (err)
+ goto err_set_vlan;
+
err = rocker_port_fwd_enable(rocker_port);
if (err)
- goto err_fwd_enable;
+ goto err_set_vlan;
napi_enable(&rocker_port->napi_tx);
napi_enable(&rocker_port->napi_rx);
@@ -3863,7 +3867,7 @@ static int rocker_port_open(struct net_device *dev)
netif_start_queue(dev);
return 0;
-err_fwd_enable:
+err_set_vlan:
free_irq(rocker_msix_rx_vector(rocker_port), rocker_port);
err_request_rx_irq:
free_irq(rocker_msix_tx_vector(rocker_port), rocker_port);
When joining a bridge rocker sets the untagged VLAN of a port according to the ifindex of its bridge device. And when leaving a bridge rocker sets the untagged VLAN of a port according to the ifindex of the port's device. So after joining and leaving a VLAN the untagged VLAN of a port will be set according to the latter. However, prior to joining a VLAN it is unset. This patch sets the untagged VLAN of a port according to the ifindex of the port's device when the port's device is opened. That is, the same value that can be achieved by joining then leaving a VLAN. Which seems logical and consistent. Signed-off-by: Simon Horman <simon.horman@netronome.com> --- drivers/net/ethernet/rocker/rocker.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)