be2iscsi: Fix retrieving MCCQ_WRB in non-embedded Mbox path
authorJayamohan Kallickal <jayamohan.kallickal@emulex.com>
Tue, 6 May 2014 01:41:24 +0000 (21:41 -0400)
committerChristoph Hellwig <hch@lst.de>
Wed, 28 May 2014 16:13:14 +0000 (18:13 +0200)
commitdaa8dc081cd801635b2757aa6f257a79d9ac6d2c
treedd7383719a53073ed57965a8bdb8286f21de6fbb
parente8e7f27139d5ba5b9f05fdee3f6224116ce8427c
be2iscsi: Fix retrieving MCCQ_WRB in non-embedded Mbox path

 Getting WRB for MCCQ posting was done before looking if tag is
 available or not. This lead to increase phba->ctrl.mcc_obj.q.used
 variable and the WARN_ON message was coming from wrb_from_mccq().
 Moved getting wrb from mccq after checking for the tag.

 In wrb_from_mccq(), memset is done before returning wrb ptr.
 Removed memset of mccq wrb from all other functions.

Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/scsi/be2iscsi/be_mgmt.c