linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Saurav Kashyap <saurav.kashyap@qlogic.com>
To: jbottomley@parallels.com
Cc: giridhar.malavali@qlogic.com, saurav.kashyap@qlogic.com,
	chad.dupuis@qlogic.com, andrew.vasquez@qlogic.com,
	linux-scsi@vger.kernel.org
Subject: [PATCH 08/19] qla2xxx: Use correct Request-Q-Out register during bidirectional request processing
Date: Wed, 21 Nov 2012 02:40:33 -0500	[thread overview]
Message-ID: <1353483644-17262-9-git-send-email-saurav.kashyap@qlogic.com> (raw)
In-Reply-To: <1353483644-17262-1-git-send-email-saurav.kashyap@qlogic.com>

From: Andrew Vasquez <andrew.vasquez@qlogic.com>

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>
---
 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 b610404..a481684 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)
 	struct rsp_que *rsp;
 	struct req_que *req;
 	int rval = EXT_STATUS_OK;
-	device_reg_t __iomem *reg = ISP_QUE_REG(ha, vha->req->id);
 
 	rval = QLA_SUCCESS;
 
@@ -2786,15 +2785,7 @@ qla2x00_start_bidir(srb_t *sp, struct scsi_qla_host *vha, uint32_t tot_dsds)
 
 	/* Check for room on request queue. */
 	if (req->cnt < req_cnt + 2) {
-		if (ha->mqenable)
-			cnt = RD_REG_DWORD(&reg->isp25mq.req_q_out);
-		else if (IS_QLA82XX(ha))
-			cnt = RD_REG_DWORD(&reg->isp82.req_q_out);
-		else if (IS_FWI2_CAPABLE(ha))
-			cnt = RD_REG_DWORD(&reg->isp24.req_q_out);
-		else
-			cnt = qla2x00_debounce_register(
-					ISP_REQ_Q_OUT(ha, &reg->isp));
+		cnt = RD_REG_DWORD_RELAXED(req->req_q_out);
 
 		if  (req->ring_index < cnt)
 			req->cnt = cnt - req->ring_index;
-- 
1.7.7


  parent reply	other threads:[~2012-11-21  7:58 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-21  7:40 [PATCH 00/19] qla2xxx: Patches for scsi "misc" branch Saurav Kashyap
2012-11-21  7:40 ` [PATCH 01/19] qla2xxx: Clear unsupported 'states' during Get-FW-State queries Saurav Kashyap
2012-11-21  7:40 ` [PATCH 02/19] qla2xxx: Remove spurious taking of ha->vport_slock spinlock Saurav Kashyap
2012-11-21  7:40 ` [PATCH 03/19] qla2xxx: Honor status value of 2 for report-id acquisition Saurav Kashyap
2012-11-21  7:40 ` [PATCH 04/19] qla2xxx: Fix for warnings reported by sparse Saurav Kashyap
2012-11-21  7:40 ` [PATCH 05/19] qla2xxx: No fcport FC-4 type assignment in GA_NXT response Saurav Kashyap
2012-11-21  7:40 ` [PATCH 06/19] qla2xxx: Fix coccinelle warnings in qla2x00_relogin Saurav Kashyap
2012-11-21  7:40 ` [PATCH 07/19] qla2xxx: Move noisy Start scsi failed messages to verbose logging level Saurav Kashyap
2012-11-21  7:40 ` Saurav Kashyap [this message]
2012-11-21  7:40 ` [PATCH 09/19] qla2xxx: Add Gen3 PCIe speed 8GT/s to the log message Saurav Kashyap
2012-11-21  7:40 ` [PATCH 10/19] qla2xxx: Fix typo in qla83xx_fw_dump function Saurav Kashyap
2012-11-21  7:40 ` [PATCH 11/19] qla2xxx: Ignore driver ack bit if corresponding presence bit is not set Saurav Kashyap
2012-11-21  7:40 ` [PATCH 12/19] qla2xxx: Add acquiring of risc semaphore before doing ISP reset Saurav Kashyap
2012-11-21  7:40 ` [PATCH 13/19] qla2xxx: Move marking fcport online ahead of setting iiDMA speed Saurav Kashyap
2012-11-21  7:40 ` [PATCH 14/19] qla2xxx: Add 16Gb/s case to get port speed capability Saurav Kashyap
2012-11-21  7:40 ` [PATCH 15/19] qla2xxx: Parameterize the link speed of hba rather than fcport Saurav Kashyap
2012-11-21  7:40 ` [PATCH 16/19] qla2xxx: Update ql2xextended_error_logging parameter description with new option Saurav Kashyap
2012-11-21  7:40 ` [PATCH 17/19] qla2xxx: Fix typo in qla2xxx driver Saurav Kashyap
2012-11-21  7:40 ` [PATCH 18/19] qla2xxx: Dont clear drv active on iospace config failure Saurav Kashyap
2012-11-21  7:40 ` [PATCH 19/19] qla2xxx: Display that driver is operating in legacy interrupt mode Saurav Kashyap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1353483644-17262-9-git-send-email-saurav.kashyap@qlogic.com \
    --to=saurav.kashyap@qlogic.com \
    --cc=andrew.vasquez@qlogic.com \
    --cc=chad.dupuis@qlogic.com \
    --cc=giridhar.malavali@qlogic.com \
    --cc=jbottomley@parallels.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).