diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2012-11-21 02:40:33 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-11-30 09:47:48 -0500 |
commit | 7e98df229e915fdc38451d6f2de94e0589793288 (patch) | |
tree | cbc0e441288f0ad326ddaf5e84d043d534c06c44 | |
parent | 53016ed32182e1829bcb48bab37af54a7a0c95e2 (diff) |
[SCSI] qla2xxx: Use correct Request-Q-Out register during bidirectional request processing
Original code was not corrected for ISP83xx support. Instead code should used
the cached reference from the req_que structure, rather than the legacy
'if (ISP-TYPE(X))... else if (ISP-TYPE(Y))...' codes.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r-- | drivers/scsi/qla2xxx/qla_iocb.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c index b6104042b7ac..a481684479c1 100644 --- a/drivers/scsi/qla2xxx/qla_iocb.c +++ b/drivers/scsi/qla2xxx/qla_iocb.c | |||
@@ -2748,7 +2748,6 @@ qla2x00_start_bidir(srb_t *sp, struct scsi_qla_host *vha, uint32_t tot_dsds) | |||
2748 | struct rsp_que *rsp; | 2748 | struct rsp_que *rsp; |
2749 | struct req_que *req; | 2749 | struct req_que *req; |
2750 | int rval = EXT_STATUS_OK; | 2750 | int rval = EXT_STATUS_OK; |
2751 | device_reg_t __iomem *reg = ISP_QUE_REG(ha, vha->req->id); | ||
2752 | 2751 | ||
2753 | rval = QLA_SUCCESS; | 2752 | rval = QLA_SUCCESS; |
2754 | 2753 | ||
@@ -2786,15 +2785,7 @@ qla2x00_start_bidir(srb_t *sp, struct scsi_qla_host *vha, uint32_t tot_dsds) | |||
2786 | 2785 | ||
2787 | /* Check for room on request queue. */ | 2786 | /* Check for room on request queue. */ |
2788 | if (req->cnt < req_cnt + 2) { | 2787 | if (req->cnt < req_cnt + 2) { |
2789 | if (ha->mqenable) | 2788 | cnt = RD_REG_DWORD_RELAXED(req->req_q_out); |
2790 | cnt = RD_REG_DWORD(®->isp25mq.req_q_out); | ||
2791 | else if (IS_QLA82XX(ha)) | ||
2792 | cnt = RD_REG_DWORD(®->isp82.req_q_out); | ||
2793 | else if (IS_FWI2_CAPABLE(ha)) | ||
2794 | cnt = RD_REG_DWORD(®->isp24.req_q_out); | ||
2795 | else | ||
2796 | cnt = qla2x00_debounce_register( | ||
2797 | ISP_REQ_Q_OUT(ha, ®->isp)); | ||
2798 | 2789 | ||
2799 | if (req->ring_index < cnt) | 2790 | if (req->ring_index < cnt) |
2800 | req->cnt = cnt - req->ring_index; | 2791 | req->cnt = cnt - req->ring_index; |