diff options
author | Jitendra Bhivare <jitendra.bhivare@avagotech.com> | 2016-01-20 14:10:47 +0530 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-02-23 21:27:02 -0500 |
commit | cdde6682ab61d24aae4e7f75757a2073e4bff3a3 (patch) | |
tree | 6752f36027e3ccaca5609f52a163725c50a55b42 /drivers/scsi/be2iscsi/be_cmds.h | |
parent | c03a50f7098bed9150a9ac0468f699a93bc7b081 (diff) | |
download | talos-obmc-linux-cdde6682ab61d24aae4e7f75757a2073e4bff3a3.tar.gz talos-obmc-linux-cdde6682ab61d24aae4e7f75757a2073e4bff3a3.zip |
be2iscsi: Fix to use atomic bit operations for tag_state
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>
Diffstat (limited to 'drivers/scsi/be2iscsi/be_cmds.h')
-rw-r--r-- | drivers/scsi/be2iscsi/be_cmds.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/be2iscsi/be_cmds.h b/drivers/scsi/be2iscsi/be_cmds.h index 4bfca355fbe4..1883d320e22d 100644 --- a/drivers/scsi/be2iscsi/be_cmds.h +++ b/drivers/scsi/be2iscsi/be_cmds.h @@ -745,8 +745,8 @@ int be_cmd_fw_uninit(struct be_ctrl_info *ctrl); struct be_mcc_wrb *wrb_from_mbox(struct be_dma_mem *mbox_mem); struct be_mcc_wrb *wrb_from_mccq(struct beiscsi_hba *phba); -int be_mcc_notify_wait(struct beiscsi_hba *phba); -void be_mcc_notify(struct beiscsi_hba *phba); +int be_mcc_notify_wait(struct beiscsi_hba *phba, unsigned int tag); +void be_mcc_notify(struct beiscsi_hba *phba, unsigned int tag); unsigned int alloc_mcc_tag(struct beiscsi_hba *phba); void beiscsi_async_link_state_process(struct beiscsi_hba *phba, struct be_async_event_link_state *evt); |