diff options
author | Quinn Tran <quinn.tran@cavium.com> | 2017-06-13 20:47:23 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-06-27 21:21:41 -0400 |
commit | af7bb3826a49b774332a5e8ff3f68877bdfd21c9 (patch) | |
tree | 30271aad360ebcca631d60d86278fcdca81097a9 /drivers/scsi/qla2xxx/qla_target.c | |
parent | 7c3f8fd10bab0b4d9021a11f123fd67e81ef3b0e (diff) | |
download | lwn-af7bb3826a49b774332a5e8ff3f68877bdfd21c9.tar.gz lwn-af7bb3826a49b774332a5e8ff3f68877bdfd21c9.zip |
scsi: qla2xxx: use shadow register for ISP27XX
For ISP27XX, use shadow register to read FW provided REQQ's consumer
index. The shadow register is dma'ed by firmware.
Signed-off-by: Quinn Tran <quinn.tran@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_target.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_target.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index 7e6c575e3e29..1d8b5f14a69c 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -2288,7 +2288,8 @@ static int qlt_check_reserve_free_req(struct qla_qpair *qpair, struct req_que *req = qpair->req; if (req->cnt < (req_cnt + 2)) { - cnt = (uint16_t)RD_REG_DWORD(req->req_q_out); + cnt = (uint16_t)(qpair->use_shadow_reg ? *req->out_ptr : + RD_REG_DWORD_RELAXED(req->req_q_out)); if (req->ring_index < cnt) req->cnt = cnt - req->ring_index; |