When bnx2fc receives an UNREGISTER event on a vlan interface it calls
destroy on all interfaces that matches the physical interface. Add
vlan_id check to destroy only the vlan interface that generated the
event.
Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
return;
mutex_lock(&bnx2fc_dev_lock);
list_for_each_entry_safe(interface, tmp, &if_list, list) {
- if (interface->hba != hba)
- continue;
- __bnx2fc_destroy(interface);
+ if (interface->hba == hba &&
+ interface->vlan_id == (vlan_id & VLAN_VID_MASK))
+ __bnx2fc_destroy(interface);
}
mutex_unlock(&bnx2fc_dev_lock);
return;