diff options
author | Jayamohan Kallickal <jayamohank@serverengines.com> | 2010-01-05 05:10:46 +0530 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-01-18 10:48:23 -0600 |
commit | 756d29c8c7ed8887ed7d752371ce2f6d12399267 (patch) | |
tree | eb70b756dc22a798538b306010647b72709a6206 /drivers/scsi/be2iscsi/be.h | |
parent | 51a462500fbed4a1e8110dc60a421a3f12b9580b (diff) | |
download | op-kernel-dev-756d29c8c7ed8887ed7d752371ce2f6d12399267.zip op-kernel-dev-756d29c8c7ed8887ed7d752371ce2f6d12399267.tar.gz |
[SCSI] be2iscsi: Enable async mode for mcc rings
This patches enables async mode for mcc rings so that
multiple requests can be queued.
Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/be2iscsi/be.h')
-rw-r--r-- | drivers/scsi/be2iscsi/be.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/scsi/be2iscsi/be.h b/drivers/scsi/be2iscsi/be.h index a93a504..3861cf4 100644 --- a/drivers/scsi/be2iscsi/be.h +++ b/drivers/scsi/be2iscsi/be.h @@ -24,6 +24,7 @@ #define FW_VER_LEN 32 #define MCC_Q_LEN 128 #define MCC_CQ_LEN 256 +#define MAX_MCC_CMD 16 struct be_dma_mem { void *va; @@ -57,6 +58,11 @@ static inline void *queue_head_node(struct be_queue_info *q) return q->dma_mem.va + q->head * q->entry_size; } +static inline void *queue_get_wrb(struct be_queue_info *q, unsigned int wrb_num) +{ + return q->dma_mem.va + wrb_num * q->entry_size; +} + static inline void *queue_tail_node(struct be_queue_info *q) { return q->dma_mem.va + q->tail * q->entry_size; @@ -104,15 +110,19 @@ struct be_ctrl_info { spinlock_t mcc_lock; /* For serializing mcc cmds to BE card */ spinlock_t mcc_cq_lock; - /* MCC Async callback */ - void (*async_cb) (void *adapter, bool link_up); - void *adapter_ctxt; + wait_queue_head_t mcc_wait[MAX_MCC_CMD + 1]; + unsigned int mcc_tag[MAX_MCC_CMD]; + unsigned int mcc_numtag[MAX_MCC_CMD + 1]; + unsigned short mcc_alloc_index; + unsigned short mcc_free_index; + unsigned int mcc_tag_available; }; #include "be_cmds.h" #define PAGE_SHIFT_4K 12 #define PAGE_SIZE_4K (1 << PAGE_SHIFT_4K) +#define mcc_timeout 120000 /* 5s timeout */ /* Returns number of pages spanned by the data starting at the given addr */ #define PAGES_4K_SPANNED(_address, size) \ |