summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/be2iscsi/be.h
diff options
context:
space:
mode:
authorJitendra Bhivare <jitendra.bhivare@broadcom.com>2016-02-04 11:19:17 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2016-02-24 03:27:02 +0100
commit090e2184ba8fedff44b65e480d0f30229bb85621 (patch)
tree74349555eec0766a33678016b958801efee26b01 /drivers/scsi/be2iscsi/be.h
parentbe2iscsi: Fix MCC WRB leak in open_connection (diff)
downloadlinux-090e2184ba8fedff44b65e480d0f30229bb85621.tar.xz
linux-090e2184ba8fedff44b65e480d0f30229bb85621.zip
be2iscsi: Couple MCC tag and WRB alloc and free
WARN_ON(atomic_read(&mccq->used) >= mccq->len) seen when FW gets into UE. MCCQ overflow is happening because driver discards any new request and frees up the tag. The tag allocation controls the number of MCC WRB posted. It is being replenished but WRBs are not hence the WARN_ON. Allocation and freeing of WRB and tags for MCC is now done in one place. This helps to achieve proper accounting of WRB indices and MCC tags. Signed-off-by: Jitendra Bhivare <jitendra.bhivare@broadcom.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/be2iscsi/be.h')
-rw-r--r--drivers/scsi/be2iscsi/be.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/be2iscsi/be.h b/drivers/scsi/be2iscsi/be.h
index da1d87a53009..ee5ace873535 100644
--- a/drivers/scsi/be2iscsi/be.h
+++ b/drivers/scsi/be2iscsi/be.h
@@ -42,7 +42,7 @@ struct be_queue_info {
u16 id;
u16 tail, head;
bool created;
- atomic_t used; /* Number of valid elements in the queue */
+ u16 used; /* Number of valid elements in the queue */
};
static inline u32 MODULO(u16 val, u16 limit)