scsi: qedf: Fix race betwen fipvlan request and response path
authorSaurav Kashyap <skashyap@marvell.com>
Fri, 23 Aug 2019 09:52:43 +0000 (02:52 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 29 Aug 2019 22:51:19 +0000 (18:51 -0400)
commit3480e7a8c8e47a6ee101ab722c58d61761b67e4a
tree777a30c2f1a72f61d81cce2812bc2c234b5fc5fb
parent5797bcc897c363a775ac3d929b62d2579bdf8573
scsi: qedf: Fix race betwen fipvlan request and response path

There is a race b/w fipvlan request and response path:

=====
qedf_fcoe_process_vlan_resp:113]:2: VLAN response, vid=0xffd.
qedf_initiate_fipvlan_req:165]:2: vlan = 0x6ffd already set.
qedf_set_vlan_id:139]:2: Setting vlan_id=0ffd prio=3.
======

The request thread sees that vlan is already set and fails to call
ctrl_link_up.

Fix:

 - While setting vlan_id use local variable and before setting vlan_id.

 - Call fcoe_ctlr_link_up in next iteration of fipvlan request.

Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qedf/qedf_main.c