From: Jeremy Higdon <jeremy@sgi.com>
To: jes@wildopensource.com, linux-scsi@vger.kernel.org
Subject: [PATCH] minor changes to qla1280 driver
Date: Thu, 22 Apr 2004 19:39:36 -0700 [thread overview]
Message-ID: <20040423023935.GA880193@sgi.com> (raw)
On one of our big machines we found a problem with posted writes while
running AIM.
Two writes of the Request Queue In pointer went out of order, making
the chip think that it had a queue wrap.
I took advantage of this opportunity to add relaxed reads, which helps
the Altix. It should not affect other arches. All reads are relaxed
except for the read of the Semaphore register.
Thanks
jeremy
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.1784 -> 1.1785
# drivers/scsi/qla1280.h 1.24 -> 1.25
# drivers/scsi/qla1280.c 1.55 -> 1.56
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 04/04/22 jeremy@tomahawk.engr.sgi.com 1.1785
# Add missing posted write flush and relaxed PIO reads.
# --------------------------------------------
#
diff -Nru a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c
--- a/drivers/scsi/qla1280.c Thu Apr 22 19:26:22 2004
+++ b/drivers/scsi/qla1280.c Thu Apr 22 19:26:22 2004
@@ -3371,6 +3371,7 @@
sp->flags |= SRB_SENT;
ha->actthreads++;
WRT_REG_WORD(®->mailbox4, ha->req_ring_index);
+ (void) RD_REG_WORD(®->mailbox4); /* PCI posted write flush */
out:
if (status)
@@ -3639,6 +3640,7 @@
sp->flags |= SRB_SENT;
ha->actthreads++;
WRT_REG_WORD(®->mailbox4, ha->req_ring_index);
+ (void) RD_REG_WORD(®->mailbox4); /* PCI posted write flush */
out:
if (status)
@@ -3750,6 +3752,7 @@
/* Set chip new ring index. */
WRT_REG_WORD(®->mailbox4, ha->req_ring_index);
+ (void) RD_REG_WORD(®->mailbox4); /* PCI posted write flush */
LEAVE("qla1280_isp_cmd");
}
@@ -3788,7 +3791,7 @@
/* Check for mailbox interrupt. */
- mailbox[0] = RD_REG_WORD(®->semaphore);
+ mailbox[0] = RD_REG_WORD_dmasync(®->semaphore);
if (mailbox[0] & BIT_0) {
/* Get mailbox data. */
diff -Nru a/drivers/scsi/qla1280.h b/drivers/scsi/qla1280.h
--- a/drivers/scsi/qla1280.h Thu Apr 22 19:26:22 2004
+++ b/drivers/scsi/qla1280.h Thu Apr 22 19:26:22 2004
@@ -57,7 +57,8 @@
#define BIT_31 0x80000000
#if MEMORY_MAPPED_IO
-#define RD_REG_WORD(addr) readw(addr)
+#define RD_REG_WORD(addr) readw_relaxed(addr)
+#define RD_REG_WORD_dmasync(addr) readw(addr)
#define WRT_REG_WORD(addr, data) writew(data, addr)
#else /* MEMORY_MAPPED_IO */
#define RD_REG_WORD(addr) inw((unsigned long)addr)
reply other threads:[~2004-04-23 2:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20040423023935.GA880193@sgi.com \
--to=jeremy@sgi.com \
--cc=jes@wildopensource.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