summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/be2iscsi/be.h
diff options
context:
space:
mode:
authorJayamohan Kallickal <jayamohan.kallickal@emulex.com>2014-01-29 02:16:39 -0500
committerJames Bottomley <JBottomley@Parallels.com>2014-03-15 10:19:10 -0700
commit1957aa7f62462dc888dfc9a94373b27f936f2e10 (patch)
treedc059ae34b917d20a1525d8304085f46635e6a3a /drivers/scsi/be2iscsi/be.h
parent8e616a5ee6e389f855a9fa0ab57194b4b049d9c8 (diff)
downloadop-kernel-dev-1957aa7f62462dc888dfc9a94373b27f936f2e10.zip
op-kernel-dev-1957aa7f62462dc888dfc9a94373b27f936f2e10.tar.gz
[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.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/scsi/be2iscsi/be.h b/drivers/scsi/be2iscsi/be.h
index 2e28f6c..23c73fe 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"
OpenPOWER on IntegriCloud