Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d522844a authored by Vikas Chaudhary's avatar Vikas Chaudhary Committed by James Bottomley
Browse files

[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: default avatarVikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent 98b8e179
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -507,6 +507,7 @@ static int qla4xxx_send_mbox_iocb(struct scsi_qla_host *ha, struct mrb *mrb,
	mrb->mbox_cmd = in_mbox[0];
	mrb->mbox_cmd = in_mbox[0];
	wmb();
	wmb();


	ha->iocb_cnt += mrb->iocb_cnt;
	ha->isp_ops->queue_iocb(ha);
	ha->isp_ops->queue_iocb(ha);
exit_mbox_iocb:
exit_mbox_iocb:
	spin_unlock_irqrestore(&ha->hardware_lock, flags);
	spin_unlock_irqrestore(&ha->hardware_lock, flags);