diff options
author | Jayamohan Kallickal <jayamohan.kallickal@emulex.com> | 2014-01-29 08:16:39 +0100 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2014-03-15 18:19:10 +0100 |
commit | 1957aa7f62462dc888dfc9a94373b27f936f2e10 (patch) | |
tree | dc059ae34b917d20a1525d8304085f46635e6a3a /drivers/scsi/be2iscsi/be.h | |
parent | [SCSI] hpsa: Add support for a few HP Storage controllers (diff) | |
download | linux-1957aa7f62462dc888dfc9a94373b27f936f2e10.tar.xz linux-1957aa7f62462dc888dfc9a94373b27f936f2e10.zip |
[SCSI] be2iscsi: Fix handling timed out MBX completion from FW
When an MBX command timeout happens,the resources associated with
the MBX command were freed. If FW were to give the response to
host after the timeout value set by driver then driver crashes as the MBX Cmd
resources were already freed.
This patch fixes this issue by maintaing a state flag for each of
the MBX command posted/timedout/completed.
Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/be2iscsi/be.h')
-rw-r--r-- | drivers/scsi/be2iscsi/be.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/scsi/be2iscsi/be.h b/drivers/scsi/be2iscsi/be.h index 2e28f6c419fe..23c73fe42648 100644 --- a/drivers/scsi/be2iscsi/be.h +++ b/drivers/scsi/be2iscsi/be.h @@ -98,6 +98,14 @@ struct be_mcc_obj { struct be_queue_info cq; }; +struct beiscsi_mcc_tag_state { +#define MCC_TAG_STATE_COMPLETED 0x00 +#define MCC_TAG_STATE_RUNNING 0x01 +#define MCC_TAG_STATE_TIMEOUT 0x02 + uint8_t tag_state; + struct be_dma_mem tag_mem_state; +}; + struct be_ctrl_info { u8 __iomem *csr; u8 __iomem *db; /* Door Bell */ @@ -122,6 +130,8 @@ struct be_ctrl_info { unsigned short mcc_alloc_index; unsigned short mcc_free_index; unsigned int mcc_tag_available; + + struct beiscsi_mcc_tag_state ptag_state[MAX_MCC_CMD + 1]; }; #include "be_cmds.h" |