Commit 6252c7e4 authored by Shannon Nelson's avatar Shannon Nelson Committed by Jeff Kirsher

i40e: reapply LAA after reset

The LAA is lost on a reset, so be sure to replay it when rebuilding
the switch after any reset.

Change-ID: I6e643f9a59dfd899b6cbdf84d93b4bc9c37bb949
Signed-off-by: default avatarShannon Nelson <shannon.nelson@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 6c8ad1ba
...@@ -362,6 +362,7 @@ struct i40e_mac_filter { ...@@ -362,6 +362,7 @@ struct i40e_mac_filter {
bool is_vf; /* filter belongs to a VF */ bool is_vf; /* filter belongs to a VF */
bool is_netdev; /* filter belongs to a netdev */ bool is_netdev; /* filter belongs to a netdev */
bool changed; /* filter needs to be sync'd to the HW */ bool changed; /* filter needs to be sync'd to the HW */
bool is_laa; /* filter is a Locally Administered Address */
}; };
struct i40e_veb { struct i40e_veb {
......
...@@ -1344,8 +1344,8 @@ static int i40e_set_mac(struct net_device *netdev, void *p) ...@@ -1344,8 +1344,8 @@ static int i40e_set_mac(struct net_device *netdev, void *p)
} }
} }
if (!i40e_find_mac(vsi, addr->sa_data, false, true)) { f = i40e_find_mac(vsi, addr->sa_data, false, true);
if (!f) {
/* In order to be sure to not drop any packets, add the /* In order to be sure to not drop any packets, add the
* new address first then delete the old one. * new address first then delete the old one.
*/ */
...@@ -1360,6 +1360,7 @@ static int i40e_set_mac(struct net_device *netdev, void *p) ...@@ -1360,6 +1360,7 @@ static int i40e_set_mac(struct net_device *netdev, void *p)
i40e_sync_vsi_filters(vsi); i40e_sync_vsi_filters(vsi);
} }
f->is_laa = true;
if (!ether_addr_equal(netdev->dev_addr, addr->sa_data)) if (!ether_addr_equal(netdev->dev_addr, addr->sa_data))
ether_addr_copy(netdev->dev_addr, addr->sa_data); ether_addr_copy(netdev->dev_addr, addr->sa_data);
...@@ -7378,6 +7379,12 @@ static int i40e_add_vsi(struct i40e_vsi *vsi) ...@@ -7378,6 +7379,12 @@ static int i40e_add_vsi(struct i40e_vsi *vsi)
list_for_each_entry_safe(f, ftmp, &vsi->mac_filter_list, list) { list_for_each_entry_safe(f, ftmp, &vsi->mac_filter_list, list) {
f->changed = true; f->changed = true;
f_count++; f_count++;
if (f->is_laa && vsi->type == I40E_VSI_MAIN) {
i40e_aq_mac_address_write(&vsi->back->hw,
I40E_AQC_WRITE_TYPE_LAA_WOL,
f->macaddr, NULL);
}
} }
if (f_count) { if (f_count) {
vsi->flags |= I40E_VSI_FLAG_FILTER_CHANGED; vsi->flags |= I40E_VSI_FLAG_FILTER_CHANGED;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment