]> www.infradead.org Git - users/jedix/linux-maple.git/commit
be2iscsi: Fix to use atomic bit operations for tag_state
authorJitendra Bhivare <jitendra.bhivare@avagotech.com>
Wed, 20 Jan 2016 08:40:47 +0000 (14:10 +0530)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 10 Mar 2016 15:21:45 +0000 (07:21 -0800)
commit36d959ca63ca85faab38a4470b370d10f34e0b32
tree091fb4088ffb1810819c8519d5ef3fe63d57d9ee
parent7cca5a84ce56283a04edc88db75d153623519230
be2iscsi: Fix to use atomic bit operations for tag_state

Orabug: 22725588

beiscsi_mccq_compl sets MCC_TAG_STATE_TIMEOUT before setting up
tag_mem_state. be_mcc_compl_process_isr checks for MCC_TAG_STATE_TIMEOUT
first then accesses tag_mem_state which might be still getting populated
in the process context.

Fix: Set MCC_TAG_STATE_TIMEOUT after tag_mem_state is populated.
Removed MCC_TAG_STATE_COMPLETED. When posted its in running state and
the running state is cleared in be_mcc_compl_process_isr.  be_mcc_notify
now takes tag argument to set it to running state.  Use bit operations
for tag_state. Use barriers before setting the state.

Signed-off-by: Jitendra Bhivare <jitendra.bhivare@avagotech.com>
Reviewed-by: Hannes Reinicke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Dan Duval <dan.duval@oracle.com>
drivers/scsi/be2iscsi/be.h
drivers/scsi/be2iscsi/be_cmds.c
drivers/scsi/be2iscsi/be_cmds.h
drivers/scsi/be2iscsi/be_mgmt.c