diff options
author | Saurav Kashyap <saurav.kashyap@qlogic.com> | 2014-09-25 06:14:49 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-09-25 08:25:07 -0400 |
commit | d29fb7360ee61ec02257e9c49848c9d2a05345a0 (patch) | |
tree | fddf77577b2e84277718a69eaaaf495880224fe4 /drivers/scsi/qla2xxx | |
parent | d154f35029c1f77b589389d2afb1e1766fb80c28 (diff) |
qla2xxx: Add counter for message
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_target.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index 85587fcd5a38..1a546bc2bdd4 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c | |||
@@ -1434,10 +1434,11 @@ static inline void qlt_unmap_sg(struct scsi_qla_host *vha, | |||
1434 | static int qlt_check_reserve_free_req(struct scsi_qla_host *vha, | 1434 | static int qlt_check_reserve_free_req(struct scsi_qla_host *vha, |
1435 | uint32_t req_cnt) | 1435 | uint32_t req_cnt) |
1436 | { | 1436 | { |
1437 | uint32_t cnt; | 1437 | uint32_t cnt, cnt_in; |
1438 | 1438 | ||
1439 | if (vha->req->cnt < (req_cnt + 2)) { | 1439 | if (vha->req->cnt < (req_cnt + 2)) { |
1440 | cnt = (uint16_t)RD_REG_DWORD(vha->req->req_q_out); | 1440 | cnt = (uint16_t)RD_REG_DWORD(vha->req->req_q_out); |
1441 | cnt_in = (uint16_t)RD_REG_DWORD(vha->req->req_q_in); | ||
1441 | 1442 | ||
1442 | if (vha->req->ring_index < cnt) | 1443 | if (vha->req->ring_index < cnt) |
1443 | vha->req->cnt = cnt - vha->req->ring_index; | 1444 | vha->req->cnt = cnt - vha->req->ring_index; |
@@ -1448,10 +1449,9 @@ static int qlt_check_reserve_free_req(struct scsi_qla_host *vha, | |||
1448 | 1449 | ||
1449 | if (unlikely(vha->req->cnt < (req_cnt + 2))) { | 1450 | if (unlikely(vha->req->cnt < (req_cnt + 2))) { |
1450 | ql_dbg(ql_dbg_io, vha, 0x305a, | 1451 | ql_dbg(ql_dbg_io, vha, 0x305a, |
1451 | "qla_target(%d): There is no room in the " | 1452 | "qla_target(%d): There is no room in the request ring: vha->req->ring_index=%d, vha->req->cnt=%d, req_cnt=%d Req-out=%d Req-in=%d Req-Length=%d\n", |
1452 | "request ring: vha->req->ring_index=%d, vha->req->cnt=%d, " | 1453 | vha->vp_idx, vha->req->ring_index, |
1453 | "req_cnt=%d\n", vha->vp_idx, vha->req->ring_index, | 1454 | vha->req->cnt, req_cnt, cnt, cnt_in, vha->req->length); |
1454 | vha->req->cnt, req_cnt); | ||
1455 | return -EAGAIN; | 1455 | return -EAGAIN; |
1456 | } | 1456 | } |
1457 | vha->req->cnt -= req_cnt; | 1457 | vha->req->cnt -= req_cnt; |