Skip to content

Commit

Permalink
qla2xxx: Use correct offset to req-q-out for reserve calculation
Browse files Browse the repository at this point in the history
Cc: <stable@vger.kernel.org>
Signed-off-by: Arun Easi <arun.easi@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
  • Loading branch information
Arun Easi authored and Christoph Hellwig committed Sep 25, 2014
1 parent 78c2106 commit 75554b6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/scsi/qla2xxx/qla_target.c
Original file line number Diff line number Diff line change
Expand Up @@ -1431,12 +1431,10 @@ static inline void qlt_unmap_sg(struct scsi_qla_host *vha,
static int qlt_check_reserve_free_req(struct scsi_qla_host *vha,
uint32_t req_cnt)
{
struct qla_hw_data *ha = vha->hw;
device_reg_t __iomem *reg = ha->iobase;
uint32_t cnt;

if (vha->req->cnt < (req_cnt + 2)) {
cnt = (uint16_t)RD_REG_DWORD(&reg->isp24.req_q_out);
cnt = (uint16_t)RD_REG_DWORD(vha->req->req_q_out);

ql_dbg(ql_dbg_tgt, vha, 0xe00a,
"Request ring circled: cnt=%d, vha->->ring_index=%d, "
Expand Down

0 comments on commit 75554b6

Please sign in to comment.