From: Ben Hutchings <ben@decadent.org.uk>
To: "James E.J. Bottomley" <James.Bottomley@suse.de>
Cc: Ravi Anand <ravi.anand@qlogic.com>,
Vikas Chaudhary <vikas.chaudhary@qlogic.com>,
iscsi-driver@qlogic.com, linux-scsi <linux-scsi@vger.kernel.org>,
598503@bugs.debian.org
Subject: [PATCH] qla4xxx: Fix build on some architectures lacking 64-bit I/O
Date: Fri, 01 Oct 2010 04:11:07 +0100 [thread overview]
Message-ID: <1285902667.3916.62.camel@localhost> (raw)
readq() and writeq() are not defined on all archictectures. Where
they are missing, define fallback implementations (copied from
qla2xxx).
Reference: http://bugs.debian.org/598503
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
This is a regression from 2.6.35, so please include this fix in 2.6.36.
Ben.
drivers/scsi/qla4xxx/ql4_nx.h | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/drivers/scsi/qla4xxx/ql4_nx.h b/drivers/scsi/qla4xxx/ql4_nx.h
index 931ad3f..85fe6cf 100644
--- a/drivers/scsi/qla4xxx/ql4_nx.h
+++ b/drivers/scsi/qla4xxx/ql4_nx.h
@@ -776,4 +776,19 @@ struct crb_addr_pair {
#define MIU_TEST_AGT_WRDATA_UPPER_LO (0x0b0)
#define MIU_TEST_AGT_WRDATA_UPPER_HI (0x0b4)
+#ifndef readq
+static inline u64 readq(void __iomem *addr)
+{
+ return readl(addr) | (((u64) readl(addr + 4)) << 32LL);
+}
+#endif
+
+#ifndef writeq
+static inline void writeq(u64 val, void __iomem *addr)
+{
+ writel(((u32) (val)), (addr));
+ writel(((u32) (val >> 32)), (addr + 4));
+}
+#endif
+
#endif
--
1.7.1
next reply other threads:[~2010-10-01 3:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-01 3:11 Ben Hutchings [this message]
2010-10-01 12:26 ` [PATCH] qla4xxx: Fix build on some architectures lacking 64-bit I/O Vikas Chaudhary
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=1285902667.3916.62.camel@localhost \
--to=ben@decadent.org.uk \
--cc=598503@bugs.debian.org \
--cc=James.Bottomley@suse.de \
--cc=iscsi-driver@qlogic.com \
--cc=linux-scsi@vger.kernel.org \
--cc=ravi.anand@qlogic.com \
--cc=vikas.chaudhary@qlogic.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.