]> www.infradead.org Git - users/jedix/linux-maple.git/commit
i40e: synchronize nvmupdate command and adminq subtask
authorSudheer Mogilappagari <sudheer.mogilappagari@intel.com>
Wed, 12 Jul 2017 09:46:07 +0000 (05:46 -0400)
committerJack Vogel <jack.vogel@oracle.com>
Tue, 10 Oct 2017 21:15:25 +0000 (14:15 -0700)
commitc18daea89fde30ab71c2dd4249bb7a56dc9282e1
tree7cb62d45316a72951104b23bb967d84948967df6
parent1e81141f0d1ba504d3e532771314a770f075ce85
i40e: synchronize nvmupdate command and adminq subtask

During NVM update, state machine gets into unrecoverable state because
i40e_clean_adminq_subtask can get scheduled after the admin queue
command but before other state variables are updated. This causes
incorrect input to i40e_nvmupd_check_wait_event and state transitions
don't happen.

This issue existed before but surfaced after commit 373149fc99a0
("i40e: Decrease the scope of rtnl lock")

This fix adds locking around admin queue command and update of
state variables so that adminq_subtask will have accurate information
whenever it gets scheduled.

Signed-off-by: Sudheer Mogilappagari <sudheer.mogilappagari@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Orabug: 26785018
(cherry picked from commit 2bf01935ec5362aee6ff9ffc2476043af321aa42)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
Reviewed-by: Kyle Fortin <kyle.fortin@oracle.com>
drivers/net/ethernet/intel/i40e/i40e_nvm.c