From: Vikas Chaudhary Date: Thu, 2 May 2013 07:42:10 +0000 (-0400) Subject: [SCSI] qla4xxx: Fix iocb_cnt calculation in qla4xxx_send_mbox_iocb() X-Git-Tag: v3.10-rc1~3^2~1^2~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d522844a315233162dd715c620c14ac47110eeca;p=profile%2Fivi%2Fkernel-x86-ivi.git [SCSI] qla4xxx: Fix iocb_cnt calculation in qla4xxx_send_mbox_iocb() Increment 'ha->iocb_cnt' before adding mbox_iocb to iocb queue. Signed-off-by: Vikas Chaudhary Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/qla4xxx/ql4_iocb.c b/drivers/scsi/qla4xxx/ql4_iocb.c index 14fec97..fad71ed 100644 --- a/drivers/scsi/qla4xxx/ql4_iocb.c +++ b/drivers/scsi/qla4xxx/ql4_iocb.c @@ -507,6 +507,7 @@ static int qla4xxx_send_mbox_iocb(struct scsi_qla_host *ha, struct mrb *mrb, mrb->mbox_cmd = in_mbox[0]; wmb(); + ha->iocb_cnt += mrb->iocb_cnt; ha->isp_ops->queue_iocb(ha); exit_mbox_iocb: spin_unlock_irqrestore(&ha->hardware_lock, flags);